LOGIN
Foysal Tomal
the ass kicker
 · DhakaBangladesh
Edit
Delete
Share
Report
QUESTION
  ·  Mark as Answered

My car is not running …
only one key the right key …if i press left on the app the right wheel run…
and car isnot mooving foward or backward…
here is my code for my bluetooth Rc car…

#include <SoftwareSerial.h>

SoftwareSerial bluetooth (10,11);

char choice;
void setup() {
// put your setup code here, to run once:
pinMode (4, OUTPUT);
pinMode (5, OUTPUT);
pinMode (6, OUTPUT);
pinMode (7, OUTPUT);
bluetooth.begin(9600);
}

void loop() {
if (bluetooth.available()>0){
choice=bluetooth.read();

if (choice==‘F’)
{
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
digitalWrite(6, HIGH);
digitalWrite(7, LOW);
}
if (choice==‘B’)
{
digitalWrite(4, LOW);
digitalWrite(5, HIGH);
digitalWrite(6, LOW);
digitalWrite(7, HIGH);
}
if (choice==‘L’)
{
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
digitalWrite(6, LOW);
digitalWrite(7, LOW);
}
if (choice==‘R’)
{
digitalWrite(4, LOW);
digitalWrite(5, LOW);
digitalWrite(6, HIGH);
digitalWrite(7, LOW);
} if (choice==‘S’)
{
digitalWrite(4, LOW);
digitalWrite(5, LOW);
digitalWrite(6, LOW);
digitalWrite(7, LOW);
}
// put your main code here, to run repeatedly:
}
}

0 like 
Like
Share
Leave a reply...
DISCOVER
CHAT
ALERTS
-2
DISCUSSIONS
-1
FEED