Duino Joy is eenvoudig virtuele joystick met Arduino om te kommunikeer via Bluetooth module
View Voorbeeld van hoe om te gebruik by https://www.instructables.com/id/Simple-RC-Car-Arduino-Nano-HC-05/
***********************
toets
***********************
// Connection
// Arduino >>> bluetooth
// D10 (soos RX) >>> Tx
// D11 (as TX) >>> Rx
# include
SoftwareSerial bluetooth (10, 11); // RX, TX
leemte opstel () {
Serial.begin (19200); // Display om Arduino IDE Serial Monitor
bluetooth.begin (9600); // kommunikeer met Bluetooth module
}
leemte lus () {
terwyl (bluetooth.available ()) // Wag vir data van bluetooth
{
char a = bluetooth.read (); // Lees Data as Char van sagteware Serial
Serial.print ( "ontvang:");
Serial.println (a); // Print data te Serial Monitor
}
}
Opgedateer op
04 Jan. 2020