Keyestudio 4DOF Manual page 207

Robot mechanical arm kit for arduino diy
Hide thumbs Also See for 4DOF:
Table of Contents

Advertisement

Test Code 8:
********************************************************************************************************************
void setup()
{
Serial.begin(9600);
}
void loop()
{
char val;
// define a variable, used to receive the value read from Bluetooth.
if(Serial.available())
{
val = Serial.read();
Serial.println(val);
}
}
********************************************************************************************************************
Test Result:
Upload the code, hookup well and power up. After connecting the Bluetooth APP, open the serial monitor and set
the baud rate to 9600, press down the control key on the APP, you should see the corresponding value. Shown
// set the serial baud rate to 9600
// if receive the value
// assign the value read to val
204

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents