Arduino
u8g2
Our great sponsors
Arduino | u8g2 | |
---|---|---|
96 | 39 | |
15,744 | 4,725 | |
0.6% | - | |
8.1 | 8.7 | |
7 days ago | 16 days ago | |
C++ | C | |
GNU Lesser General Public License v3.0 only | GNU General Public License v3.0 or later |
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
u8g2
- DIY Mahjong Scorer Guide with Chito - mahjongAsst
-
Library design that is not fixed to a specific mcu
I have been considering two different methods for achieving this. The first method is the one that Olikraus uses with the u8x8 library, which implements a callback system that handles the hardware abstraction layer. The second method that I have been contemplating is using i2cdev, which allows for sharing the i2c port with other threads.
-
Sketch - Cardboard - Improved cardboard. Next step: Laser cut case
I use the u8x8 library (https://github.com/olikraus/u8g2/wiki/u8x8reference) for the display. I like this library a lot!
- 128x64 OLED display not working properly
-
New crate for embedded-graphics: U8g2-fonts (feedback desired)
I rewrote the font subsystem of U8g2 in pure Rust, introducing a large number of fonts to embedded-graphics.
-
SSD1306 : Library for text filling display scrolling like the Windows console?
Did you try the U8log option for U8G2? https://github.com/olikraus/u8g2/wiki/u8logreference
-
Question about dumping u8g2 screen buffer to file as image
I found this sketch here which dumps the image to the serial port: https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8g2_full_buffer/ScreenShot/ScreenShot.ino
- I made it as symmetry as possible with two I2C ports.
-
Standard algorithm for scrolling content in embedded systems? (ESP32 IDF)(u8g2 lib)
I'm actually using the SLG12864K with the ST7567 controller I guess all scrolling will have to be done in software as I assume the hardware doesn't support that, also what draw mode are you talking about? I tried using this FontMode But with no luck just doesn't work... (BTW I'm coding in C)
Sorry i used the wrong terminology, should have been draw color https://github.com/olikraus/u8g2/wiki/u8g2reference#setdrawcolor As stated before if its just text and scrolled in rows of text then its easiest/least memory intensive to have a big text buffer and render the section. But if heavily graphical you you could switch u8g2 into dynamic memory allocation where you have to allocate the buffer yourself and tell u8g2 where that is https://github.com/olikraus/u8g2/wiki/u8g2reference#setbufferptr
What are some alternatives?
TFT_eSPI - Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips
u8g2-hal-esp-idf - U8g2 compatibility component for esp-idf on ESP32
ESP8266_RTOS_SDK - Latest ESP8266 SDK based on FreeRTOS, esp-idf style.
ESP8266-Google-Calendar-Arduino - Interaction between an ESP8266 and the Google Calendar.
SparkFun_Micro_OLED_Arduino_Library - Arduino library for the SparkFun Micro OLED - a breakout board for a monochrome, 0.66", 64x48 OLED display.
SPI_LCD - A simple C library for directly communicating with SPI-connected LCD displays
ESP8266_NONOS_SDK - ESP8266 nonOS SDK
esp-honeypot - Simple ESP8266 / ESP32 Canary that simulates predefined application server and notifies you using E-mail, Telegram, etc if it was accessed.
brzo_i2c - Brzo I2C is a fast I2C Implementation written in Assembly for the esp8266
esp-idf - Espressif IoT Development Framework. Official development framework for Espressif SoCs.
ArduinoCore-avr - The Official Arduino AVR core
WiFiManager - ESP8266 WiFi Connection manager with web captive portal