Arduino

Develop Arduino projects avoiding common wiring, power, and code pitfalls.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Arduino" with this command: npx skills add ivangdavila/arduino

Voltage and Power Traps

  • 3.3V vs 5V logic mixing damages boards — ESP32 is 3.3V, Uno is 5V, level shifter required
  • USB provides max 500mA — not enough for motors, servos, or many LEDs
  • Never power motors from Arduino 5V pin — use external supply with common ground
  • Brown-out causes random resets — looks like code bugs, actually insufficient power
  • Decoupling capacitors (0.1µF) near sensor power pins — reduces noise-related glitches

Wiring Mistakes

  • Floating inputs read random values — always use pullup or pulldown resistor
  • All components must share common ground — separate grounds = nothing works
  • Long wires pick up noise — keep analog sensor wires short
  • LEDs need current limiting resistors — direct connection burns LED and pin
  • Reversed polarity destroys components — double-check before powering on

Pin Conflicts

  • RX/TX pins (0, 1) conflict with Serial — avoid for GPIO when using Serial Monitor
  • Some pins have special functions — check board pinout for I2C, SPI, interrupt-capable pins
  • PWM only on pins marked with ~ — analogWrite() on wrong pin does nothing
  • Internal pullup available — INPUT_PULLUP eliminates external resistor for buttons

Timing Traps

  • delay() blocks everything — nothing else runs, no input reading, no interrupts serviced
  • millis() for non-blocking timing — compare against last action time
  • millis() overflows after ~50 days — use subtraction: millis() - lastTime >= interval
  • Interrupts for time-critical events — attachInterrupt() responds immediately

Memory Constraints

  • Uno has only 2KB RAM — large arrays fail silently with weird behavior
  • F() macro keeps strings in flash — Serial.println(F("text")) saves RAM
  • PROGMEM for constant arrays — keeps data out of RAM
  • String class fragments heap — prefer char arrays for stability

Serial Debugging

  • Baud rate must match — mismatch shows garbage, not an obvious error
  • Serial.begin() required in setup — output before this goes nowhere
  • Serial printing slows execution — remove or reduce for production code

Upload Problems

  • Wrong board selected — uploads but doesn't run correctly
  • Serial Monitor holds port — close before uploading
  • USB cable might be power-only — some cheap cables don't carry data
  • Bootloader corrupted — reflash using another Arduino as ISP

Sensor Communication

  • I2C devices share bus — check for address conflicts with scanner sketch
  • 5V sensors on 3.3V boards give wrong readings or damage — check operating voltage
  • SPI needs separate CS per device — can't share chip select lines

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

clawhub-install

Download and install skills from ClawHub directly via curl, bypassing official CLI rate limits. Use when the user wants to install one or more ClawHub skills...

Registry SourceRecently Updated
0199
upupc
Coding

Homebrew Bridge

Expose Mac Homebrew tools like brew, gh, and other /opt/homebrew/bin CLIs on a Linux OpenClaw gateway by installing explicit same-LAN SSH wrappers with optio...

Registry SourceRecently Updated
Coding

Dev Tools Pack

Collection of developer tools including Chrome extension templates, AI code reviews, GitHub README generators, SaaS landing pages, tech blogs, and tweet thre...

Registry SourceRecently Updated