#include "main.hpp" #include "AutomForArduino.cpp" #undef timeout #include "mqtt/async_client.h" int main() { callback cb; client.set_callback(cb); mqtt::connect_options connOpts; connOpts.set_clean_session(true); connOpts.set_user_name("admin"); connOpts.set_password("geii2025"); try { client.connect(connOpts)->wait(); client.start_consuming(); client.subscribe(TOPIC, QOS)->wait(); } catch (const mqtt::exception &exc) { std::cerr << "Erreur MQTT: " << exc.what() << "\n"; } while (1) { s0 = b0; s1 = b1; s2 = b2; s3 = b3; s4 = b4; s5 = b5; s6 = b6; s7 = b7; mqtt_process(&client); } mqtt_close(); return 0; }