Skip to content

Commit

Permalink
Merge pull request #288 from hackclub/touch-up-firmware
Browse files Browse the repository at this point in the history
Improve packing & testing for rp2040
  • Loading branch information
maxwofford authored Feb 14, 2024
2 parents f38eb1d + 2938947 commit 1646c46
Show file tree
Hide file tree
Showing 9 changed files with 8,266 additions and 8,302 deletions.
3 changes: 2 additions & 1 deletion docs/packaging/PACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ The electronics box should contain:

**Testing**

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]
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]

[^0]: Your xiao rp2040 will flash 3 times on it's red LED if flashed.
[^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).

The computer should connect properly to the board.
Expand Down
2 changes: 1 addition & 1 deletion hardware/motor-control-board/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ To select the port, go to **Tools** > **Port** and select the serial port name o
> - AccelStepper (by Mike McCauley)
> - osap (by Jake Robert Read)
1. Copy the Arduino code from the respective firmware file (found in [`./firmwares`](./firmwares/)) into your IDE and upload to your board.
1. Copy the Arduino code from the respective firmware file (found in [`./firmware`](./firmware/)) into your IDE and upload to your board.

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

This file was deleted.

Large diffs are not rendered by default.

Binary file not shown.
12 changes: 12 additions & 0 deletions hardware/motor-control-board/firmware/firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,24 @@ void setup() {
pinMode(enablePin, OUTPUT); // enable pin

pinMode(PIN_LED, OUTPUT);

startupIndicator(); // once startup is finished, indicate to user
}

void loop() {
readSerial();
}

void startupIndicator() {
// flash LED to indicate board is initialized
for (int i = 0; i < 3; i++) {
digitalWrite(PIN_LED, 0);
delay(200);
digitalWrite(PIN_LED, 1);
delay(200);
}
}

uint8_t onLight(uint8_t* payload, int length, uint8_t* reply) {
uint8_t value = payload[0];

Expand Down

0 comments on commit 1646c46

Please sign in to comment.