Introduction: Arduino LEGO Bluetooth Car
I made ARDUINO bluetooth car by LEGO.
It is very simple and cheep.
Let's start making!!
Step 1: Material
If you don't have It, you can use another things.
Step 2: Install Program
Install TeraTerm and arduino1.6.7v or arduino1.0.5v.
And copy this code.
void setup() {
Serial.begin(9600);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
}
void loop() {
if (Serial.available()){
byte data;
data = Serial.read();
if(data=='w') //press 'w' forward
{
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
}
else if(data=='a') //press 'a' left
{
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
}
else if(data=='d') //press 'd' right
{
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
}
else //press another botton stop
{
digitalWrite(2, LOW);
digitalWrite(3, LOW);
}
}
}
Step 3: Video Instruction
Enjoy my video instruction.
This is my first project.
Thank you for watching!