Skip to content

Claudia-pit/CarController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CarController

This is a simple app to control an Arduino car via Bluetooth. The car has a HC-05 Bluetooth module.

Arduino1HC-05

This is the sketch I uploaded to the Arduino board.

char t;

void setup() {
  //to run once:

  pinMode(13,OUTPUT);   //left motors forward
  pinMode(12,OUTPUT);   //left motors reverse
  pinMode(11,OUTPUT);   //right motors forward
  pinMode(10,OUTPUT);   //right motort reverse
  Serial.begin(9600);
}

void loop() {
  //to run repeatedly:
  if(Serial.available()){
    t = Serial.read();
    Serial.println(t);
  }
    
  if(t == 'F'){
    digitalWrite(13,HIGH);
    digitalWrite(11,HIGH);
  }

  else if(t == 'B'){
    digitalWrite(12,HIGH);
    digitalWrite(10,HIGH);
  }

  else if(t == 'L'){
    digitalWrite(11,HIGH);
  }

  else if(t == 'R'){
    digitalWrite(13, HIGH); 
  }

  else if(t == 'S'){
    digitalWrite(13,LOW);
    digitalWrite(12,LOW);
    digitalWrite(11,LOW);
    digitalWrite(10,LOW);
  }
}

MainActivity

This is the main screen of the app, there are three buttons:
1."Play" button leads to the ControlActivity
2."Connect to Device" leads to the list of available devices
3.Bluetooth icon to disconnect

photo5866224486913782924

Devices Activity

In this screen you'll find the list of all the available devices you can connect to

deviceslist

Control Activity

In this screen you'll find the buttons to control the car

photo5866224486913782925

Icons made by https://www.flaticon.com/authors/surang from https://www.flaticon.com/

Icons made by https://www.flaticon.com/authors/phatplus from https://www.flaticon.com/

Icons made by https://www.flaticon.com/authors/freepik from https://www.flaticon.com/

m

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages