Home / How To / Arduino Light Bar, brake lights and indicators for all RC cars: 6 steps

Arduino Light Bar, brake lights and indicators for all RC cars: 6 steps



I'll attach the code below, it's pretty straight. If you are not sure how to upload code to an Arduino board, there are many YouTube tutorials that will teach you in about 2 minutes. Thanks heaps for following my tutorial!

——————————————————- ————————————————- ——

/ * Arduino RC car lights and brake lights
* By Edward Robinson, Australia

* This is a basic demonstration code … [19659002] * Some suggestions would be to use a 3- shoulder accelerometer to automate turn signal and brake lighting or even connect the lights to an existing Arduino car project and remotely control the lights

* Try adding delays or flashing the lights, or even make police lights 🙂

* I use personally this for a school project, checking an existing RC car with an Arduino and adding a range of sensors and accessories

* Thank you for downloading my code!

* /

int lightBar = 1

3;

int brake lighting = 12;

int leftIndicate = 11;

int rightIndicate = 10;

void setup () {

pinMode (lightBar, OUTPUT);

pinMode (brake lighting, OUTPUT);

pinMode (leftIndicate, OUTPUT);

pinMode (right Indicate, OUTPUT);

}

void loop () {

digitalWrite (lightBar, HIGH);

digitalWrite (brake lighting, HIGH);

digitalWrite (leftIndicate, HIGH);

digitalWrite (rightIndicate, HIGH);

}


Source link