### Install and Setup Lifecycle Tracking System Source: https://github.com/wtyler2505/protopulse/blob/main/docs/hardware/components/lifecycle-tracking/README.md Follow these commands to clone the repository, install dependencies, initialize the database, load component data, and start the tracking service and web interface. ```bash # Clone the repository git clone https://github.com/omnitrek/lifecycle-tracking.git cd lifecycle-tracking # Install Python dependencies pip install -r requirements.txt # Initialize database python -m database.init_db # Load component data python -m data.load_components # Start the tracking service python -m tracking_system.lifecycle_tracker # Start the web interface python -m web_interface.app ``` -------------------------------- ### Install Dependencies, Push Schema, and Start Dev Server Source: https://github.com/wtyler2505/protopulse/blob/main/docs/DEVELOPER.md Use these commands to set up the project locally. Ensure Node.js 20+ and PostgreSQL 14+ are installed. The development server will run on http://localhost:5000. ```bash npm install npm run db:push npm run dev ``` -------------------------------- ### Running Automated Tests Source: https://github.com/wtyler2505/protopulse/blob/main/docs/hardware/components/automated-testing/README.md Command-line examples for executing the test runner. Includes options for running specific suites, all tests, using custom configurations, and starting the scheduler. ```bash python test-runner.py --suite daily_health python test-runner.py --all python test-runner.py --config custom-config.json python test-scheduler.py python generate-test-report.py --date 2025-11-03 ``` -------------------------------- ### Install Library Source: https://github.com/wtyler2505/protopulse/blob/main/docs/arduino-ide-api-contracts.md Installs a specified library by name and version. This operation initiates a background job. ```APIDOC ## POST /libraries/install ### Description Installs a specified library. ### Method POST ### Endpoint /libraries/install ### Request Body - **name** (string) - Required - The name of the library to install (e.g., "ArduinoJson"). - **version** (string) - Required - The version of the library to install (e.g., "7.0.3"). ### Request Example ```json { "name": "ArduinoJson", "version": "7.0.3" } ``` ### Response #### Success Response (202) - **jobId** (integer) - The ID of the job created for the installation. - **status** (string) - The initial status of the job (e.g., "pending"). #### Response Example ```json { "jobId": 104, "status": "pending" } ``` ``` -------------------------------- ### Phase 0: Deliverable Setup Source: https://github.com/wtyler2505/protopulse/blob/main/RALPH-PRODUCT-ANALYSIS.md Initial setup for product analysis deliverables: a narrative report and an actionable checklist. ```markdown # ProtoPulse Product Analysis — Ralph Loop Prompt You are a Senior EDA Product Analyst and Technical Architect performing a comprehensive evaluation of ProtoPulse — a browser-based AI-assisted Electronic Design Automation platform at `/home/wtyler/Projects/ProtoPulse`. ## Your Mission Produce an exhaustive gap analysis, improvement roadmap, and enhancement catalog through iterative deep analysis. You are in a loop — each iteration you will see your previous work in the deliverable files. Build incrementally. Go deeper each pass. ## Each Iteration ``` 1. Read docs/product-analysis-report.md and docs/product-analysis-checklist.md 2. If they don't exist → Phase 0 (create them) 3. Determine which phase is the NEXT incomplete phase 4. Execute that phase thoroughly — read relevant source files, analyze, document 5. Update BOTH deliverable files with your findings 6. If ALL 5 phases are complete → re-read both docs → look for gaps, shallow analysis, or missed areas 7. If you find gaps → deepen the analysis, add findings, update checklist 8. If both documents are comprehensive and all 5 phases are thorough → output the completion promise ``` ## Phase 0 — Deliverable Setup (first iteration only) Create two documents: 1. **`docs/product-analysis-report.md`** — Full narrative report with findings, organized by category 2. **`docs/product-analysis-checklist.md`** — Actionable checklist of every finding Initialize both with headers and empty phase sections so future iterations know the structure. ``` -------------------------------- ### Install Library Request Source: https://github.com/wtyler2505/protopulse/blob/main/docs/arduino-ide-api-contracts.md To install a library, provide its name and desired version. ```json { "name": "ArduinoJson", "version": "7.0.3" } ``` -------------------------------- ### Install Library Response Source: https://github.com/wtyler2505/protopulse/blob/main/docs/arduino-ide-api-contracts.md A successful library installation request returns a job ID and pending status. ```json { "jobId": 104, "status": "pending" } ``` -------------------------------- ### NPM Script for Starting Production Server Source: https://github.com/wtyler2505/protopulse/blob/main/docs/AI_AGENT_GUIDE.md Starts the production server using the built application files. Sets NODE_ENV to production. ```bash NODE_ENV=production node dist/index.cjs ``` -------------------------------- ### Install Platform Request Source: https://github.com/wtyler2505/protopulse/blob/main/docs/arduino-ide-api-contracts.md Use this endpoint to install a new platform. Specify the platform ID and version. ```json { "platformId": "esp32:esp32", "version": "3.2.1" } ``` -------------------------------- ### Install Platform Response Source: https://github.com/wtyler2505/protopulse/blob/main/docs/arduino-ide-api-contracts.md A successful platform installation request returns a job ID and pending status. ```json { "jobId": 101, "status": "pending" } ``` -------------------------------- ### Integrate Updater, Process, and Setup Logic Source: https://github.com/wtyler2505/protopulse/blob/main/docs/audits/2026-05-10-tauri-v2-claude-context7-research-feed.md Combine tauri-plugin-process with tauri-plugin-updater and custom setup logic. This pattern is used for managing application updates, including fetching and installing new versions. ```rust pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_process::init()) .setup(|app| { #[cfg(desktop)] { app.handle().plugin(tauri_plugin_updater::Builder::new().build()); app.manage(app_updates::PendingUpdate(Mutex::new(None))); } Ok(()) }) .invoke_handler(tauri::generate_handler![ #[cfg(desktop)] app_updates::fetch_update, #[cfg(desktop)] app_updates::install_update, ]) .run(tauri::generate_context!()) } ``` -------------------------------- ### Install and Run ProtoPulse Source: https://github.com/wtyler2505/protopulse/blob/main/README.md Clone the repository, install dependencies, push the database schema, and launch the development server. Ensure DATABASE_URL is set in your .env file. ```bash git clone https://github.com/wtyler2505/ProtoPulse.git cd ProtoPulse && npm install npm run db:push npm run dev ``` -------------------------------- ### MQTT IoT Integration Setup and Publishing Source: https://github.com/wtyler2505/protopulse/blob/main/docs/hardware/components/categories/communication/README.md Initializes the MQTT client and publishes sensor data to a topic. Requires WiFi client and PubSubClient library. ```cpp #include WiFiClient espClient; PubSubClient client(espClient); void setupMQTT() { client.setServer(mqtt_server, 1883); client.setCallback(mqttCallback); } void publishSensorData() { String payload = "{"; payload += "\"temperature\": ``` ```cpp + String(temperature) + ","; payload += "\"humidity\": ``` ```cpp + String(humidity) + ","; payload += "\"battery\": ``` ```cpp + String(batteryLevel) + "; payload += "}"; client.publish("omnitrek/sensors", payload.c_str()); } ``` -------------------------------- ### Add tauri-plugin-log to Tauri Project Source: https://github.com/wtyler2505/protopulse/blob/main/docs/audits/2026-05-10-tauri-v2-claude-context7-research-feed.md Install and configure the tauri-plugin-log for enhanced logging capabilities. This setup directs logs to stdout, a file, and the webview console, with a specified log level. ```bash npm run tauri add log ``` ```rust // src-tauri/src/lib.rs use tauri_plugin_log::{Target, TargetKind}; pub fn run() { tauri::Builder::default() .plugin( tauri_plugin_log::Builder::new() .target(Target::new(TargetKind::Stdout)) .target(Target::new(TargetKind::LogDir { file_name: Some("protopulse.log".into()) })) .target(Target::new(TargetKind::Webview)) // forwards Rust logs to JS console .level(log::LevelFilter::Info) .build() ) .run(tauri::generate_context!()) .expect("error while running tauri application"); } ``` ```typescript // Frontend: attach Rust logs to webview console import { attachConsole } from '@tauri-apps/plugin-log'; const detach = await attachConsole(); // call detach() to stop forwarding ``` -------------------------------- ### NodeMCU ESP8266 Serial Communication Baud Rate Setup Source: https://github.com/wtyler2505/protopulse/blob/main/docs/hardware/wiring/nodemcu-esp8266-wiring.md Ensure both the Arduino and NodeMCU use the same baud rate for serial communication. This example shows setting the baud rate to 115200 for both devices. ```cpp Arduino: Serial1.begin(115200); NodeMCU: Serial.begin(115200); ``` -------------------------------- ### Manage Component Instances in Circuits Source: https://context7.com/wtyler2505/protopulse/llms.txt Examples for placing, updating, and listing component instances within a circuit sheet. Shows how to specify part IDs, reference designators, and positional data for schematic and PCB views. ```bash # Place a component instance curl -s -X POST http://localhost:5000/api/circuits/1/instances \ -H "Content-Type: application/json" \ -H "x-session-id: $SESSION" \ -d '{ "partId": 5, "referenceDesignator": "U1", "schematicX": 300, "schematicY": 200, "schematicRotation": 0, "pcbX": 50, "pcbY": 60, "pcbSide": "front" }' | jq . # Response (201): { "id": 1, "referenceDesignator": "U1", "partId": 5, ... } # Update instance position (e.g. after drag on PCB) curl -s -X PATCH http://localhost:5000/api/circuits/1/instances/1 \ -H "Content-Type: application/json" \ -H "x-session-id: $SESSION" \ -d '{"pcbX": 55.5, "pcbY": 62.0, "pcbRotation": 90}' | jq . # List all instances with pagination curl -s "http://localhost:5000/api/circuits/1/instances?limit=100&sort=asc" \ -H "x-session-id: $SESSION" | jq '.data[] | {id, referenceDesignator, partId}' ``` -------------------------------- ### Test Configuration File Example Source: https://github.com/wtyler2505/protopulse/blob/main/docs/hardware/components/automated-testing/README.md An example JSON configuration file detailing serial port mappings, I2C addresses for sensors, network settings for ESP32, and definitions for test suites. ```json { "test_config": { "serial_ports": { "arduino_mega": "/dev/ttyACM0", "backup_arduino": "/dev/ttyACM1" }, "i2c_addresses": { "mpu6050": 0x68, "secondary_mpu": 0x69 }, "network_config": { "esp32_ip": "192.168.1.100", "esp32_port": 80 } }, "test_suites": { "daily_health": { "tests": ["arduino_connection", "esp32_connection", "sensor_health", "motor_health"] }, "weekly_comprehensive": { "tests": [ "arduino_full_test", "esp32_full_test", "motor_driver_test", "sensor_calibration", "integration_test" ] } } } ``` -------------------------------- ### Basic Arduino Motor Control Source: https://github.com/wtyler2505/protopulse/blob/main/docs/hardware/components/inventory/arduino-mega-2560.md This example demonstrates fundamental motor control using digital pins for direction and an analog pin for speed. It requires basic Arduino setup for pin modes and serial communication. ```cpp // Basic motor control example #define MOTOR_PIN1 9 #define MOTOR_PIN2 10 #define ENABLE_PIN 11 void setup() { pinMode(MOTOR_PIN1, OUTPUT); pinMode(MOTOR_PIN2, OUTPUT); pinMode(ENABLE_PIN, OUTPUT); Serial.begin(9600); } void loop() { // Forward motion digitalWrite(MOTOR_PIN1, HIGH); digitalWrite(MOTOR_PIN2, LOW); analogWrite(ENABLE_PIN, 200); delay(2000); // Stop analogWrite(ENABLE_PIN, 0); delay(1000); } ``` -------------------------------- ### Individual Controller Setup Prompt for NotebookLM Source: https://github.com/wtyler2505/protopulse/blob/main/docs/hardware/wiring/00_WIRING_DOCS_INDEX.md This prompt guides NotebookLM to explain the wiring process for a single motor controller to the NodeMCU 32S, including signal wiring, Hall sensor connections, and verification steps. ```text Walk through the wiring process for connecting a single motor controller to the NodeMCU 32S. Cover signal wiring, Hall sensor connections, and verification steps. Explain what to check before connecting the motor. ``` -------------------------------- ### Arduino Example: ZS-X11H BLDC Motor Control Source: https://github.com/wtyler2505/protopulse/blob/main/docs/hardware/RioRand_ZS-X11H_BLDC_Controller_Reference.md This Arduino sketch demonstrates single motor control using serial commands. It handles setting speed, direction, brake, and stop states, and includes RPM reading functionality. Ensure correct pin definitions for your setup. ```cpp // ============================================== // ZS-X11H BLDC Motor Controller - Arduino Driver // Single motor control with serial commands // ============================================== // Pin Definitions const int PIN_DIR = 2; // Direction: HIGH=forward, LOW=reverse const int PIN_BRAKE = 3; // Brake: HIGH=brake ON, LOW=brake OFF const int PIN_STOP = 4; // Stop/Enable: HIGH=enabled, LOW=disabled const int PIN_PWM = 9; // PWM speed: 0-255 (0=stop, 255=max) const int PIN_SPEED = 12; // SC speed pulse input // Motor state int motorSpeed = 0; bool motorForward = true; bool brakeEngaged = false; bool motorEnabled = true; void setup() { Serial.begin(115200); // Configure pins pinMode(PIN_DIR, OUTPUT); pinMode(PIN_BRAKE, OUTPUT); pinMode(PIN_STOP, OUTPUT); pinMode(PIN_PWM, OUTPUT); pinMode(PIN_SPEED, INPUT); // Initialize safe state analogWrite(PIN_PWM, 0); // Speed = 0 digitalWrite(PIN_DIR, HIGH); // Forward digitalWrite(PIN_BRAKE, LOW); // Brake off digitalWrite(PIN_STOP, HIGH); // Motor enabled Serial.println("ZS-X11H Motor Controller Ready"); Serial.println("Commands: PWM,<0-255> | DIR,<0|1> | BRAKE,<0|1> | STOP,<0|1> | RPM"); } void loop() { // Handle serial commands if (Serial.available()) { String cmd = Serial.readStringUntil('\n'); cmd.trim(); handleCommand(cmd); } } void handleCommand(String cmd) { int commaIndex = cmd.indexOf(','); String command = (commaIndex > 0) ? cmd.substring(0, commaIndex) : cmd; String value = (commaIndex > 0) ? cmd.substring(commaIndex + 1) : ""; command.toUpperCase(); if (command == "PWM") { int speed = constrain(value.toInt(), 0, 255); analogWrite(PIN_PWM, speed); motorSpeed = speed; Serial.print("Speed set to: "); Serial.println(speed); } else if (command == "DIR") { // SAFETY: Reduce speed before direction change if (motorSpeed > 127) { Serial.println("WARNING: Reduce speed below 50% before reversing!"); return; } bool forward = (value.toInt() == 1); digitalWrite(PIN_DIR, forward ? HIGH : LOW); motorForward = forward; Serial.print("Direction: "); Serial.println(forward ? "FORWARD" : "REVERSE"); } else if (command == "BRAKE") { bool brake = (value.toInt() == 1); if (brake) { analogWrite(PIN_PWM, 0); // Cut speed before braking delay(10); } digitalWrite(PIN_BRAKE, brake ? HIGH : LOW); brakeEngaged = brake; Serial.print("Brake: "); Serial.println(brake ? "ENGAGED" : "RELEASED"); } else if (command == "STOP") { bool enable = (value.toInt() == 1); digitalWrite(PIN_STOP, enable ? HIGH : LOW); motorEnabled = enable; if (!enable) analogWrite(PIN_PWM, 0); Serial.print("Motor: "); Serial.println(enable ? "ENABLED" : "DISABLED"); } else if (command == "RPM") { readRPM(); } else { Serial.println("Unknown command. Use: PWM,<0-255> | DIR,<0|1> | BRAKE,<0|1> | STOP,<0|1> | RPM"); } } void readRPM() { unsigned long pulseDuration = pulseIn(PIN_SPEED, HIGH, 100000); if (pulseDuration > 0) { float frequency = 1000000.0 / (pulseDuration * 2.0); // 90 pulses per revolution for typical hoverboard motor // ADJUST THIS VALUE for your specific motor float rpm = (frequency / 90.0) * 60.0; Serial.print("RPM: "); Serial.println(rpm, 1); } else { Serial.println("RPM: 0 (stopped or too slow)"); } } ``` -------------------------------- ### Setup Event Listeners Source: https://github.com/wtyler2505/protopulse/blob/main/docs/hardware/components/interactive-pinouts/nodemcu-esp32s-pinout.html Sets up various event listeners, including keyboard navigation for pin selection. ```JavaScript function setupEventListeners() { // Add keyboard navigation document.addEventListener('keydown', function (event) { const pins = Array.from(document.querySelectorAll('.pin')); const selectedPin = document.querySelector('.pin.selected'); ``` -------------------------------- ### Example Learn Path Output Source: https://github.com/wtyler2505/protopulse/blob/main/docs/superpowers/plans/2026-04-18-arscontexta-system-upgrades.md Illustrates the structured learning path generated by the `/vault-teach` command, including steps, estimated times, and pre-tests. ```text Learn path: "I want to understand decoupling capacitors" Step 1 (foundation): what-is-capacitance.md (5 min) Step 2 (mechanism): why-capacitors-smooth-voltage.md (5 min) Step 3 (application): 10uf-ceramic-on-esp32-vin-... (10 min) Step 4 (deep): esr-and-high-frequency-decoupling.md (15 min) Pre-test: drc-should-flag-missing-decoupling.md ``` -------------------------------- ### Initialize and Control MAX7219 LED Matrix with Arduino Source: https://github.com/wtyler2505/protopulse/blob/main/docs/hardware/components/component-log.md This Arduino code initializes the LedControl library to control a MAX7219-based LED matrix. It sets the display intensity and clears the display in the setup function, then displays a '1' and clears it in a loop. Ensure the LedControl library is installed and pins are correctly mapped. ```cpp #include // Parameters: DIN, CLK, CS, number of devices LedControl lc = LedControl(12, 11, 10, 1); void setup() { lc.shutdown(0, false); // Wake up display lc.setIntensity(0, 8); // Set brightness (0-15) lc.clearDisplay(0); // Clear display } void loop() { lc.setDigit(0, 0, 1, false); // Display "1" on the first digit delay(1000); lc.clearDisplay(0); // Clear display } ``` -------------------------------- ### Install Board Platform Source: https://github.com/wtyler2505/protopulse/blob/main/docs/arduino-ide-api-contracts.md Installs a specific version of a board platform. This operation initiates a background job to handle the installation process. ```APIDOC ## POST /boards/platforms/install ### Description Installs a specified board platform and version. ### Method POST ### Endpoint /boards/platforms/install ### Request Body - **platformId** (string) - Required - The identifier of the platform to install (e.g., "esp32:esp32"). - **version** (string) - Required - The version of the platform to install (e.g., "3.2.1"). ### Request Example ```json { "platformId": "esp32:esp32", "version": "3.2.1" } ``` ### Response #### Success Response (202) - **jobId** (integer) - The ID of the job created for the installation. - **status** (string) - The initial status of the job (e.g., "pending"). #### Response Example ```json { "jobId": 101, "status": "pending" } ``` ``` -------------------------------- ### Install or Update Gemini CLI in circuitmind-ai Source: https://github.com/wtyler2505/protopulse/blob/main/docs/superpowers/plans/2026-04-10-gemini-cli-tuneup.md Installs or updates the @google/gemini-cli to a specific version range (e.g., ^0.37.0) in the circuitmind-ai project if the dependency is actively used. It also verifies the installation. ```bash cd /home/wtyler/circuitmind-ai npm install --save @google/gemini-cli@^0.37.0 # verify jq '.dependencies["@google/gemini-cli"]' package.json ``` -------------------------------- ### ESP-32S Web Server Setup Source: https://github.com/wtyler2505/protopulse/blob/main/docs/hardware/components/categories/communication/README.md Sets up a basic web server on the ESP-32S to handle HTTP requests for status and control. Requires WiFi and WebServer libraries. ```cpp #include #include WebServer server(80); void setupWebInterface() { server.on("/", handleRoot); server.on("/status", handleStatus); server.on("/control", handleControl); server.begin(); } void handleStatus() { String json = "{"; json += "\"battery\": ``` ```cpp + String(batteryVoltage) + ","; json += "\"sensors\": ``` ```cpp + getSensorData() + ","; json += "\"motors\": ``` ```cpp + getMotorStatus(); json += "}"; server.send(200, "application/json", json); } ```