Arduino Control Car 1.0 Apk
Rate saved, Thank!
4.5 (1 votes)
Description of Arduino Control Car
Bluetooth controlled by the Arduino for applications such as cars, acrobatic Brazos, Remote control, automation, etc ...
Sending this app by the Bluetooth module:
Up Arrow = Character 'a'
Left Arrow = Character 'b'
Square Button = Character 'c'
Right Arrow = Character 'd'
Down Arrow = Character 'e'
Pin ON = Character 'f'
Pin OFF = Character 'g'
Pin Bluetooth = is to select the Bluetooth module to which you are connecting
(The bluetooth module must first be synchronized with your Android phone
TRY To connect LEDs to the PWM 5, 6, 9, 10 Arduino ports, in the final draft to those ports the H bridge is connected to the Arduino Load the following code:
izqA int = 5;
izqB int = 6;
Dera int = 9;
Derb int = 10;
vel int = 255; // Speed engines (0-255)
int status = 'g'; // Starts arrested
void setup () {
Serial.begin (9600); // Start the serial port for communication with Bluetooth
pinMode (DERA, OUTPUT);
pinMode (Derb, OUTPUT);
pinMode (izqA, OUTPUT);
pinMode (izqB, OUTPUT);
}
void loop () {
if (Serial.available ()> 0) {// read the bluetooth and stored in state
status = Serial.read ();
}
if (state == 'a') {// move the Front Button
analogWrite (Derb, 0);
analogWrite (izqB, 0);
analogWrite (DERA, vel);
analogWrite (izqA, vel);
}
if (state == 'b') {// Button LEFT
analogWrite (Derb, 0);
analogWrite (izqB, 0);
analogWrite (DERA, 0);
analogWrite (izqA, vel);
}
if (state == 'c') {// Stop Button
analogWrite (Derb, 0);
analogWrite (izqB, 0);
analogWrite (DERA, 0);
analogWrite (izqA, 0);
}
if (state == 'd') {// Button DER
analogWrite (Derb, 0);
analogWrite (izqB, 0);
analogWrite (izqA, 0);
analogWrite (DERA, vel);
}
if (state == 'e') {// Reverse Button
analogWrite (DERA, 0);
analogWrite (izqA, 0);
analogWrite (Derb, vel);
analogWrite (izqB, vel);
}
if (state == 'f') {// Button ON by sensing distance moves
}
if (state == 'g') {// Button OFF, stops the engine does nothing
}
}