This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot:examples:current [2021/03/04 23:21] – heiko.pikner | en:iot:examples:current [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| #include " | #include " | ||
| #include < | #include < | ||
| + | |||
| + | #define WIFI_NAME " | ||
| + | #define WIFI_PASSWORD " | ||
| // Pin definition for the current sensor | // Pin definition for the current sensor | ||
| Line 45: | Line 48: | ||
| Serial.begin(115200); | Serial.begin(115200); | ||
| Serial.println(" | Serial.println(" | ||
| + | |||
| + | // | ||
| + | // | ||
| + | | ||
| // print json config to serial | // print json config to serial | ||
| iot.printConfig(); | iot.printConfig(); | ||
| Line 70: | Line 77: | ||
| String msg = String(val); | String msg = String(val); | ||
| // publishing measured current value to a MQTT broker | // publishing measured current value to a MQTT broker | ||
| - | iot.publishMsg(" | + | iot.publishMsg(" |
| // sending measured current value to a computer | // sending measured current value to a computer | ||
| Serial.println(msg); | Serial.println(msg); | ||
| } | } | ||
| } | } | ||
| + | |||
| </ | </ | ||