Lights for cheap with Arduino 3 - BACKFIRE!!!
Welcome back for another part of Arduino goodness! Today I am bringing you a guide for creating your own backfire exhaust pipes!
First things first, obviously, you need some exhaust pipe(s) with LEDs. This part is entirely up to your creativity.
I have used 7.2mm aluminum pipe, cut four 30mm long pieces and sticked them together with a tape. Then I inserted two 3mm orange LEDs to each pipe, soldered and isolated everything, glued everything together with a glue gun and removed the tape.
If you are new to Arduino, I highly recommend checking the previous parts, where I explain the basic things in more detail, so If you missed them, you will find it here:
In the second part, we were using a third channel of our radio to control our lights. Now we will use a throttle channel as an input.
We use a Y-cable to connect both Arduino and ESC to the same cable.
We use a Y-cable to connect both Arduino and ESC to the same cable.
The process of getting the signal input values is also the same as in part 2. For me, forward movement is represented by range from 1496 (neutral) to 1885 (full throttle). It is a good chance, that other radios will have it similarly.
In the loop cycle of our program, we are checking the value of our throttle input rxIn. We have a dummy variable lastRxIn to see what was the last value, so we can react on its change.
If the throttle input is constant or increasing, we do not react. Optionally you can let your exhaust glow a little on high revs (analogWrite a value of intensity).
When the throttle decreases by some value, we wait for a short moment (delay), check the input again and if is decreased, we flash the lights with full intensity. BACKFIRE!
*Note, that this is just a first version of my backfire algorythm. It can be improved a lot, it is just I have been lazy and it looks good enough for me atm.
hi, could I please have the file? copy from the screen I found wrong the line }else{
ReplyDeleteThank you!