Skip to content
Snippets Groups Projects
Commit b9a63c9c authored by Anian Bühler's avatar Anian Bühler
Browse files

minor changes

parent 9ab3f944
No related branches found
No related tags found
1 merge request!4Dev to Master
......@@ -30,7 +30,6 @@
#define POTI_PIN A0
#define THRESHOLD 10 //Schwellwert für min. Wertänderung
#define SEND_DELAY 500 //Mindestwarezeit zwischen zwei Sendevorgängen
char topicPublish[MAX_LEN_TOPICS] = "potiVal"; //Topic unter dem (eigene) Daten veröffentlicht werden
char topicSubscribe[MAX_LEN_TOPICS] = "btnState"; //Topic (von anderem TN) das abboniert werden soll
......@@ -51,9 +50,9 @@ void clientCallback(char* mTopic, int mToLength, char* mData, int mDaLength) {
boolean static stateLED = false;
//Wechsle Zustand der Variable "stateLED" wenn Taster beim Sender gedrueckt wurde
if(bool(atoi(mData)) == true){
stateLED = !stateLED;
Serial.print(stateLED);
digitalWrite(LED_PIN, stateLED); //Setze Ausgang entsprechend dem empfangenen Wert
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment