EasyManua.ls Logo

Keyestudio 4WD Bluetooth Multi-functional Car - Page 57

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
55
Sample Code
*******************************************************************************
int val;
int ledpin=13;
void setup()
{
Serial.begin(9600);
pinMode(ledpin,OUTPUT);
}
void loop()
{ val=Serial.read();
if(val=='a')
{
digitalWrite(ledpin,HIGH);
delay(250);
digitalWrite(ledpin,LOW);
delay(250);
Serial.println("keyestudio");
}
}
*******************************************************************************
Result
After power-on, power indicator D1 is on, and LED on Bluetooth module is blinking; open Bluetooth on mobile phone, pair them, input 1234, and finish pairing as
shown in Figure 1 ; open APPBluetooth serial communication assistant, connect it to Bluetooth, select normal mode, complete connection, and LED on

Related product manuals