Added example sketch for HM-10 module

This commit is contained in:
aronmal 2022-09-25 15:04:30 +02:00
parent 5a010bfb1b
commit 1cfde0e232
Signed by: aronmal
GPG key ID: 816B7707426FC612
9 changed files with 11717 additions and 0 deletions

View 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();
}
}