Skip to content

Commit 9fcf2ba

Browse files
committed
Add startup blink
1 parent b3bf9a3 commit 9fcf2ba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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)