Skip to content

Commit 8f1538f

Browse files
authored
Merge pull request #9 from devkyato/release/v1.0.3
Release Arduino Programs Guide 1.0.3
2 parents ccc3139 + f57ad51 commit 8f1538f

10 files changed

Lines changed: 57 additions & 26 deletions

File tree

.zenodo.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"creators": [{"name": "@dev.mako (devkyato)", "affiliation": "MATA Company"}],
33
"contributors": [{"name": "Cursor Agent", "type": "Other"}],
44
"title": "Arduino Programs Guide: safety-first compile-checked Arduino Uno course",
5-
"description": "<h2>Overview</h2><p><strong>Arduino Programs Guide</strong> is a progressive, safety-first Arduino Uno course covering serial commands, LED patterns, PWM motor control, state machines, and emergency-stop behaviour. Each lesson pairs a compile-checked sketch with wiring, safety, verification, and extension guidance.</p><h2>Learning outcomes</h2><ul><li>Map serial commands to digital outputs and reusable functions.</li><li>Build non-blocking LED patterns with arrays, bit masks, and <code>millis()</code>.</li><li>Drive motors safely with PWM, transistor or H-bridge drivers, and fail-safe stops.</li><li>Integrate analog sensing, emergency override, and telemetry in a supervised capstone.</li></ul><h2>Getting started</h2><ul><li>Read the hardware-safety and getting-started guides.</li><li>Build Exercise A with power disconnected.</li><li>Upload and verify over Serial Monitor before adding Bluetooth.</li><li>Progress through Exercises A to F and complete each checklist.</li></ul><pre><code>arduino-cli compile --fqbn arduino:avr:uno exercises/exercise-a-arrow-controller</code></pre><h2>Quick start</h2><p>Exercise A accepts simple arrow commands at 9600 baud:</p><pre><code>// USB Serial or TTL Bluetooth serial at 9600 baud\n// U D L R C control four LEDs and a clear command</code></pre><h2>Applications</h2><ul><li>Introductory Arduino Uno coursework and maker-space labs.</li><li>Safety-first PWM and H-bridge motor lessons.</li><li>Compile-checked embedded systems instruction.</li><li>Independent practice with serial control and state machines.</li></ul><h2>Compatibility, safety, and limitations</h2><p>The course targets Arduino Uno and the Arduino AVR Boards core. CI compiles every sketch; that is not hardware validation. Never connect a DC motor directly to an Arduino pin. Motor lessons require a suitable driver, flyback protection, an external motor supply, and a shared ground. Other boards may differ in PWM pins, voltage levels, serial ports, or ADC ranges.</p><h2>Documentation</h2><ul><li><a href=\"https://github.com/devkyato/Arduino-Programs-Guide/blob/main/docs/README.md\">Documentation index</a></li><li><a href=\"https://github.com/devkyato/Arduino-Programs-Guide/blob/main/docs/hardware-safety.md\">Hardware safety</a></li><li><a href=\"https://github.com/devkyato/Arduino-Programs-Guide/blob/main/docs/getting-started.md\">Getting started</a></li></ul><h2>Related software</h2><p><a href=\"https://github.com/devkyato/Custom-Arduino-Libraries\">ArduinoPatterns</a> is the companion library for optional non-blocking abstractions after Exercise B.</p><h2>Citation</h2><p>@dev.mako (devkyato). (2026). <strong>Arduino Programs Guide: safety-first compile-checked Arduino Uno course</strong> (Version 1.0.2). Zenodo. <a href=\"https://doi.org/10.5281/zenodo.21853286\">https://doi.org/10.5281/zenodo.21853286</a></p>",
6-
"version": "1.0.2",
5+
"description": "<h2>Overview</h2><p><strong>Arduino Programs Guide</strong> is a progressive, safety-first Arduino Uno course covering serial commands, LED patterns, PWM motor control, state machines, and emergency-stop behaviour. Each lesson pairs a compile-checked sketch with wiring, safety, verification, and extension guidance.</p><h2>Learning outcomes</h2><ul><li>Map serial commands to digital outputs and reusable functions.</li><li>Build non-blocking LED patterns with arrays, bit masks, and <code>millis()</code>.</li><li>Drive motors safely with PWM, transistor or H-bridge drivers, and fail-safe stops.</li><li>Integrate analog sensing, emergency override, and telemetry in a supervised capstone.</li></ul><h2>Getting started</h2><ul><li>Read the hardware-safety and getting-started guides.</li><li>Build Exercise A with power disconnected.</li><li>Upload and verify over Serial Monitor before adding Bluetooth.</li><li>Progress through Exercises A to F and complete each checklist.</li></ul><pre><code>arduino-cli compile --fqbn arduino:avr:uno exercises/exercise-a-arrow-controller</code></pre><h2>Quick start</h2><p>Exercise A accepts simple arrow commands at 9600 baud:</p><pre><code>// USB Serial or TTL Bluetooth serial at 9600 baud\n// U D L R C control four LEDs and a clear command</code></pre><h2>Applications</h2><ul><li>Introductory Arduino Uno coursework and maker-space labs.</li><li>Safety-first PWM and H-bridge motor lessons.</li><li>Compile-checked embedded systems instruction.</li><li>Independent practice with serial control and state machines.</li></ul><h2>Compatibility, safety, and limitations</h2><p>The course targets Arduino Uno and the Arduino AVR Boards core. CI compiles every sketch; that is not hardware validation. Never connect a DC motor directly to an Arduino pin. Motor lessons require a suitable driver, flyback protection, an external motor supply, and a shared ground. Other boards may differ in PWM pins, voltage levels, serial ports, or ADC ranges.</p><h2>Documentation</h2><ul><li><a href=\"https://github.com/devkyato/Arduino-Programs-Guide/blob/main/docs/README.md\">Documentation index</a></li><li><a href=\"https://github.com/devkyato/Arduino-Programs-Guide/blob/main/docs/hardware-safety.md\">Hardware safety</a></li><li><a href=\"https://github.com/devkyato/Arduino-Programs-Guide/blob/main/docs/getting-started.md\">Getting started</a></li></ul><h2>Related software</h2><p><a href=\"https://github.com/devkyato/Custom-Arduino-Libraries\">ArduinoPatterns</a> is the companion library for optional non-blocking abstractions after Exercise B.</p><h2>Citation</h2><p>@dev.mako (devkyato). (2026). <strong>Arduino Programs Guide: safety-first compile-checked Arduino Uno course</strong> (Version 1.0.3). Zenodo. <a href=\"https://doi.org/10.5281/zenodo.21853286\">https://doi.org/10.5281/zenodo.21853286</a></p>",
6+
"version": "1.0.3",
77
"keywords": ["Arduino", "education", "course", "Uno", "safety", "PWM", "motor control", "embedded", "serial", "state machine", "curriculum"],
88
"license": "mit",
99
"upload_type": "software",

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## [Unreleased]
4+
5+
## [1.0.3] - 2026-08-12
6+
7+
### Changed
8+
9+
- Soft-start Exercise F so the first motion command requires the speed pot near minimum.
10+
- Clarify Exercise D full-on motor wiring and enable-pin safety expectations.
11+
- Strengthen Bluetooth warm-up guidance for 3.3 V RX level shifting.
12+
313
## [1.0.2] - 2026-08-09
414

