Synchronized lighting for VESC

Hi, there! :upside_down_face: This is my first post here so… First of all, I want to thank Benjamin Vedder for his great project and @Onloop for this kind place. Also great thanks to @WhitePony for his very detailed and helpful build process posts. And all of you, guys, for that large community.

Now, closer to the topic… I spent some time to realize my friend’s idea of underbody synchronized lighting, it’s hard to explain and better to see once than read a hundred times.

don’t forget to set stepdown converter to +5volts


You can find all instructions to try this at home here -> https://github.com/ju-mpe-r/synchronized_lighting_for_vesc

26 Likes

Very nice haha I like the police lights

This looks great. I have been planning to do this for a while now but it seems like you beat me to it. Cant wait to try it out :slight_smile:

I have a WS2812strip…looks like I’m going to have to grab an apa102 one instead.

Is the strip sealed, and if so where did you get it?

/edit: nevermind

Oh, I really need to do this!

It should be able to work with ws2812 with minor tweaking

Yeah, i need to look at the code. But the strip I already have isn’t sealed…might as well get the right stuff.

interested in the ws2812 adaptations aswell.

These minor tweaks… In what lib should I be looking for changes?

nice project !

Order 2 lol

Thanks! Full hue also gonna be cool, but because of winter I cant record outdoor video to show that you can skate the rainbow :slight_smile:

Thanks, man! Just enjoy the result of idea! :wink:

I attached links to components at github project page. And yeah, you need APA102 because of some limitations of ws2812

At first I tried to accomplish this project with ws2812, but it’s too slow because this strip is very time dependent - ws2812 library disables interrupts to write to the strip and enables it back, so with uart interrupts this all takes too much time… I dont say this is impossible, but sure, to get it work you will need to write your own libraries on vanilla C. One for Arduino uart setup and communication and second for updating ws2812 strip, so I decided that I don’t want to waste time on this. :sweat_smile:

:smiley: :+1: Will be glad to help - ask if you will have any questions.

Thanks! But I dont think that changes will be minor, man. Please, see my answer to @scepterr

3 Likes

Wire an MPU 6050 to arduino, do some coding and get turning head lights! :grinning: (have the leaning side led brighter)

2 Likes

Have you used the Teensy before? It should be able to do everything in an even smaller package. I use them to drive 4000+ ws2812 led video displays :yum:

https://www.pjrc.com/teensy/index.html

https://www.pjrc.com/teensy/td_libs_OctoWS2811.html

No, have not tried it yet, but thanks for info, man! :wink: In comparison arduino with teensy, cost of overall project will be more, even with ws2812 instead of apa102.

OK!

Time to own up to my lack of skill.

How do I compile and flash this to the nano? I have a pro mini (5V 16MHz) that should work.

I have everything on-hand, just need to get the FW on there.

Thanks in advance!

Get the Arduino ide installed https://www.arduino.cc/en/Main/Software

I did, but it’s complaing about .ino and .pde being the only valid file types. :confused:

I’m setting up the PC I’m on now I’ll see what’s up

OK, got it to compile.

Opened a new sketch, then copied the contents of main.cpp into it. Saved the sketch.

Moved the folders in /lib to the arduino library folder, then had to install the fastgpio and the apa102 libraries.

compiled OK. need to test tomorrow.

3 Likes

Yep that’s it :yum: Readme definitely needs an update :wink:

:sweat_smile: Sorry, man, Im just forgot about description for compile process in Arduino IDE. Added to readme. Thanks man. :+1:

Keep me informed and dont forget to play with const uint8_t WHEEL_SIZE_RATIO = 15;

3 Likes