diff options
| author | Louis Burda <quent.burda@gmail.com> | 2024-08-30 01:18:03 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2024-08-30 01:18:07 +0200 |
| commit | cce1d1606b87f572cfe5bb7b740d30d416685b2c (patch) | |
| tree | fe090f9341aa7cdd88cdfdf59e2c2b39fd0d067d /firmware | |
| parent | 0b31c27e0007a88d1f84c5f098956684917b8760 (diff) | |
| download | desk-andon-cce1d1606b87f572cfe5bb7b740d30d416685b2c.tar.gz desk-andon-cce1d1606b87f572cfe5bb7b740d30d416685b2c.zip | |
Rev 0
Diffstat (limited to 'firmware')
| -rwxr-xr-x | firmware/activate.sh | 3 | ||||
| -rw-r--r-- | firmware/src/main/hello_world_main.c | 11 |
2 files changed, 9 insertions, 5 deletions
diff --git a/firmware/activate.sh b/firmware/activate.sh index 4f03eda..e747220 100755 --- a/firmware/activate.sh +++ b/firmware/activate.sh @@ -1,5 +1,8 @@ #!/bin/sh +deactivate || true + +export IDF_TOOLS_PATH="$PWD/idf-tools" pushd esp-idf . ./export.sh popd diff --git a/firmware/src/main/hello_world_main.c b/firmware/src/main/hello_world_main.c index 1222e05..2305439 100644 --- a/firmware/src/main/hello_world_main.c +++ b/firmware/src/main/hello_world_main.c @@ -7,14 +7,15 @@ void app_main(void) { - gpio_reset_pin(3); - gpio_set_direction(3, GPIO_MODE_OUTPUT); + gpio_reset_pin(5); + gpio_set_direction(5, GPIO_MODE_OUTPUT_OD); + int i = 0; while (1) { - printf("Hello world!\n"); + printf("Hello world! %i\n", ++i); fflush(stdout); - gpio_set_level(3, 1); + gpio_set_level(5, 1); vTaskDelay(1000 / portTICK_PERIOD_MS); - gpio_set_level(3, 0); + gpio_set_level(5, 0); vTaskDelay(1000 / portTICK_PERIOD_MS); } } |
