diff --git a/examples/sPSN_PingTest/sPSN_PingTest.ino b/examples/sPSN_PingTest/sPSN_PingTest.ino index 121d47554ad779363b1fc74b4d294f3982a195d6..fb9f90c9c0802e35832143d071e72018b2e5708f 100644 --- a/examples/sPSN_PingTest/sPSN_PingTest.ino +++ b/examples/sPSN_PingTest/sPSN_PingTest.ino @@ -50,7 +50,7 @@ char payloadSend[] = "Ping"; bool ledState = true; -void myCallback(char* mTopic, int mToLength, char* mData, int mDaLength) { +void newData(char* mTopic, int mToLength, char* mData, int mDaLength) { Serial.println(mData); digitalWrite(LED_BUILTIN, HIGH); } @@ -79,7 +79,7 @@ void setup() { digitalWrite(LED_PIN, ledState); digitalWrite(LED2_PIN, ledState); - psnClient.begin(sSerial, myCallback); + psnClient.begin(sSerial, newData); psnClient.publish(topicPub, payloadSend); while (!psnClient.handleNetwork()); diff --git a/examples/sPSN_PongTester/sPSN_PongTester.ino b/examples/sPSN_PongTester/sPSN_PongTester.ino index fec14790e61792f4e768e8a4f1d0068ee2d55bbc..2ed1ca12d21260985245e302b1fce15b3b96446b 100644 --- a/examples/sPSN_PongTester/sPSN_PongTester.ino +++ b/examples/sPSN_PongTester/sPSN_PongTester.ino @@ -44,7 +44,7 @@ char payloadSend[] = "Pong"; bool ledState = true; -void myCallback(char* mTopic, int mToLength, char* mData, int mDaLength) { +void newData(char* mTopic, int mToLength, char* mData, int mDaLength) { Serial.println(mTopic); //reply pong strcpy(topicPub, mTopic); @@ -70,7 +70,7 @@ void setup() { pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, LOW); - psnClient.begin(sSerial, myCallback); + psnClient.begin(sSerial, newData); //subscribe auf alle möglichen Topics psnClient.subscribe("*");