515
### Changed
@@ -23,4 +33,5 @@
2333

2434
[1.0.0]: https://github.com/devkyato/Arduino-Programs-Guide/releases/tag/v1.0.0
2535
[1.0.1]: https://github.com/devkyato/Arduino-Programs-Guide/compare/v1.0.0...v1.0.1
36+
[1.0.3]: https://github.com/devkyato/Arduino-Programs-Guide/compare/v1.0.2...v1.0.3
2637
[1.0.2]: https://github.com/devkyato/Arduino-Programs-Guide/compare/v1.0.1...v1.0.2

CITATION.cff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: "Arduino Programs Guide: safety-first compile-checked Arduino Uno course"
44
authors:
55
- name: "@dev.mako (devkyato)"
66
affiliation: "MATA Company"
7-
version: 1.0.2
8-
date-released: 2026-08-09
7+
version: 1.0.3
8+
date-released: 2026-08-12
99
license: MIT
1010
repository-code: "https://github.com/devkyato/Arduino-Programs-Guide"
1111
url: "https://github.com/devkyato/Arduino-Programs-Guide"
@@ -37,8 +37,8 @@ preferred-citation:
3737
authors:
3838
- name: "@dev.mako (devkyato)"
3939
affiliation: "MATA Company"
40-
version: 1.0.2
41-
date-released: 2026-08-09
40+
version: 1.0.3
41+
date-released: 2026-08-12
4242
repository-code: "https://github.com/devkyato/Arduino-Programs-Guide"
4343
doi: 10.5281/zenodo.21853286
4444
license: MIT

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.21853286.svg)](https://doi.org/10.5281/zenodo.21853286)
55
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
66

7-
Arduino Programs Guide 1.0.2 is a progressive, safety-first Arduino Uno course covering
7+
Arduino Programs Guide 1.0.3 is a progressive, safety-first Arduino Uno course covering
88
serial commands, LED patterns, PWM motor control, state machines, and emergency-stop
99
behaviour. Each lesson includes a compile-checked sketch, wiring contract, test procedure,
1010
and extension ideas.
@@ -96,7 +96,7 @@ only when verified on hardware.
9696
## Citation
9797

9898
```text
99-
@dev.mako (devkyato). (2026). Arduino Programs Guide: safety-first compile-checked Arduino Uno course (Version 1.0.2). Zenodo. https://doi.org/10.5281/zenodo.21853286
99+
@dev.mako (devkyato). (2026). Arduino Programs Guide: safety-first compile-checked Arduino Uno course (Version 1.0.3). Zenodo. https://doi.org/10.5281/zenodo.21853286
100100
```
101101

102102
See [CITATION.cff](CITATION.cff) for machine-readable metadata.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.2
1+
1.0.3

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Documentation index
22

3-
Arduino Programs Guide 1.0.2 documentation for instructors, students, and offline archive users.
3+
Arduino Programs Guide 1.0.3 documentation for instructors, students, and offline archive users.
44

55
## Course setup
66

@@ -30,4 +30,4 @@ Arduino Programs Guide 1.0.2 documentation for instructors, students, and offlin
3030

3131
## Offline archive contents
3232

33-
Release ZIP `Arduino-Programs-Guide-1.0.2.zip` includes exercises, extras, docs, citation metadata, changelog, and governance files so the course can be taught without a live GitHub session.
33+
Release ZIP `Arduino-Programs-Guide-1.0.3.zip` includes exercises, extras, docs, citation metadata, changelog, and governance files so the course can be taught without a live GitHub session.

docs/lessons/bluetooth-warmup.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,20 @@ Use [`extras/basic-bluetooth-led`](../../extras/basic-bluetooth-led/).
1818
2. Wire the Bluetooth module `TX` to Arduino `RX` (pin 0) and module `RX` to Arduino `TX` (pin 1) only after upload succeeds.
1919
3. Share ground between the module and Arduino.
2020
4. Confirm the module voltage matches the board and module documentation.
21-
5. Disconnect the module from pins 0/1 before every new upload.
21+
5. If the module RX pin is 3.3 V logic (common for HC-05/HC-06 class modules), level-shift Arduino TX before connecting. See [Serial control](../serial-control.md).
22+
6. Disconnect the module from pins 0/1 before every new upload.
2223

2324
## Test procedure
2425

2526
1. Upload the warm-up sketch with the Bluetooth module disconnected from pins 0/1.
2627
2. Open Serial Monitor at 9600 baud and verify LED commands over USB.
27-
3. Power down, connect the Bluetooth module, pair from the host device, and reconnect serial.
28+
3. Power down, connect the Bluetooth module with correct voltage/level shifting, pair from the host device, and reconnect serial.
2829
4. Send the same characters and confirm identical LED behaviour.
2930
5. Disconnect the module before returning to Exercise A uploads.
3031

3132
## Safety and limitations
3233

33-
This warm-up is serial diagnostics only. It does not authorize motor wiring. Keep motor lessons gated behind [Hardware safety](../hardware-safety.md).
34+
This warm-up is serial diagnostics only. It does not authorize motor wiring. Keep motor lessons gated behind [Hardware safety](../hardware-safety.md). Do not drive a 3.3 V RX pin with unshifted 5 V UART.
3435

3536
## Next step
3637

docs/lessons/exercise-d.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ using a different driver may require changing the four logic values.
2323

2424
## Verify
2525

26-
With motor power disconnected, check each driver input and direction LED. With
27-
the vehicle lifted so wheels are clear, connect motor power at low voltage and
26+
With motor power disconnected, check each driver input and direction LED. This
27+
base sketch drives direction pins fully on or off (`digitalWrite`); it does not
28+
yet use PWM enable pins. On boards with ENA/ENB jumpers, remove those jumpers or
29+
keep enable pins at the lowest safe PWM before connecting motor power. With the
30+
vehicle lifted so wheels are clear, connect motor power at low voltage and
2831
verify one direction at a time. Confirm a stop command is accepted while the
2932
reverse LEDs are blinking.
3033

docs/lessons/exercise-f.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,22 @@ a rated dual H-bridge, external supply, protection, and common ground.
2222
## Behavior
2323

2424
`F`, `B`, `L`, and `R` request motion; any other command requests stop. A 50 ms
25-
stop interval occurs before a new direction is energized. Pressing the emergency
25+
stop interval occurs before a new direction is energized. The first motion
26+
command is refused until the speed potentiometer is near its minimum so a
27+
centered or high pot cannot launch motors at full PWM. Pressing the emergency
2628
button stops all motor PWM immediately, flashes the direction LEDs, and discards
2729
the old direction. Releasing the button does not resume motion—a new command is
2830
required.
2931

3032
## Verify
3133

3234
1. Keep motor power disconnected and verify every indicator and driver input.
33-
2. Press emergency stop during every requested direction.
34-
3. Hold the button, send commands, then release it; the motors must remain stopped.
35-
4. Turn the potentiometer through its range and check reported PWM.
36-
5. Secure the vehicle before cautious powered testing.
35+
2. Leave the potentiometer away from minimum and send `F`; the sketch must refuse motion.
36+
3. Turn the potentiometer to minimum, then send a direction and raise speed gradually.
37+
4. Press emergency stop during every requested direction.
38+
5. Hold the button, send commands, then release it; the motors must remain stopped.
39+
6. Turn the potentiometer through its range and check reported PWM.
40+
7. Secure the vehicle before cautious powered testing.
3741

3842
## Challenge
3943

exercises/exercise-f-full-system-integration/exercise-f-full-system-integration.ino

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ constexpr uint8_t kRightB = 9;
1313
constexpr uint8_t kEmergencyButton = 12;
1414
constexpr uint8_t kSpeedPot = A0;
1515
constexpr uint16_t kDirectionDeadTimeMs = 50;
16+
constexpr uint16_t kSoftStartMaxRaw = 40;
1617

1718
enum class Direction : uint8_t { kStop, kForward, kBackward, kLeft, kRight };
1819

@@ -24,6 +25,7 @@ uint32_t telemetryAt = 0;
2425
uint8_t speedPwm = 0;
2526
bool emergencyActive = false;
2627
bool emergencyLightsOn = false;
28+
bool softStartCleared = false;
2729

2830
void stopMotors() {
2931
analogWrite(kLeftA, 0);
@@ -97,23 +99,33 @@ void updateMotors() {
9799
}
98100

99101
void handleCommand(char command) {
102+
Direction next = Direction::kStop;
100103
switch (command) {
101104
case 'F':
102-
requestDirection(Direction::kForward);
105+
next = Direction::kForward;
103106
break;
104107
case 'B':
105-
requestDirection(Direction::kBackward);
108+
next = Direction::kBackward;
106109
break;
107110
case 'L':
108-
requestDirection(Direction::kLeft);
111+
next = Direction::kLeft;
109112
break;
110113
case 'R':
111-
requestDirection(Direction::kRight);
114+
next = Direction::kRight;
112115
break;
113116
default:
114-
requestDirection(Direction::kStop);
117+
next = Direction::kStop;
115118
break;
116119
}
120+
121+
if (next != Direction::kStop && !softStartCleared) {
122+
if (analogRead(kSpeedPot) > kSoftStartMaxRaw) {
123+
Serial.println(F("Turn speed pot to minimum before first motion"));
124+
return;
125+
}
126+
softStartCleared = true;
127+
}
128+
requestDirection(next);
117129
}
118130

119131
const __FlashStringHelper* directionName(Direction direction) {

0 commit comments

Comments
 (0)