r/ArduinoProjects • u/FewDiscipline9 • Jun 07 '21
My first project: 4 cylinder LED ‘engine’ with potentiometer ‘throttle’
6
u/andymk3 Jun 07 '21
1-3-4-2, nice.
6
5
u/JimBean Jun 08 '21
Aircraft engineer here. I came to inspect your work. Well done and here is your certification. *****
We would like to see a V8 model. :)
3
u/JimBean Jun 08 '21
Noice. Add an audio player for some vroom vroom noises. :)
2
u/FewDiscipline9 Jun 08 '21
I've harvested a speaker from an old alarm clock radio, I'm now trying to work out how to make it sound a bit beefier, rather than sounding like a Geiger counter
3
u/Tyrannosaurusblanch Jun 08 '21
If OP posts the code I’m so going to stick the lights parts on my throttle.
2
2
2
u/ProfessionalMuki Jun 08 '21
Any video or scheme for that circuit?
2
u/FewDiscipline9 Jun 08 '21
Looking to make a schematic diagram, I'm new to all this so I'm wondering what website/software I can use to create said diagrams?
2
u/JimBean Jun 09 '21
A proper circuit diagram with components can be created using Eagle circuit design software. It's free. Expect a steep learning curve.
1
19
7
4
2
2
2
u/Papa_Nipples Jun 07 '21
Really cool!! This brought back tons of memories for me as this is very similar to what my first project was. Keep up the good work!
2
2
2
u/F3L1P3L0D1 Jun 07 '21
Very nice application for the potentiometer. I will definitely try it too ;)
2
u/totorodad Jun 08 '21
Cool beans man. Now sim a v8 and each valve type and piston use a separate color. Maybe throw in a stepper motor to spin with and rpm ratio metric to your led timing. For the next level make that arduino your engine sim and a second arduino be your engine controller.
2
2
u/Alarratt Sep 15 '21
Easy there, bud. Pretty sure you're floating the hell outta those valves at the end.
1
4
u/FewDiscipline9 Jun 08 '21
#include <pitches.h>int buzzerPin = 11;void setup() {pinMode(2, OUTPUT); //Subtract one from pin number for cylinder numberpinMode(3, OUTPUT);pinMode(4, OUTPUT);pinMode(5, OUTPUT);pinMode(buzzerPin, OUTPUT);}void loop() {int x;int delayTime;int sensorPin = A0; //Potentiometerint sensorValue;sensorValue = analogRead(sensorPin);x = (sensorValue / 4);delayTime = (x);// blink all spark plug LEDs in I4 firing order.// 1-3-4-2digitalWrite(2, HIGH);delay(delayTime);digitalWrite(2, LOW);tone(buzzerPin, 100, 10);digitalWrite(4, HIGH);delay(delayTime);digitalWrite(4, LOW);tone(buzzerPin, 100, 10);digitalWrite(5, HIGH);delay(delayTime);digitalWrite(5, LOW);tone(buzzerPin, 100, 10);digitalWrite(3, HIGH);delay(delayTime);digitalWrite(3, LOW);tone(buzzerPin, 100, 10);}