-
The idea is to lightup the underbody of a skateboard in accordance with the movement - for example, like you skating the rainbow ;)
-
You can choose from existing options and and also create your own lighting color palletes.
-
While standby - "breathing lights" mode enabed.
-
Arduino Nano - brains for project
-
APA102 - led strip
-
LM2596HVS - DC-DC step down converter
don't forget to set stepdown converter to +5volts
- Set strip length(led num) and strip brightness(1-31 max) in "lib/led_strip_apa102/led_strip_apa102.h" file:
#define LED_COUNT 42
#define LED_STRIP_BRIGHTNESS 31
- Tune "WHEEL_SIZE_RATIO" constant in "main.cpp" for velocity of color pallete change
const uint8_t WHEEL_SIZE_RATIO = 20;
- Also you can tune "STANDBY_TIMEOUT" constant in order to enable standby lighting mode
const uint16_t STANDBY_TIMEOUT = 3000;
-
Select "PPM and UART" in "APP setting" of "VESC tool".
-
You are ready to go!
-
You can create your own color palletes and set it up in "lib/color_palletes/color_palletes.h" file.
CURRENT_PALLETE_WIDTH must be equal to pallete elements, for example, if you want to create new pallete with 3 elements:
const hsv_color pallete_name[3] PROGMEM = { 0, 240, 0 };
or
const hsv_color another_pallete_name[6] PROGMEM = { 0, 240, 0, 240, 0, 240, };
so CURRENT_PALLETE_WIDTH must be equal to number in [ ] brackets and count of values in { } brackets.
- If you want to change direction of color movement tune "STRIP_DIRECTION" constant in "main.cpp".
-
Create new folder for this project. For example name it synchronized_lighting.
-
Copy main.cpp to this folder.
-
Rename main.cpp to synchronized_lighting.ino
-
Copy all files from lib folder and subfolders to your newly created directory synchronized_lighting folder.
-
Open Arduino IDE and install FastGPIO and APA102 libraries.
-
Compile!
-
Power down or even disconnect Arduino from your VESC when uploading new firmware.