// Install UIPEthernet for ENC28J60
// https://github.com/UIPEthernet/UIPEthernet
#define THINGER_SERIAL_DEBUG
#include <ThingerENC28J60.h>
#include "arduino_secrets.h"
ThingerENC28J60 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
// open serial for debugging
// ENC28J60 using fixed IP Address. DHCP is too big for the sketch.
uint8_t mac[6] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05};
Ethernet.begin(mac, IPAddress(192, 168, 1, 125));
pinMode(LED_BUILTIN, OUTPUT);
// pin control example (i.e. turning on/off a light, a relay, etc)
thing["led"] << digitalPin(LED_BUILTIN);
// resource output example (i.e. reading a sensor value)
thing["millis"] >> outputValue(millis());
// more details at http://docs.thinger.io/arduino/