EasyManua.ls Logo

Keyestudio 4WD Bluetooth Multi-functional Car - Page 127

Keyestudio 4WD Bluetooth Multi-functional Car
151 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
keyestudio
www.keyestudio.com
125
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

Related product manuals