Skip to content

refactor(vl53l1x): Migrate radar_screen example to steami_screen. #375

@nedseb

Description

@nedseb

Description

Migrate lib/vl53l1x/examples/radar_screen.py from direct SSD1327 framebuf calls to the steami_screen widget API.

Current state

The example manually draws a distance bar using framebuf.rect(), framebuf.fill_rect(), and display.text() with hand-coded centering and brightness mapping.

Proposed change

Replace manual drawing with steami_screen widgets:

  • screen.bar() for the distance bar
  • screen.text() or screen.value() for the distance display
  • SSD1327Display wrapper for color conversion
from steami_screen import Screen, SSD1327Display
display = SSD1327Display(ssd1327.WS_OLED_128X128_SPI(spi, dc, res, cs))
screen = Screen(display)

screen.clear()
screen.title("Radar")
screen.value(distance, unit="mm")
screen.bar(proximity, max_val=MAX_DISTANCE_MM)
screen.show()

Reference

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions