Files
awesome-copilot/skills/arduino-azure-iot-edge-integration/references/arduino-official-best-practices.md
Sertxito e2ae5cc559 feat(skills): add IoT edge skills and align agent/instruction docs (#1431)
* feat(skills): add IoT edge skills and align agent/instruction docs

* fix(ci): handle fork permission errors in plugin structure check

* fix(ci): allow intentional Spanish vocabulary in codespell

* docs(skills): translate IoT edge skill content to English

* fix(ci): pass codespell and README validation

* chore: regenerate skills index after merge
2026-04-29 11:15:42 +10:00

2.3 KiB

Arduino Official References and Best Practices

Use these official Arduino resources before finalizing firmware or hardware guidance.

Official References

Firmware Best Practices

  • Keep the loop() non-blocking; avoid long delay() usage in production logic.
  • Use millis()-based scheduling for periodic tasks.
  • Budget SRAM explicitly and avoid dynamic allocation in hot paths.
  • Validate sensor ranges and provide safe defaults for invalid readings.
  • Add startup self-checks and periodic health heartbeat messages.
  • Version the payload schema and firmware version in every telemetry stream.
  • Implement retry with exponential backoff and jitter for network operations.
  • Store credentials outside source code and rotate them according to policy.

Hardware and Power Best Practices

  • Document voltage levels, pin mapping, and current limits per peripheral.
  • Design for brownout and power fluctuation scenarios.
  • Use watchdog and safe recovery behavior where available.
  • Plan low-power modes for battery deployments and validate wake cycles.

Integration Best Practices for Azure IoT

  • Prefer secure transports (MQTT over TLS) and per-device identity.
  • Define idempotent upstream processing for duplicate message scenarios.
  • Include device health metrics (uptime, reset reason, RSSI where applicable).
  • Validate offline buffering bounds to avoid uncontrolled memory growth.