Skip to content

Commit 1646c46

Browse files
authored
Merge pull request #288 from hackclub/touch-up-firmware
Improve packing & testing for rp2040
2 parents f38eb1d + 2938947 commit 1646c46

File tree

9 files changed

+8266
-8302
lines changed

9 files changed

+8266
-8302
lines changed

docs/packaging/PACKING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ The electronics box should contain:
8888

8989
**Testing**
9090

91-
To test the electonics, plug the steppers and servo into the main board, and try to run any of the art examples in the gallery. [^1]
91+
To test the electonics, plug the steppers and servo into the main board, and try to run any of the art examples in the gallery.[^0][^1]
9292

93+
[^0]: Your xiao rp2040 will flash 3 times on it's red LED if flashed.
9394
[^1]: If your xiao rp2040 isn't flashed, or acting strangly, use the flashing instructions provided in [the hardware instructions](../../hardware/motor-control-board/SETUP.md).
9495

9596
The computer should connect properly to the board.

hardware/motor-control-board/SETUP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ To select the port, go to **Tools** > **Port** and select the serial port name o
4444
> - AccelStepper (by Mike McCauley)
4545
> - osap (by Jake Robert Read)
4646
47-
1. Copy the Arduino code from the respective firmware file (found in [`./firmwares`](./firmwares/)) into your IDE and upload to your board.
47+
1. Copy the Arduino code from the respective firmware file (found in [`./firmware`](./firmware/)) into your IDE and upload to your board.
4848

4949
> The firmware is very fresh and poorly documented (and rapidly changing). Ask in #haxidraw-developemnt for a link to the latest version.
5050
Binary file not shown.
Binary file not shown.

hardware/motor-control-board/firmware/build/rp2040.rp2040.seeed_xiao_rp2040/firmware.ino.map

Lines changed: 0 additions & 8300 deletions
This file was deleted.

hardware/motor-control-board/firmware/build/rp2040.rp2040.seeed_xiao_rp2040/firmware.map

Lines changed: 8251 additions & 0 deletions
Large diffs are not rendered by default.

hardware/motor-control-board/firmware/firmware.ino

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,24 @@ void setup() {
4343
pinMode(enablePin, OUTPUT); // enable pin
4444

4545
pinMode(PIN_LED, OUTPUT);
46+
47+
startupIndicator(); // once startup is finished, indicate to user
4648
}
4749

4850
void loop() {
4951
readSerial();
5052
}
5153

54+
void startupIndicator() {
55+
// flash LED to indicate board is initialized
56+
for (int i = 0; i < 3; i++) {
57+
digitalWrite(PIN_LED, 0);
58+
delay(200);
59+
digitalWrite(PIN_LED, 1);
60+
delay(200);
61+
}
62+
}
63+
5264
uint8_t onLight(uint8_t* payload, int length, uint8_t* reply) {
5365
uint8_t value = payload[0];
5466

0 commit comments

Comments
 (0)