-
Notifications
You must be signed in to change notification settings - Fork 1
ledstrip_remote
wolfen351 edited this page Mar 21, 2025
·
3 revisions
This module displays a virtual LED strip remote on a touchscreen and handles user interactions through touch inputs. It allows users to control the brightness, color, and effects of an LED strip.
- Touchscreen-based LED strip remote interface.
- Adjustable brightness (0-100%).
- Color selection from a predefined palette.
- Support for effects like strobe, fade, and smooth (to be implemented).
- Touchscreen Display: 320x240 resolution.
-
SPI Configuration:
- High-speed SPI for drawing:
baudrate=40000000. - Low-speed SPI for touch:
baudrate=2000000. - Pins:
sck=Pin(7)mosi=Pin(11)miso=Pin(9)dc=Pin(12)cs=Pin(5)rst=Pin(0)- Touch chip select:
cs=Pin(18).
- High-speed SPI for drawing:
This image is displayed to the user:

-
colorRGB: Current RGB color in the formatR,G,B. -
brightness: Current brightness level (0-100).
None.
- Brightness adjustment (increase, decrease, on, off).
- Color selection (red, green, blue, white, and additional colors).
- Effects (strobe, fade, smooth).
-
Color Selection:
- If the user presses the "Blue" button, the following command is sent:
{ "command": "setColor", "value": "0,0,255" }
- If the user presses the "Blue" button, the following command is sent:
-
Brightness Adjustment:
- If the user increases brightness, the following command is sent:
(Assuming the brightness was previously at 50 and increased by 1.)
{ "command": "setBrightness", "value": 51 } - If the user decreases brightness, the following command is sent:
(Assuming the brightness was previously at 50 and decreased by 1.)
{ "command": "setBrightness", "value": 49 } - If the user presses "Off", the following command is sent:
{ "command": "setBrightness", "value": 0 } - If the user presses "On", the following command is sent:
{ "command": "setBrightness", "value": 100 }
- If the user increases brightness, the following command is sent:
-
Effects:
- If the user presses "Strobe", "Fade", or "Smooth", placeholder commands are sent (to be implemented):
{ "command": "setEffect", "value": "strobe" }{ "command": "setEffect", "value": "fade" }{ "command": "setEffect", "value": "smooth" }
- If the user presses "Strobe", "Fade", or "Smooth", placeholder commands are sent (to be implemented):
None.
- The module uses the
color565function to convert RGB values to 16-bit color format for the display. - Touch inputs are mapped to specific rows and columns on the touchscreen to determine the selected button.
- Effects like strobe, fade, and smooth are placeholders and need further implementation.