There is code to do the same light control within the 4.xx VESC somewhere… Ben had it on his board for a while. Think he even had turninglights controlled by left and right on the nrf nun-chuck.
i would think Ben had the settings in his nRF24 remote. this is snippet of code used to control driving lights with nun-chuck style. could easily add too to get additional lights/reaction
//–LIGHTS– //Throttle Throttle_PWM = analogRead(Throttle_in); if((Throttle_PWM) < 100){ digitalWrite(Throttle_out, LED_ON); } else{ digitalWrite(Throttle_out, LED_OFF); }
//L_Signal Signal_PWM = analogRead(Signal_in); if((Signal_PWM) > 100){
if (timeElapsed > interval_Blink){
ledState = !ledState; // toggle the state from HIGH to LOW to HIGH to LOW …
digitalWrite(L_Signal_out, ledState);
timeElapsed = 0; // reset the counter to 0 so the counting starts over…
}
}
//R_Signal
else if((Signal_PWM) < -100){
if (timeElapsed > interval_Blink){
ledState = !ledState; // toggle the state from HIGH to LOW to HIGH to LOW …
digitalWrite(R_Signal_out, ledState);
timeElapsed = 0; // reset the counter to 0 so the counting starts over…
}
}
else{
digitalWrite(L_Signal_out, LED_OFF);
digitalWrite(R_Signal_out, LED_OFF);
}
//********************************************************************
Yeah, you’re right. I never saw what was inbetween the VESC and the LEDs though. Was some led standard stripes and probably a LED driver that has a stepdown from the battery.
Thinking of implementing something similiar.
50/50 smd led strip only needs 12v. There are other options too.
Could someone make a plug and play kit for these controlled light thing?
Did you got an answer from you friend?
Sorry, man. He rejected the material.
Good guy~~!
This time I made my own brake module without the help of my friend who made the brake module. I used the Arduino nano.