-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create JSON over MQTT incremental code progression #16
Comments
3 sensors `// This codes assumes you have: #define BROKER_IP "broker.hivemq.com" #include "arduino_secrets.h" const char ssid[] = SECRET_SSID; #include <MQTT.h> #include <Arduino_JSON.h> #if 0 PN532_SPI pn532spi(SPI, 10); PN532_HSU pn532hsu(Serial1); #include <Adafruit_Sensor.h> #include "Ultrasonic.h" #define DHTPIN 2 DHT_Unified dht(DHTPIN, DHTTYPE); String code = "unkwonwn"; uint32_t delayMS; float temp; void connect() { void setup() { WiFi.begin(ssid, pass); // Initialize device. Serial.println(F("DHTxx Unified Sensor Example")); } void loop() { client.loop(); // Get temperature event and print its value.
}
} // read distance long RangeInCentimeters; // read light // read temperature // Read humidity // put everything ina Json Object JSONVar myObject; myObject["Brightness"] = light; // JSON.stringify(myVar) can be used to convert the json var to a String
client.publish("/Its-Gomba", jsonString); }` |
as in title
The text was updated successfully, but these errors were encountered: