Skocz do zawartości

Nauka ESP32


Michal88

Pomocna odpowiedź

Cześć,

temat podobny był dyskutowany na forum - może ten wątek będzie pomocny:

Gdy kolega wpisze w wyszukiwarkę forum "ESP32" powinno się wyświetlić całkiem sporo wątków.

Pozdrawiam

Edytowano przez FlyingDutch
update
Link do komentarza
Share on other sites

No masz tam w tym watku napisane ze na poczatek to arduino IDE najlepsze...przyklady? Podobno 90% bibliotek dziala z esp wiec chyba problemu nie ma z przykladami...bardziej zaawansowanych funkcji uczysz sie na bierzaco z IDF...

Link do komentarza
Share on other sites

Zarejestruj się lub zaloguj, aby ukryć tę reklamę.
Zarejestruj się lub zaloguj, aby ukryć tę reklamę.

jlcpcb.jpg

jlcpcb.jpg

Produkcja i montaż PCB - wybierz sprawdzone PCBWay!
   • Darmowe płytki dla studentów i projektów non-profit
   • Tylko 5$ za 10 prototypów PCB w 24 godziny
   • Usługa projektowania PCB na zlecenie
   • Montaż PCB od 30$ + bezpłatna dostawa i szablony
   • Darmowe narzędzie do podglądu plików Gerber
Zobacz również » Film z fabryki PCBWay

A co do przykładów - jak zainstalujesz Arduino IDE i płytkę ESP32 to przykłady będziesz miał w menu Plik -> Przykłady (również dla bibliotek specyficznych dla ESP o ile takie zainstalujesz).

Link do komentarza
Share on other sites

Próbowałem miganie wbudowaną diodą na esp, ale nie działa. To nie do końca prz,ykłady z arduino działają na esp

 

