Yeah, the walls and interface plates (board to enclosure) are 3D printed. There is a CNC’d aluminum base plate and CNC’d acrylic covers.
changing the led direction of travel…
color_shifting.cpp #include “color_shifting.h” #include “led_strip_apa102.h” #include “color_palletes.h”
extern “C” { #include “vesc_uart.h” };
void update_strip_colors(void) { uint32_t current_tacho_value; uint32_t pallete_travel; current_tacho_value = bldc_get_tachometer_value(); pallete_travel = current_tacho_value / WHEEL_SIZE_RATIO; for (uint8_t i; i < LED_COUNT; i++) { led_strip_colors[i] = get_pallete_color(pallete_travel + i); } update_strip(); }
Just change led_strip_colors[i] = get_pallete_color(pallete_travel + i); to led_strip_colors[i] = get_pallete_color(pallete_travel - i); ?
yeah, this is fastest solution but I’m trying to implement this setting based on condition right now…
Awesome!
I’m loving the lights man! And making/customizing the palletes is great!
Thanks man! And big thanks for the video!
p.s. What is your WHEEL_SIZE_RATIO value on the video?
const uint8_t WHEEL_SIZE_RATIO = 10;
I kinda want the lights to blink fast, just like the po-po.
my modified police pallete:
/* POLICE PALLETE */ const hsv_color police_pallete[460] PROGMEM = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
};
also, resorted to a hardware solution to turn the lights on and off.
https://www.amazon.com/gp/product/B012W6RJ5I/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
After that answer everything is fine
p.s. Thanks for sharing your pallete, I’ll add it to project
I wonder if this can be ported to the photon remote…it already supports ws2812… @ju_mpe_r @Wajdi what do you think?
Very cool, I like the idea of synchronizing light to movement by distance. I will work on adding that to the list of effects.
Yeah! I like this idea and it’s not hard to implement, but don’t know when I will have time for that.
I don’t like that the idea will be used in not open source project. But I understand that can’t do anything with this. So…
Maybe someone has a clue why changes I make that’s not in the main.ino file(like led_count) doesn’t work?
nvm got it to work. Another question - I can’t seem to make it work with @Ackmaniac 's 2.54 version only the new one. Any idea? I set the baud rate to 115200 on both versions.
I can’t get it to work for some reason, seems like the arduino doesn’t read the UART signals from vesc at all
Did you change vesc to ppm and uart?
Yea I checked everything, bluetooth works fine aswell
Oh no. I plugged in bt just to make sure the vesc send UART signal, I tried it without the BT
Does not work with Ack 2.54, does work with 3.102 though.
Also, would this work for SK9822? I can’t find apa102s on amazon that are waterproof and have black pcbs