Introduction: RC Bluetcar

A car made with Arduino controlled by ios or android ..
In this case controlled by IOS.

Step 1: Necessary Materials

1- Arduíno

1- Chip L293D

2- Leds ( any color )

1-Buzzer

1-HM-10 ( bluetooth module )

Jumpers.

Step 2: Performing the Links

Step 3: After Connecting Pins, Find a Frame (chassis)

What can be done:
- Cardboard

-Acrylic

- Used Rc Cars ..

And what I prefer.

Step 4: Choose the App to Control the Project

Choose the app is important because, as the app is coming from the code, and what commands it sends to the project receive and play the code ..
I recommend App's I used in the project as the LOFI ROBOT (IOS). Providing the code, and the app get a good connection with the Bluetooth (HM-10). However can use the app you prefer, it is only a recommendation LOFI , I realized the project with him and it was quiet ..

Step 5: CODE !

If you use the lofi app, the code has been modified to be used in this Project or use original code this available in

http://www.lofirobot.com/

All credits to the robot lofi app, I am using to represent only show the operation of the project that used the LOFI ROBOT app.

int val = 0;
int horizontal = 50;
int vertical = 50;
int A_state = 0;
int B_state = 0;
char data[5];
int m1;
int m2;
void setup()
{
  // silnik M1
 
pinMode(2, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(3, OUTPUT);
  // silnik M2
  pinMode(8, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(5, OUTPUT);
  //buzzer
  pinMode(13, OUTPUT);
  // diody LED
 
pinMode(10, OUTPUT);
  pinMode(9, OUTPUT);
  Serial.begin(9600); // komunikacja Arduino->Komputer przez kabel USB
 
Serial.begin(9600); // komunikacja Arduino->HM-10 bluetooth
   
motor1(1,225 );
  motor2(1, 225);
}
void loop()
{
  if (Serial.available())
  {
    Serial.readBytes(data, 5); // odbior danych z aplikacji
    horizontal = int(data[1]); 
// joystick os pozioma
    
vertical = int(data[2]); // joystick os pionowa
  
  A_state = int(data[3]); 
// lewy przycisk
 
   B_state = int(data[4]); // prawy przycisk
horizontal = horizontal * 2 - 100;
   
vertical = vertical * 2 - 100;
    Serial.print("horizontal = ");
 
   Serial.print(horizontal);
  
  Serial.print(" vertical = ");
 
   Serial.print(vertical);
 
   Serial.print(" A = ");
    Serial.print(A_state);
  
  Serial.print(" B = ");
 
   Serial.println(B_state);
  }
  digitalWrite(13, A_state);
  digitalWrite(10, B_state);
  digitalWrite(9, B_state);
 

m1 = vertical - horizontal;

m2 = vertical + horizontal;

int mm1 = min(255, 2.7 * abs(horizontal ));

int mm2 = min(255, 2.7 * abs(vertical));

  if (m1 > 0)
    motor1(true, mm1);
  else
    motor1(false, mm1);
  if (m2 > 0)
    motor2(true, mm2);
  else
    motor2(false, mm2);
}
void motor1(boolean direction, int power)
{
  digitalWrite(2, direction);
  digitalWrite(4, !direction);
  analogWrite(3,power );
}
// funkcja sterująca silnikiem podłączonym do gniazda M2
void motor2(boolean direction, int power)
{
  digitalWrite(7, direction);
  digitalWrite(8, !direction);
  analogWrite(5,power );
}

Comments

author
Annie+17 made it!(author)2016-09-10

Can we use other Bluetooth module in place of The Bluetooth module you mensioned I mean like hc 05

author
LeoMartinsTSk8 made it!(author)2016-09-10

Yes, of course so I have used this hm -10 because so have ( ios ) , however for android can use hc- 05 and HC -06 .. Thank you send any questions here: D

About This Instructable

558views

13favorites

License:

More by LeoMartinsTSk8:RC Bluetcar Organic Garden in Your GardenTheremin Agudo
Add instructable to: