-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heltec SSD1306 Display Support #1277
Heltec SSD1306 Display Support #1277
Conversation
My environment [env:heltec-display] ; Heltec ESP32 Board with SSD1306 display platform = ${com.esp32_platform} board = heltec_wifi_lora_32_V2 build_type = debug monitor_filters = esp32_exception_decoder board_build.partitions = min_spiffs.csv extra_scripts = pre:scripts/omg_firmware_version.py lib_deps = ${com-esp.lib_deps} ${libraries.wifimanager32} ${libraries.heltec} ; ${libraries.m5stickcp} build_flags = ${com-esp.build_flags} ${test_env.build_flags} ; *** OpenMQTTGateway Config *** '-UZmqttDiscovery' ; disables MQTT Discovery '-DvalueAsATopic=true' '-DLOG_LEVEL=LOG_LEVEL_TRACE' ; *** OpenMQTTGateway Modules *** '-DZboardHELTEC="HELTEC"' ; *** Heltec Board Options *** '-DDEBUG_OLEDDISPLAY(...)=Serial.printf( __VA_ARGS__ )' '-DLOG_TO_LCD=true' ; Enable log to LCD '-DLED_ERROR=2' '-DONBOARD_LED=25' ; Onboard LED is GPIO 25 on the Heltec Board monitor_port = /dev/cu.SLAB_USBtoUART monitor_speed = 921600 upload_port = /dev/cu.SLAB_USBtoUART upload_speed = 921600
Thanks I will test it by Monday |
I just ran a compile of the 'heltec-wifi-lora-32-915' environment with the display enabled, and it fails due to duplicate lora functions. I then removed the library '${libraries.lora}' and it fails due to minor differences in the API between the Heltec version and the 'arduino-LoRa' library. Let me try a different display library and see. |
Switched to the thingpulse/ESP8266 and ESP32 OLED driver for SSD1306 displays@^4.3.0 library which was the base for the Heltec library.
Switched to the thingpulse/ESP8266 and ESP32 OLED driver for SSD1306 displays@^4.3.0 library which was the base for the Heltec library. This should work with the lora module enabled now. |
This fixes multi-line display
Hello, I have try to add BT to it and unfortunately I'm encountering an issue at start
Decoded:
Here is the environment:
If I comment: Or if I set:
The gateway scan properly but stay stuck on the screen to the last Warning message "MQTT connection" I had similar issue when implementing M5Stack screens, this is why their logs level is set by default to:
I haven't found the root cause, but I think it makes sense to restrict the display to Errors and Warnings unless action is required by the user. Maybe we could leverage the same messages that are used for the M5 family like: Line 527 in 8c7c114
Line 1203 in 8c7c114
Line 1230 in 8c7c114
Line 887 in 8c7c114
Line 876 in 8c7c114
To sum up my suggestions:
Alternatively, you could investigate the root cause for the core dump, but I'm not sure we need to display INFO or NOTICE level on these small LCDs, mainly because those long messages will be difficult to read. |
I personally found that NOTICE level logging was more interesting to watch, but will change the default to WARNING. In regards to your second suggestion, I saw the M5Print messages, and was thinking to refactor that code so that it would work with either the M5 or Heltec display. And simplify it for future use. But this would need regression testing with a M5 device. I don't have an M5 in my setup, do you have the ability to do some testing ? In regards to the crash when running the BT decoder, I'm going to dig into this further. I had some issues with my rtl_433_ESP code, and the display getting corrupted that was triggered by a task doing logging from core0. Resolved by moving the task to core1. |
For sure I can do regression testing on the M5 family. If you found the root cause I will be happy to keep it to notice and maybe with a smaller font :-) |
1 - Set default LCD log level to WARNING 2 - Implemented a macro based displayPrint function that will be usable across different displays
Description:
This should be good to be merged now. I added it to Platformio.ini as a separate environment as I do not have the ability to test and validate the heltec-wifi-lora-32 environments. It should be tested as I pulled in the Heltec library for the board, and it includes lora libraries as well.
Will include the support with the rtl_433_ESP environment as well.
Checklist: