JDY08 - updated example

pull/1/head
Jan Gromeš 2018-07-23 12:43:25 +02:00
rodzic b772fc915d
commit a081e10a2b
1 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -1,8 +1,8 @@
/*
* KiteLib JDY08 Example
*
* This example sends data using JDY08 Bluetooth module.
*/
KiteLib JDY08 Example
This example sends data using JDY08 Bluetooth module.
*/
// include the library
#include <KiteLib.h>
@ -21,12 +21,12 @@ void setup() {
void loop() {
// JDY08 supports all methods of the Serial class
// read data incoming from Serial port and write them to Bluetooth
while(Serial.available() > 0) {
while (Serial.available() > 0) {
bluetooth.write(Serial.read());
}
// read data incoming from Bluetooth and write them to Serial port
while(bluetooth.available() > 0) {
while (bluetooth.available() > 0) {
Serial.write(bluetooth.read());
}
}