Files
apress/deploy/uno-q/skills/sketch-patterns/SKILL.md
T
Omar SobhandClaude Opus 4.8 62c435c648 feat(uno-q): bundle the granular skill set alongside arduino-uno-q on every node
Vendors the fork's 11 granular UNO Q skills (bridge, flashing, led-matrix,
uno-q-hardware, sketch-patterns, modulino, linux-led, audio, vision, wireless,
arduino-app-lab) next to the comprehensive arduino-uno-q skill, and installs the
whole set into every agent's workspace on each board.

Why both: the comprehensive skill is the rich cloud reference (read_skill →
references); the granular skills are keyword-triggered and match the fork's eager
skill-inliner rules, so the on-board Qwen auto-inlines them (no read_skill
round-trip). flashing + led-matrix carry the exact uno_q_flash + frame-API /
ArduinoGraphics-not-installed detail that makes flashing reliable.

- push-skill.sh generalized: a single skill dir (has SKILL.md) OR a parent dir
  installs every skill under it; provision-fleet now ships all of skills/.
- Verified on board 65301572: cloud/Sonnet-5 lists all 12 skills.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-16 09:32:11 -07:00

1.5 KiB
Raw Blame History

name, description
name description
sketch-patterns Canonical Arduino sketch templates for the Uno Q (blink, fade/PWM, button, analog read) and how to upload them. Load this whenever the user asks to write, run, upload, or flash a sketch, or asks for blink/fade/button/sensor code.

Uno Q Sketch Patterns

Target the MCU with FQBN arduino:zephyr:unoq. Sketches are 3.3 V.

Uploading

To run a sketch on the board, call the uno_q_flash tool with action = upload and the full .ino in code. It compiles and flashes over SWD. Do not describe the steps — emit the tool call.

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(500);
  digitalWrite(LED_BUILTIN, LOW);
  delay(500);
}

Fade (PWM — only D3, D5, D6, D9, D10, D11)

const int PIN = 9;                  // must be a ~ PWM pin
void setup() { pinMode(PIN, OUTPUT); }
void loop() {
  for (int v = 0; v <= 255; v++) { analogWrite(PIN, v); delay(4); }
  for (int v = 255; v >= 0; v--) { analogWrite(PIN, v); delay(4); }
}

Button (input with pull-up)

const int BTN = 2;
void setup() {
  pinMode(BTN, INPUT_PULLUP);
  pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
  digitalWrite(LED_BUILTIN, digitalRead(BTN) == LOW ? HIGH : LOW);
}

Analog read (03.3 V only!)

void setup() { Serial.begin(115200); }
void loop() {
  int raw = analogRead(A0);           // 0..1023
  float volts = raw * 3.3 / 1023.0;   // NEVER exceed 3.3 V on A0-A5
  Serial.println(volts);
  delay(200);
}