Added example sketch for HM-10 module
This commit is contained in:
parent
5a010bfb1b
commit
1cfde0e232
9 changed files with 11717 additions and 0 deletions
20
BluetoothGUI/drawScreen.js
Normal file
20
BluetoothGUI/drawScreen.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
function drawScreen() {
|
||||
textSize(18);
|
||||
if (isConnected) {
|
||||
background(0, 255, 0);
|
||||
text('Connected :)', 80, 15);
|
||||
} else {
|
||||
background(255, 0, 0);
|
||||
textAlign(LEFT, TOP);
|
||||
text('Disconnected :/', 80, 15);
|
||||
}
|
||||
|
||||
text(receivedValue, 15, 40);
|
||||
|
||||
if(oldColorPickerValue != ledColorPicker.value() && millis()-millisecondTimerStart>50 && isConnected){
|
||||
oldColorPickerValue = ledColorPicker.value();
|
||||
sendData("LED Color" + ledColorPicker.value()+ "\n");
|
||||
millisecondTimerStart = millis();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue