Initial commit, getting all the stuff from PlatformIO
This commit is contained in:
19
.pio/libdeps/esp32dev/PicoMQTT/benchmark/benchmark.ino
Normal file
19
.pio/libdeps/esp32dev/PicoMQTT/benchmark/benchmark.ino
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <Arduino.h>
|
||||
#include <PicoMQTT.h>
|
||||
|
||||
PicoMQTT::Server mqtt;
|
||||
|
||||
void setup() {
|
||||
// Usual setup
|
||||
Serial.begin(115200);
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.begin("wifiname", "password");
|
||||
while (WiFi.status() != WL_CONNECTED) { delay(1000); }
|
||||
Serial.printf("WiFi connected, IP: %s\n", WiFi.localIP().toString().c_str());
|
||||
mqtt.begin();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// This will automatically handle client connections. By default, all clients are accepted.
|
||||
mqtt.loop();
|
||||
}
|
||||
Reference in New Issue
Block a user