Ziad
Published © CC BY-NC

RC Robot Car With Solar Panels + Steps + Pictures

This is an RC which can be controlled through any phone. I added solar panels to provide extra power to it.

IntermediateFull instructions provided2 hours1,696
RC Robot Car With Solar Panels + Steps + Pictures

Things used in this project

Software apps and online services

Arduino Bluetooth RC Car

Story

Read more

Code

Programming Source Code

C/C++
Step 12: Programming Source Code
char blueReading;
void setup() {
pinMode(13,OUTPUT);
pinMode(12,OUTPUT);
pinMode(11,OUTPUT);
pinMode(10,OUTPUT);
Serial.begin(9600);
}
void loop() {
if(Serial.available()){   blueReading = Serial.read();
Serial.println(blueReading);
}
if(blueReading == 'F'){
digitalWrite(13,HIGH);
digitalWrite(11,HIGH);
digitalWrite(12,LOW);
digitalWrite(10,LOW);
}
else if(blueReading == 'B'){
digitalWrite(12,HIGH);
digitalWrite(10,HIGH);
digitalWrite(13,LOW)
;   digitalWrite(11,LOW);
}
else if(blueReading == 'I'){
digitalWrite(11,HIGH);
digitalWrite(13,LOW);
digitalWrite(12,LOW);
digitalWrite(10,LOW);
}
else if(blueReading == 'G'){
digitalWrite(13,HIGH);
}
else if(blueReading == 'H'){
digitalWrite(12,HIGH);
digitalWrite(13,LOW);
digitalWrite(11,LOW);
digitalWrite(10,LOW);
}
else if(blueReading == 'J'){
digitalWrite(10,HIGH);
digitalWrite(13,LOW);
digitalWrite(11,LOW);
digitalWrite(12,LOW);
}
else if(blueReading == 'S'){
digitalWrite(13,LOW);
digitalWrite(12,LOW);
digitalWrite(11,LOW);
digitalWrite(10,LOW);
}
}

Credits

Ziad

Ziad

2 projects • 1 follower
i am a high school student and i love making things

Comments