JDY08 - updated example

This commit is contained in:
Jan Gromeš 2018-07-23 12:43:25 +02:00
parent b772fc915d
commit a081e10a2b

View file

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