Project showcase
Android controlled robot car

Android controlled robot car © GPL3+

Controlled Arduino toy car by Android application using HC-05 for Bluetooth connection.

  • 7,808 views
  • 2 comments
  • 13 respects

Components and supplies

About this project

This is a project for controlling Arduino for Android device and connected by Bluetooth. For creating this project I used app inventor for the Android application and Arduino IDE for the Arduino program.

int lstat = 0;
void setup() 
{
  Serial.begin(9600);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
}
void forward()
{
  Serial.println("Forward");
  digitalWrite(8, LOW);
  digitalWrite(9, HIGH);
  digitalWrite(10, LOW);
  digitalWrite(11, HIGH);
}
void backward()
{
  Serial.println("Backward");
  digitalWrite(8, HIGH);
  digitalWrite(9, LOW);
  digitalWrite(10, HIGH);
  digitalWrite(11, LOW);
}
void left()
{
  Serial.println("Left");
  digitalWrite(8, LOW);
  digitalWrite(9, HIGH);
  digitalWrite(10, HIGH);
  digitalWrite(11, LOW);
}
void right()
{
  Serial.println("Right");
  digitalWrite(8, HIGH);
  digitalWrite(9, LOW);
  digitalWrite(10, LOW);
  digitalWrite(11, HIGH);
}
void quit()
{
  digitalWrite(8, LOW);
  digitalWrite(9, LOW);
  digitalWrite(10, LOW);
  digitalWrite(11, LOW);
}
void loop() 
{
  if(Serial.available())
  {
    switch(Serial.read())
    {
      case 'w':
        forward();
        break;
      case 's':
        backward();
        break;
      case 'a':
        left();
        break;
      case 'd':
        right();
        break;
      case 'q':
        quit();
        break;
      case 'o':
        if(lstat == 0)
        {
          digitalWrite(7, HIGH);
          lstat = 1;
        }
        else if(lstat == 1)
        {
          digitalWrite(7, LOW);
          lstat = 0;
        }
        break;
    }
  }  
}

Above is my Arduino Code.

Code

Schematics

Fritzing File
CarControlled(FritzingFile).fzz
Arduino File
ArduinoFile.ino
Capture.PNG
Capture

Comments

Similar projects you might like

Android Apps Controlled Arduino Robot Car

by Team platinum

  • 3,594 views
  • 0 comments
  • 16 respects

Smartphone Controlled Arduino 4WD Robot Car

Project in progress by Andriy Baranov

  • 53,239 views
  • 43 comments
  • 98 respects

2WD Voice Controlled Robot with Arduino and BitVoicer Server

Project tutorial by Marcio Tamagushi

  • 10,203 views
  • 11 comments
  • 32 respects
Add projectSign up / Login