/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}
Building in: C:\Users\micha\eclipse-workspace\n\build
cmake --build . -- -v
[1/8] cmd.exe /C "cd /D C:\Users\micha\eclipse-workspace\n\build\bootloader && C:\Users\micha\.espressif\tools\cmake\3.16.4\bin\cmake.exe --build ."
ninja: no work to do.
[2/6] ccache C:\Users\micha\.espressif\tools\xtensa-esp32-elf\esp-2021r2-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -Iconfig -IC:/Users/micha/Desktop/esp-idf/components/newlib/platform_include -IC:/Users/micha/Desktop/esp-idf/components/freertos/include -IC:/Users/micha/Desktop/esp-idf/components/freertos/port/xtensa/include -IC:/Users/micha/Desktop/esp-idf/components/esp_hw_support/include -IC:/Users/micha/Desktop/esp-idf/components/esp_hw_support/port/esp32/. -IC:/Users/micha/Desktop/esp-idf/components/heap/include -IC:/Users/micha/Desktop/esp-idf/components/log/include -IC:/Users/micha/Desktop/esp-idf/components/lwip/include/apps -IC:/Users/micha/Desktop/esp-idf/components/lwip/include/apps/sntp -IC:/Users/micha/Desktop/esp-idf/components/lwip/lwip/src/include -IC:/Users/micha/Desktop/esp-idf/components/lwip/port/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/lwip/port/esp32/include/arch -IC:/Users/micha/Desktop/esp-idf/components/soc/include -IC:/Users/micha/Desktop/esp-idf/components/soc/esp32/. -IC:/Users/micha/Desktop/esp-idf/components/soc/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/hal/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/hal/include -IC:/Users/micha/Desktop/esp-idf/components/esp_rom/include -IC:/Users/micha/Desktop/esp-idf/components/esp_rom/esp32 -IC:/Users/micha/Desktop/esp-idf/components/esp_rom/include/esp32 -IC:/Users/micha/Desktop/esp-idf/components/esp_common/include -IC:/Users/micha/Desktop/esp-idf/components/esp_system/include -IC:/Users/micha/Desktop/esp-idf/components/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/driver/include -IC:/Users/micha/Desktop/esp-idf/components/driver/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/esp_ringbuf/include -IC:/Users/micha/Desktop/esp-idf/components/efuse/include -IC:/Users/micha/Desktop/esp-idf/components/efuse/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/xtensa/include -IC:/Users/micha/Desktop/esp-idf/components/xtensa/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/espcoredump/include -IC:/Users/micha/Desktop/esp-idf/components/esp_timer/include -IC:/Users/micha/Desktop/esp-idf/components/esp_ipc/include -IC:/Users/micha/Desktop/esp-idf/components/esp_pm/include -IC:/Users/micha/Desktop/esp-idf/components/vfs/include -IC:/Users/micha/Desktop/esp-idf/components/esp_wifi/include -IC:/Users/micha/Desktop/esp-idf/components/esp_wifi/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/esp_event/include -IC:/Users/micha/Desktop/esp-idf/components/esp_netif/include -IC:/Users/micha/Desktop/esp-idf/components/esp_eth/include -IC:/Users/micha/Desktop/esp-idf/components/tcpip_adapter/include -IC:/Users/micha/Desktop/esp-idf/components/app_trace/include -IC:/Users/micha/Desktop/esp-idf/components/mbedtls/port/include -IC:/Users/micha/Desktop/esp-idf/components/mbedtls/mbedtls/include -IC:/Users/micha/Desktop/esp-idf/components/mbedtls/esp_crt_bundle/include -IC:/Users/micha/Desktop/esp-idf/components/app_update/include -IC:/Users/micha/Desktop/esp-idf/components/spi_flash/include -IC:/Users/micha/Desktop/esp-idf/components/bootloader_support/include -IC:/Users/micha/Desktop/esp-idf/components/nvs_flash/include -IC:/Users/micha/Desktop/esp-idf/components/pthread/include -IC:/Users/micha/Desktop/esp-idf/components/esp_gdbstub/include -IC:/Users/micha/Desktop/esp-idf/components/esp_gdbstub/xtensa -IC:/Users/micha/Desktop/esp-idf/components/esp_gdbstub/esp32 -IC:/Users/micha/Desktop/esp-idf/components/wpa_supplicant/include -IC:/Users/micha/Desktop/esp-idf/components/wpa_supplicant/port/include -IC:/Users/micha/Desktop/esp-idf/components/wpa_supplicant/include/esp_supplicant -IC:/Users/micha/Desktop/esp-idf/components/perfmon/include -IC:/Users/micha/Desktop/esp-idf/components/asio/asio/asio/include -IC:/Users/micha/Desktop/esp-idf/components/asio/port/include -IC:/Users/micha/Desktop/esp-idf/components/cbor/port/include -IC:/Users/micha/Desktop/esp-idf/components/unity/include -IC:/Users/micha/Desktop/esp-idf/components/unity/unity/src -IC:/Users/micha/Desktop/esp-idf/components/cmock/CMock/src -IC:/Users/micha/Desktop/esp-idf/components/coap/port/include -IC:/Users/micha/Desktop/esp-idf/components/coap/port/include/coap -IC:/Users/micha/Desktop/esp-idf/components/coap/libcoap/include -IC:/Users/micha/Desktop/esp-idf/components/coap/libcoap/include/coap2 -IC:/Users/micha/Desktop/esp-idf/components/console -IC:/Users/micha/Desktop/esp-idf/components/nghttp/port/include -IC:/Users/micha/Desktop/esp-idf/components/nghttp/nghttp2/lib/includes -IC:/Users/micha/Desktop/esp-idf/components/esp-tls -IC:/Users/micha/Desktop/esp-idf/components/esp-tls/esp-tls-crypto -IC:/Users/micha/Desktop/esp-idf/components/esp_adc_cal/include -IC:/Users/micha/Desktop/esp-idf/components/esp_hid/include -IC:/Users/micha/Desktop/esp-idf/components/tcp_transport/include -IC:/Users/micha/Desktop/esp-idf/components/esp_http_client/include -IC:/Users/micha/Desktop/esp-idf/components/esp_http_server/include -IC:/Users/micha/Desktop/esp-idf/components/esp_https_ota/include -IC:/Users/micha/Desktop/esp-idf/components/protobuf-c/protobuf-c -IC:/Users/micha/Desktop/esp-idf/components/protocomm/include/common -IC:/Users/micha/Desktop/esp-idf/components/protocomm/include/security -IC:/Users/micha/Desktop/esp-idf/components/protocomm/include/transports -IC:/Users/micha/Desktop/esp-idf/components/mdns/include -IC:/Users/micha/Desktop/esp-idf/components/esp_local_ctrl/include -IC:/Users/micha/Desktop/esp-idf/components/sdmmc/include -IC:/Users/micha/Desktop/esp-idf/components/esp_serial_slave_link/include -IC:/Users/micha/Desktop/esp-idf/components/esp_websocket_client/include -IC:/Users/micha/Desktop/esp-idf/components/expat/expat/expat/lib -IC:/Users/micha/Desktop/esp-idf/components/expat/port/include -IC:/Users/micha/Desktop/esp-idf/components/wear_levelling/include -IC:/Users/micha/Desktop/esp-idf/components/fatfs/diskio -IC:/Users/micha/Desktop/esp-idf/components/fatfs/vfs -IC:/Users/micha/Desktop/esp-idf/components/fatfs/src -IC:/Users/micha/Desktop/esp-idf/components/freemodbus/common/include -IC:/Users/micha/Desktop/esp-idf/components/idf_test/include -IC:/Users/micha/Desktop/esp-idf/components/idf_test/include/esp32 -IC:/Users/micha/Desktop/esp-idf/components/jsmn/include -IC:/Users/micha/Desktop/esp-idf/components/json/cJSON -IC:/Users/micha/Desktop/esp-idf/components/libsodium/libsodium/src/libsodium/include -IC:/Users/micha/Desktop/esp-idf/components/libsodium/port_include -IC:/Users/micha/Desktop/esp-idf/components/mqtt/esp-mqtt/include -IC:/Users/micha/Desktop/esp-idf/components/openssl/include -IC:/Users/micha/Desktop/esp-idf/components/spiffs/include -IC:/Users/micha/Desktop/esp-idf/components/ulp/include -IC:/Users/micha/Desktop/esp-idf/components/wifi_provisioning/include -mlongcalls -Wno-frame-address   -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.3.2\" -DESP_PLATFORM -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\main.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj   -c ../main/main.c
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj 
ccache C:\Users\micha\.espressif\tools\xtensa-esp32-elf\esp-2021r2-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -Iconfig -IC:/Users/micha/Desktop/esp-idf/components/newlib/platform_include -IC:/Users/micha/Desktop/esp-idf/components/freertos/include -IC:/Users/micha/Desktop/esp-idf/components/freertos/port/xtensa/include -IC:/Users/micha/Desktop/esp-idf/components/esp_hw_support/include -IC:/Users/micha/Desktop/esp-idf/components/esp_hw_support/port/esp32/. -IC:/Users/micha/Desktop/esp-idf/components/heap/include -IC:/Users/micha/Desktop/esp-idf/components/log/include -IC:/Users/micha/Desktop/esp-idf/components/lwip/include/apps -IC:/Users/micha/Desktop/esp-idf/components/lwip/include/apps/sntp -IC:/Users/micha/Desktop/esp-idf/components/lwip/lwip/src/include -IC:/Users/micha/Desktop/esp-idf/components/lwip/port/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/lwip/port/esp32/include/arch -IC:/Users/micha/Desktop/esp-idf/components/soc/include -IC:/Users/micha/Desktop/esp-idf/components/soc/esp32/. -IC:/Users/micha/Desktop/esp-idf/components/soc/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/hal/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/hal/include -IC:/Users/micha/Desktop/esp-idf/components/esp_rom/include -IC:/Users/micha/Desktop/esp-idf/components/esp_rom/esp32 -IC:/Users/micha/Desktop/esp-idf/components/esp_rom/include/esp32 -IC:/Users/micha/Desktop/esp-idf/components/esp_common/include -IC:/Users/micha/Desktop/esp-idf/components/esp_system/include -IC:/Users/micha/Desktop/esp-idf/components/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/driver/include -IC:/Users/micha/Desktop/esp-idf/components/driver/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/esp_ringbuf/include -IC:/Users/micha/Desktop/esp-idf/components/efuse/include -IC:/Users/micha/Desktop/esp-idf/components/efuse/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/xtensa/include -IC:/Users/micha/Desktop/esp-idf/components/xtensa/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/espcoredump/include -IC:/Users/micha/Desktop/esp-idf/components/esp_timer/include -IC:/Users/micha/Desktop/esp-idf/components/esp_ipc/include -IC:/Users/micha/Desktop/esp-idf/components/esp_pm/include -IC:/Users/micha/Desktop/esp-idf/components/vfs/include -IC:/Users/micha/Desktop/esp-idf/components/esp_wifi/include -IC:/Users/micha/Desktop/esp-idf/components/esp_wifi/esp32/include -IC:/Users/micha/Desktop/esp-idf/components/esp_event/include -IC:/Users/micha/Desktop/esp-idf/components/esp_netif/include -IC:/Users/micha/Desktop/esp-idf/components/esp_eth/include -IC:/Users/micha/Desktop/esp-idf/components/tcpip_adapter/include -IC:/Users/micha/Desktop/esp-idf/components/app_trace/include -IC:/Users/micha/Desktop/esp-idf/components/mbedtls/port/include -IC:/Users/micha/Desktop/esp-idf/components/mbedtls/mbedtls/include -IC:/Users/micha/Desktop/esp-idf/components/mbedtls/esp_crt_bundle/include -IC:/Users/micha/Desktop/esp-idf/components/app_update/include -IC:/Users/micha/Desktop/esp-idf/components/spi_flash/include -IC:/Users/micha/Desktop/esp-idf/components/bootloader_support/include -IC:/Users/micha/Desktop/esp-idf/components/nvs_flash/include -IC:/Users/micha/Desktop/esp-idf/components/pthread/include -IC:/Users/micha/Desktop/esp-idf/components/esp_gdbstub/include -IC:/Users/micha/Desktop/esp-idf/components/esp_gdbstub/xtensa -IC:/Users/micha/Desktop/esp-idf/components/esp_gdbstub/esp32 -IC:/Users/micha/Desktop/esp-idf/components/wpa_supplicant/include -IC:/Users/micha/Desktop/esp-idf/components/wpa_supplicant/port/include -IC:/Users/micha/Desktop/esp-idf/components/wpa_supplicant/include/esp_supplicant -IC:/Users/micha/Desktop/esp-idf/components/perfmon/include -IC:/Users/micha/Desktop/esp-idf/components/asio/asio/asio/include -IC:/Users/micha/Desktop/esp-idf/components/asio/port/include -IC:/Users/micha/Desktop/esp-idf/components/cbor/port/include -IC:/Users/micha/Desktop/esp-idf/components/unity/include -IC:/Users/micha/Desktop/esp-idf/components/unity/unity/src -IC:/Users/micha/Desktop/esp-idf/components/cmock/CMock/src -IC:/Users/micha/Desktop/esp-idf/components/coap/port/include -IC:/Users/micha/Desktop/esp-idf/components/coap/port/include/coap -IC:/Users/micha/Desktop/esp-idf/components/coap/libcoap/include -IC:/Users/micha/Desktop/esp-idf/components/coap/libcoap/include/coap2 -IC:/Users/micha/Desktop/esp-idf/components/console -IC:/Users/micha/Desktop/esp-idf/components/nghttp/port/include -IC:/Users/micha/Desktop/esp-idf/components/nghttp/nghttp2/lib/includes -IC:/Users/micha/Desktop/esp-idf/components/esp-tls -IC:/Users/micha/Desktop/esp-idf/components/esp-tls/esp-tls-crypto -IC:/Users/micha/Desktop/esp-idf/components/esp_adc_cal/include -IC:/Users/micha/Desktop/esp-idf/components/esp_hid/include -IC:/Users/micha/Desktop/esp-idf/components/tcp_transport/include -IC:/Users/micha/Desktop/esp-idf/components/esp_http_client/include -IC:/Users/micha/Desktop/esp-idf/components/esp_http_server/include -IC:/Users/micha/Desktop/esp-idf/components/esp_https_ota/include -IC:/Users/micha/Desktop/esp-idf/components/protobuf-c/protobuf-c -IC:/Users/micha/Desktop/esp-idf/components/protocomm/include/common -IC:/Users/micha/Desktop/esp-idf/components/protocomm/include/security -IC:/Users/micha/Desktop/esp-idf/components/protocomm/include/transports -IC:/Users/micha/Desktop/esp-idf/components/mdns/include -IC:/Users/micha/Desktop/esp-idf/components/esp_local_ctrl/include -IC:/Users/micha/Desktop/esp-idf/components/sdmmc/include -IC:/Users/micha/Desktop/esp-idf/components/esp_serial_slave_link/include -IC:/Users/micha/Desktop/esp-idf/components/esp_websocket_client/include -IC:/Users/micha/Desktop/esp-idf/components/expat/expat/expat/lib -IC:/Users/micha/Desktop/esp-idf/components/expat/port/include -IC:/Users/micha/Desktop/esp-idf/components/wear_levelling/include -IC:/Users/micha/Desktop/esp-idf/components/fatfs/diskio -IC:/Users/micha/Desktop/esp-idf/components/fatfs/vfs -IC:/Users/micha/Desktop/esp-idf/components/fatfs/src -IC:/Users/micha/Desktop/esp-idf/components/freemodbus/common/include -IC:/Users/micha/Desktop/esp-idf/components/idf_test/include -IC:/Users/micha/Desktop/esp-idf/components/idf_test/include/esp32 -IC:/Users/micha/Desktop/esp-idf/components/jsmn/include -IC:/Users/micha/Desktop/esp-idf/components/json/cJSON -IC:/Users/micha/Desktop/esp-idf/components/libsodium/libsodium/src/libsodium/include -IC:/Users/micha/Desktop/esp-idf/components/libsodium/port_include -IC:/Users/micha/Desktop/esp-idf/components/mqtt/esp-mqtt/include -IC:/Users/micha/Desktop/esp-idf/components/openssl/include -IC:/Users/micha/Desktop/esp-idf/components/spiffs/include -IC:/Users/micha/Desktop/esp-idf/components/ulp/include -IC:/Users/micha/Desktop/esp-idf/components/wifi_provisioning/include -mlongcalls -Wno-frame-address   -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.3.2\" -DESP_PLATFORM -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\main.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj   -c ../main/main.c
../main/main.c: In function 'app_main':
../main/main.c:28:20: error: 'BLINK_GPIO' undeclared (first use in this function); did you mean 'LINK_MAX'?
     gpio_reset_pin(BLINK_GPIO);
                    ^~~~~~~~~~
                    LINK_MAX
../main/main.c:28:20: note: each undeclared identifier is reported only once for each function it appears in
ninja: build stopped: subcommand failed.
Build complete (1 errors, 0 warnings): C:\Users\micha\eclipse-workspace\n\build
Total time taken to build the project: 2 743 ms

 

Link do komentarza
Share on other sites

(edytowany)
Szkic używa 207021 bajtów (15%) pamięci programu. Maksimum to 1310720 bajtów.
Zmienne globalne używają 16220 bajtów (4%) pamięci dynamicznej, pozostawiając 311460 bajtów dla zmiennych lokalnych. Maksimum to 327680 bajtów.
esptool.py v3.1
Serial port COM3
Connecting....
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: ec:94:cb:4a:4e:e0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00010000 to 0x00042fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 931.8 kbit/s)...
Hash of data verified.
Compressed 17104 bytes to 11804...
Writing at 0x00001000... (100 %)
Wrote 17104 bytes (11804 compressed) at 0x00001000 in 0.3 seconds (effective 436.4 kbit/s)...
Hash of data verified.
Compressed 207408 bytes to 112891...
Writing at 0x00010000... (14 %)
Writing at 0x0001d65d... (28 %)
Writing at 0x000229eb... (42 %)
Writing at 0x00027bc4... (57 %)
Writing at 0x0002dd49... (71 %)
Writing at 0x00038259... (85 %)
Writing at 0x0003da19... (100 %)
Wrote 207408 bytes (112891 compressed) at 0x00010000 in 1.7 seconds (effective 964.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 554.6 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Dalej nie miga

 

C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino: In function 'void setup()':
Blink:28:11: error: 'LED_BUILTIN' was not declared in this scope
   pinMode(LED_BUILTIN, OUTPUT);
           ^~~~~~~~~~~
C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino: In function 'void loop()':
Blink:33:16: error: 'LED_BUILTIN' was not declared in this scope
   digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
                ^~~~~~~~~~~
exit status 1
'LED_BUILTIN' was not declared in this scope

 

Edytowano przez Michal88
Link do komentarza
Share on other sites

Masz właściwą płytkę ustawioną? Bo dioda jest podłączona do różnych pinów w różnych płytkach, a program się ładnie skompilował i załadował do flasha.

Ew. zamień LED_BUILTIN na właściwy numer pinu GPIO.

Link do komentarza
Share on other sites

@_LM_ to ja już nie wiem co mu się skompilowało 😞

BTW. w plikach *.ino nagłówek Arduino.h dołączany jest automatycznie (ale nie w plikach *.cpp)

Edytowano przez ethanak
Link do komentarza
Share on other sites

Bądź aktywny - zaloguj się lub utwórz konto!

Tylko zarejestrowani użytkownicy mogą komentować zawartość tej strony

Utwórz konto w ~20 sekund!

Zarejestruj nowe konto, to proste!

Zarejestruj się »

Zaloguj się

Posiadasz własne konto? Użyj go!

Zaloguj się »
×
×
  • Utwórz nowe...

Ważne informacje

Ta strona używa ciasteczek (cookies), dzięki którym może działać lepiej. Więcej na ten temat znajdziesz w Polityce Prywatności.