This is an example sketch for sending data to Craft Metrics from an ESP8266 or ESP32 microcontroller using the Arduino environment.
- ESP8266 Arduino or ESP32 Arduino
- The OneWire library is used in this example
- Connect a OneWire DS18B20 temperature sensor to GPIO 2
- Include a 4.7k pullup resistor
- Edit the top of the sketch to include your wifi credentials, and Craft Metrics account details.
The device will send data to Craft Metrics every 10 seconds. Log into your dashboard and create a new graph, selecting the device name from the list of measurements.