RC CAR 3D Print Working Programable Race Light Arduino Project Drag Race Tree
HTML-код
- Опубликовано: 2 окт 2024
- #arduino #dragracing #rccar
www.thingivers...
green lights = www.amazon.com...
white amber and red lights = www.amazon.com...
relay board = Xiuxin 2pcs 5V 8 Channel Relay Module Board
2560 mega starter kit www.ebay.com/i...
CODE:
int White = 7; // LED connected to digital pin 7
int Yellow = 6; // LED connected to digital pin 6
int Yellow1 = 5; // LED connected to digital pin 5
int Yellow2 = 4; // LED connected to digital pin 4
int Green = 3; // LED connected to digital pin 3
void setup()
{
pinMode(White, OUTPUT);
pinMode(Yellow, OUTPUT);
pinMode(Yellow1, OUTPUT);
pinMode(Yellow2, OUTPUT);
pinMode(Green, OUTPUT);
digitalWrite(White, HIGH); // sets the LED off
digitalWrite(Yellow, HIGH); // sets the LED off
digitalWrite(Yellow1, HIGH); // sets the LED off
digitalWrite(Yellow2, HIGH); // sets the LED off
digitalWrite(Green, HIGH); // sets the LED off
digitalWrite(White, LOW); // sets the LED on
delay(2000); // waits for a second
digitalWrite(Yellow, LOW); // sets the LED on
delay(500); // waits for a second
digitalWrite(Yellow1, LOW); // sets the LED on
delay(500); // waits for a second
digitalWrite(Yellow2, LOW); // sets the LED on
delay(500); // waits for a second
digitalWrite(Green, LOW); // all LED off
digitalWrite(White, HIGH);
digitalWrite(Yellow, HIGH);
digitalWrite(Yellow1, HIGH);
digitalWrite(Yellow2, HIGH);
delay(5000); // wait and hold Green Light
digitalWrite(Green, HIGH);
}
void loop()
{
}
this is pretty cool, however your thingiverse link only has 1 file and it looks like a stand, no tree. Also have you thought about next step and making it to have lasers start stop with a timer?
Neat Oh! 👍