Arduino
esp-idf
Our great sponsors
Arduino | esp-idf | |
---|---|---|
96 | 245 | |
15,708 | 12,246 | |
0.8% | 2.5% | |
8.1 | 10.0 | |
6 days ago | 6 days ago | |
C++ | C | |
GNU Lesser General Public License v3.0 only | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Arduino
-
Send and receive message remotely with ESP8266
The result is that the WiFiSecureClient doesn't work when used in the bot declaration, so I changed the variable to WiFiClient but I can't use the certificate, so I comment it out and ESP8266.h gives me a thousand errors due to lack of dependencies in its libraries. I should point out that I downloaded the entire project from the Arduino ESP8266, I don't know how to link all the libraries, so I simply took those from the ESP8266WiFi.
-
Do you have any idea why this program would not work? [ESP32]
#include #include "time.h" #include "sntp.h" char* ssid = "WIFI"; char* password = "w1fi"; const char* ntpServer1 = "pool.ntp.org"; const char* ntpServer2 = "time.nist.gov"; const long gmtOffset_sec = 3600; const int daylightOffset_sec = 3600; const char* time_zone = "CET-1CEST,M3.5.0,M10.5.0/3"; // TimeZone rule for Europe/Rome including daylight adjustment rules (optional) void printLocalTime() { struct tm timeinfo; if(!getLocalTime(&timeinfo)){ Serial.println("No time available (yet)"); return; } Serial.println(&timeinfo, "%A, %B %d %Y %H:%M:%S"); } // Callback function (get's called when time adjusts via NTP) void timeavailable(struct timeval *t) { Serial.println("Got time adjustment from NTP!"); printLocalTime(); } void setup() { Serial.begin(115200); // set notification call-back function sntp_set_time_sync_notification_cb( timeavailable ); /** * NTP server address could be aquired via DHCP, * * NOTE: This call should be made BEFORE esp32 aquires IP address via DHCP, * otherwise SNTP option 42 would be rejected by default. * NOTE: configTime() function call if made AFTER DHCP-client run * will OVERRIDE aquired NTP server address */ //sntp_servermode_dhcp(1); // (optional) /** * This will set configured ntp servers and constant TimeZone/daylightOffset * should be OK if your time zone does not need to adjust daylightOffset twice a year, * in such a case time adjustment won't be handled automagicaly. */ configTime(gmtOffset_sec, daylightOffset_sec, ntpServer1, ntpServer2); /** * A more convenient approach to handle TimeZones with daylightOffset * would be to specify a environmnet variable with TimeZone definition including daylight adjustmnet rules. * A list of rules for your zone could be obtained from https://github.com/esp8266/Arduino/blob/master/cores/esp8266/TZ.h */ //configTzTime(time_zone, ntpServer1, ntpServer2); //connect to WiFi Serial.printf("Connecting to %s ", ssid); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(" CONNECTED"); } void loop() { delay(5000); printLocalTime(); // it will take some time to sync time :) }
- rst cause:2, boot mode:(3,6) ERROR :(
- Very unique color clock! Details on https://www.instructables.com/Pingo-Color-Clock-by-Illusionmanager/
- ESP8266Ping not working with other included libraries
- D1 Mini Pro keeps boot looping when accessing WiFi - what am I doing wrong?
-
Pushbutton timestamp log file
Maybe check out the canonical page instead: https://github.com/esp8266/Arduino
The esp8266 can run its own filesystem. Try to take a look at the following example: https://github.com/esp8266/Arduino/blob/master/libraries/LittleFS/examples/LittleFS_Timestamp/LittleFS_Timestamp.ino
-
Problem installing on Adafruit Feather ESP32-S3
; PlatformIO Project Configuration File [platformio] # ------------------------------------------------------------------------------ # ENVIRONMENTS # ------------------------------------------------------------------------------ # Release / CI binaries default_envs = adafruit_feather_esp32s3 src_dir = ./wled00 data_dir = ./wled00/data build_cache_dir = ~/.buildcache extra_configs = platformio_override.ini [common] # ------------------------------------------------------------------------------ # PLATFORM: # !! DO NOT confuse platformio's ESP8266 development platform with Arduino core for ESP8266 # # arduino core 2.6.3 = platformIO 2.3.2 # arduino core 2.7.0 = platformIO 2.5.0 # ------------------------------------------------------------------------------ arduino_core_2_6_3 = [email protected] arduino_core_2_7_4 = [email protected] arduino_core_3_0_0 = [email protected] arduino_core_3_2_0 = [email protected] # Development platforms arduino_core_develop = https://github.com/platformio/platform-espressif8266#develop arduino_core_git = https://github.com/platformio/platform-espressif8266#feature/stage # Platform to use for ESP8266 platform_wled_default = ${common.arduino_core_3_2_0} # We use 2.7.4.7 for all, includes PWM flicker fix and Wstring optimization platform_packages = tasmota/framework-arduinoespressif8266 @ 3.20704.7 platformio/toolchain-xtensa @ ~2.40802.200502 platformio/tool-esptool @ ~1.413.0 platformio/tool-esptoolpy @ ~1.30000.0 # ------------------------------------------------------------------------------ # FLAGS: DEBUG # # ------------------------------------------------------------------------------ debug_flags = -D DEBUG=1 -D WLED_DEBUG -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM #if needed (for memleaks etc) also add; -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" #-DDEBUG_ESP_CORE is not working right now # ------------------------------------------------------------------------------ # FLAGS: ldscript (available ldscripts at https://github.com/esp8266/Arduino/tree/master/tools/sdk/ld) # ldscript_2m1m (2048 KB) = 1019 KB sketch, 4 KB eeprom, 1004 KB spiffs, 16 KB reserved # ldscript_4m1m (4096 KB) = 1019 KB sketch, 4 KB eeprom, 1002 KB spiffs, 16 KB reserved, 2048 KB empty/ota? # # Available lwIP variants (macros): # -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH = v1.4 Higher Bandwidth (default) # -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY = v2 Lower Memory # -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH = v2 Higher Bandwidth # -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH # # BearSSL performance: # When building with -DSECURE_CLIENT=SECURE_CLIENT_BEARSSL, please add `board_build.f_cpu = 160000000` to the environment configuration # # BearSSL ciphers: # When building on core >= 2.5, you can add the build flag -DBEARSSL_SSL_BASIC in order to build BearSSL with a limited set of ciphers: # TLS_RSA_WITH_AES_128_CBC_SHA256 / AES128-SHA256 # TLS_RSA_WITH_AES_256_CBC_SHA256 / AES256-SHA256 # TLS_RSA_WITH_AES_128_CBC_SHA / AES128-SHA # TLS_RSA_WITH_AES_256_CBC_SHA / AES256-SHA # This reduces the OTA size with ~45KB, so it's especially useful on low memory boards (512k/1m). # ------------------------------------------------------------------------------ build_flags = -DMQTT_MAX_PACKET_SIZE=1024 -DSECURE_CLIENT=SECURE_CLIENT_BEARSSL -DBEARSSL_SSL_BASIC -D CORE_DEBUG_LEVEL=0 -D NDEBUG #build_flags for the IRremoteESP8266 library (enabled decoders have to appear here) -D _IR_ENABLE_DEFAULT_=false -D DECODE_HASH=true -D DECODE_NEC=true -D DECODE_SONY=true -D DECODE_SAMSUNG=true -D DECODE_LG=true ; -Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library -DWLED_USE_MY_CONFIG ; -D USERMOD_SENSORSTOMQTT #For ADS1115 sensor uncomment following ; -D USERMOD_ADS1115 build_unflags = build_flags_esp8266 = ${common.build_flags} ${esp8266.build_flags} build_flags_esp32 = ${common.build_flags} ${esp32.build_flags} ldscript_1m128k = eagle.flash.1m128.ld ldscript_2m512k = eagle.flash.2m512.ld ldscript_2m1m = eagle.flash.2m1m.ld ldscript_4m1m = eagle.flash.4m1m.ld [scripts_defaults] extra_scripts = pre:pio-scripts/set_version.py post:pio-scripts/output_bins.py post:pio-scripts/strip-floats.py pre:pio-scripts/user_config_copy.py # ------------------------------------------------------------------------------ # COMMON SETTINGS: # ------------------------------------------------------------------------------ [env] framework = arduino board_build.flash_mode = dout monitor_speed = 115200 upload_speed = 921600 # ------------------------------------------------------------------------------ # LIBRARIES: required dependencies # Please note that we don't always use the latest version of a library. # # The following libraries have been included (and some of them changd) in the source: # [email protected], [email protected](changed), [email protected](changed), [email protected], [email protected] # ------------------------------------------------------------------------------ lib_compat_mode = strict lib_deps = fastled/FastLED @ 3.5.0 IRremoteESP8266 @ 2.8.2 https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.7 extra_scripts = ${scripts_defaults.extra_scripts} [esp32] #platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.3/platform-espressif32-2.0.2.3.zip platform = [email protected] platform_packages = framework-arduinoespressif32 @ https://github.com/Aircoookie/arduino-esp32.git#1.0.6.4 build_flags = -g -DARDUINO_ARCH_ESP32 ;-DCONFIG_LITTLEFS_FOR_IDF_3_2 -D CONFIG_ASYNC_TCP_USE_WDT=0 #use LITTLEFS library by lorol in ESP32 core 1.x.x instead of built-in in 2.x.x -D LOROL_LITTLEFS default_partitions = tools/WLED_ESP32_4MB_1MB_FS.csv lib_deps = ${env.lib_deps} https://github.com/lorol/LITTLEFS.git makuna/NeoPixelBus @ 2.6.9 https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 [esp32c3] build_flags = -g -DARDUINO_ARCH_ESP32 -DARDUINO_ARCH_ESP32C3 -DCONFIG_IDF_TARGET_ESP32C3 -D CONFIG_ASYNC_TCP_USE_WDT=0 -DCO lib_deps = ${env.lib_deps} makuna/NeoPixelBus @ 2.6.9 https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 [esp32s3] ;; generic definitions for all ESP32-S3 boards build_flags = -g -DESP32 -DARDUINO_ARCH_ESP32 -DARDUINO_ARCH_ESP32S3 -DCONFIG_IDF_TARGET_ESP32S3 -D CONFIG_ASYNC_TCP_USE_WDT=0 -DCO lib_deps = ${env.lib_deps} ;; NeoPixelBus 2.7.1 is the first that has official support for ESP32-S3 makuna/NeoPixelBus @ ~2.7.1 https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 # ------------------------------------------------------------------------------ # WLED BUILDS # ------------------------------------------------------------------------------ [env:esp32c3] platform = [email protected] framework = arduino board = esp32-c3-devkitm-1 board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv build_flags = ${common.build_flags} ${esp32c3.build_flags} #-D WLED_RELEASE_NAME=ESP32-C3 -D WLED_WATCHDOG_TIMEOUT=0 upload_speed = 460800 build_unflags = ${common.build_unflags} lib_deps = ${esp32c3.lib_deps} [env:adafruit_feather_esp32s3] ;; Adafruit ESP32-S3 Feather board, with 4MB FLASH and 2MB PSRAM (memory_type: qio_opi, qio_qspi, or opi_opi) board = adafruit_feather_esp32s3 platform = espressif32 @ ~5.2.0 board_build.f_cpu = 240000000L platform_packages = upload_speed = 921600 build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32s3.build_flags} -D CONFIG_LITTLEFS_FOR_IDF_3_2 -D WLED_WATCHDOG_TIMEOUT=0 -D ARDUINO_USB_MODE=1 -D ARDUINO_USB_MSC_ON_BOOT=0 ; -D ARDUINO_USB_CDC_ON_BOOT=0 ; -D WLED_RELEASE_NAME=ESP32-S3_PSRAM -D WLED_USE_PSRAM -DBOARD_HAS_PSRAM ; tells WLED that PSRAM shall be used ; -D CONFIG_LITTLEFS_SPIFFS_COMPAT=1 ; lib_deps = ${esp32s3.lib_deps} board_build.f_flash = 80000000L board_build.flash_mode = qio monitor_filters = esp32_exception_decoder
-
how to convert ino file to bin file?
You can't convert the ino file to bin. You need to install the ESP8266 addon in the Arduino IDE, then open the sketch and create the bin file. The Nodemcu is also a ESP8266 - you only need 1 bin file. https://github.com/esp8266/Arduino
esp-idf
-
ESP-IDP and pytest markers for supported targets
IDF contains stuff like https://github.com/espressif/esp-idf/blob/master/pytest.ini and https://github.com/espressif/esp-idf/blob/master/tools/ci/idf_pytest/constants.py which are not part of the pytest-embedded package.
-
Unveiling secrets of the ESP32: creating an open-source Mac layer
ugh.. arduino.
Better to start with ESP-IDF, there's a pretty full featured well documented web server, and a lot more.
https://github.com/espressif/esp-idf/tree/master/examples/pr...
-
ESP32-S3 Usb host hid
Hi, I have device ESP32-S3-DevKitM-1 and i want to catch keystrokes from keyboard. I tried using this https://github.com/tanakamasayuki/EspUsbHost and example from espressif https://github.com/espressif/esp-idf/tree/release/v5.1/examples/peripherals/usb/host/hid/main but when i connect keyboard it is just connecting and disconnecting. Can anyone help me with this?
-
Using ESP32C6 to run wifi and Thread simultaneously
According to this page, coexistence of WiFi and 802.15.4 is now supported. Thread is based on 802.15.4.
The example: https://github.com/espressif/esp-idf/tree/master/examples/openthread/ot_br "The example could also run on a single SoC which supports both Wi-Fi and Thread (e.g., ESP32-C6), but since there is only one RF path in ESP32-C6, which means Wi-Fi and Thread can't receive simultaneously, it has a significant impact on performance. Hence the two SoCs solution is recommended."
- How to Master Esp32
-
ESP32-C3 Wireless Adventure: A Comprehensive Guide to IoT [pdf]
The latest, but it was a few months ago. The results were off by 400 meters, and many persons have the same problems : https://github.com/espressif/esp-idf/issues/8976
-
ESP32 i2c (BMP280) not working with ESP-IDF but OK with Arduino IDE
Use an official I2C example form the IDF. Like this: https://github.com/espressif/esp-idf/blob/master/examples/peripherals/i2c/i2c_simple/main/i2c_simple_main.c I’stand corrected with respect to the call order, it appears the driver install comes later. Your speed is unusually low, use the default speed of 400K. If you still get the error in the setup, use the source: the IDF is fully source distributed. Look into the implementation of the function, which errors occur form which code parts. Use ESP_LOGE or similar calls to get output messages on where you are getting to within the code. So that you learn where it’s expectations aren’t met.
-
How to analyse binary coredump
You'll need the core dump and the ELF file, assuming you have them both, you will need espcoredump.py (Github), but it's easier to install the whole ESP-IDF (docs.esspressif.com) package as the coredump tool has dependencies.
-
Reading external USB mass storage
I habe: https://github.com/espressif/esp-idf/tree/efe919275e8f4516ffd5f99f9a59e9d3efbae281/examples/peripherals/usb/host/msc
What are some alternatives?
arduino-esp32 - Arduino core for the ESP32
MicroPython - MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems
ESP8266_RTOS_SDK - Latest ESP8266 SDK based on FreeRTOS, esp-idf style.
WiFiManager - ESP8266 WiFi Connection manager with web captive portal
WLED - Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
Unity Test API - Simple Unit Testing for C
u8g2 - U8glib library for monochrome displays, version 2
esptool-js - Javascript implementation of flasher tool for Espressif chips, running in web browser using WebSerial.
esp32-wifi-penetration-tool - Exploring possibilities of ESP32 platform to attack on nearby Wi-Fi networks.
wolfssl - The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3!
ESP32-W5100 - PoC app to test W5100 integration to esp-idf
ElegantOTA - OTA updates made slick and simple for everyone!