-
Notifications
You must be signed in to change notification settings - Fork 1
feat(apds9960): Add color lamp example with OLED display. #331
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Add a color_lamp.py example that detects the color of an object placed near the APDS9960 RGBC sensor and displays the detected color name and RGB values on the SSD1327 OLED in greyscale.
Difficulty
Level 2 — Intermediate (2-3 sessions)
What to do
Create lib/apds9960/examples/color_lamp.py that:
- Initializes the APDS9960 sensor (color/light mode)
- Initializes the SSD1327 OLED display over SPI
- Reads RGBC values from the sensor
- Determines the dominant color channel (R, G, or B)
- Displays the color name in large text on the OLED
- Shows the raw R, G, B values below
- Fills the screen background with a greyscale intensity matching overall brightness
Reference code
- APDS9960 light/color:
lib/apds9960/examples/ambient_light.py - SSD1327 text + rects:
lib/ssd1327/examples/framebuf_text.py,framebuf_rects.py
Hardware required
- STeaMi board (Rev A or later)
- Colored objects (paper, LEGO bricks, etc.)
Conventions
See CONTRIBUTING.md for coding conventions and workflow.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request