Skip to content

fix: update examples for current M5 library APIs#11

Open
LuoIsHere wants to merge 1 commit into
masterfrom
fix/update-examples-for-current-m5-library
Open

fix: update examples for current M5 library APIs#11
LuoIsHere wants to merge 1 commit into
masterfrom
fix/update-examples-for-current-m5-library

Conversation

@LuoIsHere

Copy link
Copy Markdown

Description

Update DLight example sketches to use M5Unified display APIs.

This replaces the separate M5GFX display instance with the unified M5.Display object provided by M5Unified, avoiding multiple display objects in the same sketch and aligning the examples with the current M5Stack application-layer API style.

Changes

  • Replace legacy board-specific display includes with M5Unified.h
  • Use M5Canvas canvas(&M5.Display) for display examples
  • Remove separate M5GFX display instances and display.begin()
  • Use M5.Display.width() / M5.Display.height() when creating sprites
  • Move StickC display rotation to M5.Display.setRotation(3)
  • Update Atom example from M5Atom display API to M5Unified with Adafruit_NeoPixel
  • Keep existing Unit and HAT DLight sensor initialization logic unchanged

Notes

Test

  • Verified all updated examples compile successfully.

@LuoIsHere
LuoIsHere force-pushed the fix/update-examples-for-current-m5-library branch 2 times, most recently from 5b8852a to 032b20a Compare July 17, 2026 07:17
@LuoIsHere
LuoIsHere force-pushed the fix/update-examples-for-current-m5-library branch from 032b20a to a7f6204 Compare July 17, 2026 07:32
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.

1 participant