mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
testing cpp
This commit is contained in:
@@ -23,14 +23,15 @@ void setup(){
|
||||
|
||||
int main(){
|
||||
setup();
|
||||
while(true){
|
||||
readMQTT();
|
||||
}
|
||||
client.run();
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string readMQTT()
|
||||
{
|
||||
while (true) {
|
||||
std::string message = client.getLastMessage();
|
||||
if (!message.empty()) {
|
||||
std::cout << "MQTT Message: " << message << std::endl;
|
||||
@@ -40,7 +41,6 @@ std::string readMQTT()
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int movement()
|
||||
|
Reference in New Issue
Block a user