M_Control_IO_config();
Set_Speed(Lpwm_val,Rpwm_val);
Serial.begin(9600);
//initialized serial port , using Bluetooth as serial port, setting baud at 9600
lcd.setCursor(0, 0); //setting cursor in the first row and column
lcd.print("
Wait Sigal");
stopp();
}
void loop()
{
lcd.setCursor(0, 0); //setting cursor in the first row and column
lcd.print("BluetoothControl");
if(Serial.available()) //to judge whether the serial port receives the data.
{
Bluetooth_val=Serial.read(); //reading (Bluetooth) data of serial port,giving the value of val;
switch(Bluetooth_val)
{
case 'U':advance(); //UP
break;
case 'D': back();
//back
break;
case 'L':turnL();
//Left
break;
case 'R':turnR(); //Right
break;
case 'S':stopp();
//stop
keyestudio
www.keyestudio.com
125
Need help?
Do you have a question about the 4WD Bluetooth Multi-functional Car and is the answer not in the manual?