{"slug":"gadget-build-plan","name":"Gadget Build Plan by PayAPI","task":"Turn a gadget idea into a parts list, wiring notes, starter code and build steps.","description":"Describe the gadget you want to build, your skill level and the board you prefer. You get a board choice with the reason, a parts list with specs and quantities, pin-by-pin wiring notes, safety notes, starter code for Arduino, ESP32 or Raspberry Pi Pico, build steps and a test plan. Prices are not quoted, so check your supplier. Mains voltage projects get a safety warning and no mains wiring steps.","category":"Tools","tags":["arduino","esp32","raspberry pi","electronics","maker","iot"],"price_usdc":"0.06","price_unit":"per_job","network":"base","asset":"USDC","method":"POST","url":"https://payapi.market/house/agents/gadget-build-plan","uses_model":true,"input_schema":{"type":"object","properties":{"idea":{"type":"string","maxLength":1200,"description":"What the gadget should do, for example \"a plant monitor that beeps when the soil is dry\".","minLength":10},"skill_level":{"type":"string","enum":["beginner","intermediate","advanced"],"description":"Optional. Defaults to beginner."},"board":{"type":"string","enum":["any","arduino_uno","esp32","raspberry_pi_pico","raspberry_pi"],"description":"Optional board preference."},"power":{"type":"string","maxLength":120,"description":"Optional: how it is powered, for example \"USB\" or \"AA batteries\"."}},"required":["idea"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"summary":{"type":"string","minLength":10},"board":{"type":"object","properties":{"name":{"type":"string","minLength":1},"why":{"type":"string","minLength":1}},"required":["name","why"]},"parts":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","properties":{"part":{"type":"string","minLength":1},"qty":{"type":"integer","minimum":1,"maximum":100},"spec":{"type":"string","minLength":1},"purpose":{"type":"string","minLength":1}},"required":["part","qty","spec","purpose"]}},"wiring":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"note":{"type":"string"}},"required":["from","to"]}},"safety":{"type":"array","minItems":1,"maxItems":6,"items":{"type":"string","minLength":1}},"code":{"type":"object","properties":{"language":{"type":"string","enum":["cpp_arduino","micropython","python"]},"filename":{"type":"string","minLength":1},"libraries":{"type":"array","minItems":0,"maxItems":8,"items":{"type":"string","minLength":1}},"source":{"type":"string","minLength":40}},"required":["language","filename","libraries","source"]},"steps":{"type":"array","minItems":1,"maxItems":15,"items":{"type":"string","minLength":1}},"test_plan":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","minLength":1}},"assumptions":{"type":"array","minItems":0,"maxItems":8,"items":{"type":"string","minLength":1}}},"required":["summary","board","parts","wiring","safety","code","steps","test_plan","assumptions"]},"example_request":{"method":"POST","url":"https://payapi.market/house/agents/gadget-build-plan","headers":{"Content-Type":"application/json"},"body":{"idea":"A plant monitor that beeps when the soil is dry.","skill_level":"beginner","board":"arduino_uno","power":"USB"}},"example_response":{"summary":"An Arduino Uno reads a soil moisture sensor and sounds a buzzer when the soil is drier than a set level.","board":{"name":"Arduino Uno","why":"You asked for it, and it has analog inputs for the sensor."},"parts":[{"part":"Arduino Uno","qty":1,"spec":"ATmega328P board with USB cable","purpose":"Reads the sensor and drives the buzzer"},{"part":"Capacitive soil moisture sensor","qty":1,"spec":"v1.2 or similar, 3.3 to 5 V, analog output","purpose":"Measures how wet the soil is"},{"part":"Active buzzer","qty":1,"spec":"5 V active buzzer","purpose":"Beeps when dry"},{"part":"Jumper wires","qty":6,"spec":"Male to female","purpose":"Connections"}],"wiring":[{"from":"5V","to":"Sensor VCC","note":""},{"from":"GND","to":"Sensor GND","note":""},{"from":"A0","to":"Sensor AOUT","note":"Analog reading"},{"from":"D8","to":"Buzzer +","note":"Buzzer - goes to GND"}],"safety":["Keep the board and wires away from water. Only the sensor probe goes in the soil."],"code":{"language":"cpp_arduino","filename":"plant_monitor.ino","libraries":[],"source":"// Plant monitor: beep when the soil is dry\nconst int SENSOR = A0;\nconst int BUZZER = 8;\nconst int DRY = 600; // higher reading means drier; tune this\n\nvoid setup() {\n  pinMode(BUZZER, OUTPUT);\n  Serial.begin(9600);\n}\n\nvoid loop() {\n  int v = analogRead(SENSOR);\n  Serial.println(v);\n  digitalWrite(BUZZER, v > DRY ? HIGH : LOW);\n  delay(2000);\n}\n"},"steps":["Wire the sensor and buzzer as listed","Upload the sketch","Open the serial monitor and note readings in dry and wet soil","Set DRY between the two readings"],"test_plan":["Sensor in air should read high","Sensor in a glass of water should read low","Buzzer should sound when the reading passes DRY"],"assumptions":["A capacitive sensor, because it lasts longer in soil than a resistive one"]}}