Skip to content
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 #1283

Merged
merged 18 commits into from
Oct 14, 2022
Merged

Heltec SSD1306 Display Support #1283

merged 18 commits into from
Oct 14, 2022

Conversation

NorthernMan54
Copy link
Collaborator

Description:

I needed to rebase my environment against the latest development. This is a continuation of #1277

This pull request includes

  • Support for HELTEC SSD1306 OLED Display as a separate environment 'heltec-display-ssd1306'
  • Default log level on LCD display set to WARNING
  • Refactored M5Print to a macro based function that is shareable between M5 and Heltec Boards.

Outstanding issue

Checklist:

  • The pull request is done against the latest development branch
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • I accept the DCO.

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
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 fixes multi-line display
1 - Set default LCD log level to WARNING
2 - Implemented a macro based displayPrint function that will be usable across different displays
main/config_M5.h Outdated Show resolved Hide resolved
main/config_HELTEC.h Outdated Show resolved Hide resolved
- removed extraneous return from displayPrint
- Added logo display when idle
- Fixed log-lcd mqtt function
@1technophile
Copy link
Owner

Thanks, LGTM
Test OK on the Heltec + BLE
Test OK on M5StickC Plus + BLE

@NorthernMan54
Copy link
Collaborator Author

Awesome

@1technophile 1technophile merged commit c45181e into 1technophile:development Oct 14, 2022
@ssalonen
Copy link
Contributor

Did this PR accidentally commit new file, main.ino.cpp?

@NorthernMan54
Copy link
Collaborator Author

@ssalonen - That is correct, it should not have been included

@NorthernMan54 NorthernMan54 mentioned this pull request Oct 18, 2022
3 tasks
@NorthernMan54 NorthernMan54 deleted the Heltec-Display branch October 18, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants