Skip to content

Commit

Permalink
Blink on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
u1f992 committed Nov 21, 2023
1 parent ef4f50a commit 80286e6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
7 changes: 4 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:pico]
[env:debug]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
framework = arduino
board_build.core = earlephilhower
debug_tool = cmsis-dap

[env:picow]
[env:release]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = rpipicow
board = pico
framework = arduino
board_build.core = earlephilhower
debug_tool = cmsis-dap
build_flags = -DNDEBUG
16 changes: 15 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static void reflect_state(NxamfGamepadState *state)
async_led_on_for_100ms();

mutex_enter_blocking(&d_mutex);

d.report.y = (uint8_t)state->y;
d.report.b = (uint8_t)state->b;
d.report.a = (uint8_t)state->a;
Expand Down Expand Up @@ -293,6 +293,20 @@ void setup()

pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);

// Blink if the setup routine succeeded.
digitalWrite(LED_BUILTIN, HIGH);
delay(200);
digitalWrite(LED_BUILTIN, LOW);
delay(200);
digitalWrite(LED_BUILTIN, HIGH);
delay(200);
digitalWrite(LED_BUILTIN, LOW);
delay(200);
digitalWrite(LED_BUILTIN, HIGH);
delay(200);
digitalWrite(LED_BUILTIN, LOW);
delay(200);
}

void loop()
Expand Down

0 comments on commit 80286e6

Please sign in to comment.