tonymillion / synchronized_lighting_for_vesc

Synchronized Lighting for VESC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Synchronized Lighting for VESC

  • 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.

click to watch video Better to see once than hear a hundred times

This project is easy to repeat - all you need is:

don't forget to set stepdown converter to +5volts connection diagram

Tuning your VESC Synchronized Lighting

  1. 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
  1. Tune "WHEEL_SIZE_RATIO" constant in "main.cpp" for velocity of color pallete change
const uint8_t WHEEL_SIZE_RATIO = 20;
  1. Also you can tune "STANDBY_TIMEOUT" constant in order to enable standby lighting mode
const uint16_t STANDBY_TIMEOUT = 3000;
  1. Select "PPM and UART" in "APP setting" of "VESC tool".

  2. You are ready to go!

  3. 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.

  1. If you want to change direction of color movement tune "STRIP_DIRECTION" constant in "main.cpp".

To compile this project in Arduino IDE:

  1. Create new folder for this project. For example name it synchronized_lighting.

  2. Copy main.cpp to this folder.

  3. Rename main.cpp to synchronized_lighting.ino

  4. Copy all files from lib folder and subfolders to your newly created directory synchronized_lighting folder.

  5. Open Arduino IDE and install FastGPIO and APA102 libraries.

  6. Compile!

  7. Power down or even disconnect Arduino from your VESC when uploading new firmware.

If you use this project and like it - Please Donate

paypal

About

Synchronized Lighting for VESC

License:GNU General Public License v3.0


Languages

Language:C 88.9%Language:C++ 11.1%