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]>
1.5 KiB
1.5 KiB
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.
Blink (built-in LED, D13)
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 (0–3.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);
}