This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <readiness_io.h> | |
#include "config.h" | |
const int LED_PIN = 4; // The pin connecting the LED (D3) | |
const int INTERRUPT_PIN = 14; // The pin connect the test button (D5) | |
volatile byte interrupt = 0; | |
static unsigned long last_interrupt_time = 0; | |
readiness_io client(CHANNEL_ID, TOPIC, SENSOR_ID, VERSION, FORMAT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const String CHANNEL_ID = "XXXXXX"; // The Readiness.io channel ID | |
const String SENSOR_ID = "XXXXXX"; // Your AgriWebb or made up sensor ID | |
const String TOPIC = "switch-generic"; // The type of sensor or name of the data your sending | |
const String VERSION = "1"; | |
const String FORMAT = ""; | |
const char* WIFI_SSID = "XXXXXX"; // Your WiFi SSID / name | |
const char* WIFI_PASS = "XXXXXX"; // Your WiFi password | |
const uint8_t TIMEZONE_OFFSET = 10; // The timezone the sensor is located in (eg. 10 for GMT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const String CHANNEL_ID = "XXXXXXXXX"; // The Readiness.io channel ID | |
const String SENSOR_ID = "XXXXXXXXX"; // Your AgriWebb or made up sensor ID | |
const String TOPIC = "solenoid-valve"; // The type of sensor or name of the data your sending | |
const String VERSION = "1"; | |
const String FORMAT = ""; | |
const char* WIFI_SSID = "XXXXXXXXX"; // Your WiFi SSID / name | |
const char* WIFI_PASS = "XXXXXXXXX"; // Your WiFi password | |
const uint16_t UPDATE_RATE = 5; // How long to wait between sending data back (in seconds) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <readiness_io.h> | |
#include <Ticker.h> | |
#include "config.h" | |
const int LED_PIN = 5; // The pin connecting the LED (D3) | |
const int INTERRUPT1_PIN = 14; // The pin connects the test button (D5) | |
const int INTERRUPT2_PIN = 12; // The pin connects the 2nd test button (D6) | |
const int SOLENOID_PIN = 13; // The pin connects to the relay (D7) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <readiness_io.h> | |
#include <Ticker.h> | |
#include "config.h" | |
const int LED_PIN = 0; // The pin connecting the LED (D3) | |
const int INTERRUPT_PIN = 14; // The pin connect the test button (D5) | |
const int RAIN_PIN = 5; // The pin connect the tipping bucket sensor (D1) | |
volatile double RAIN_HEIGHT = 0; // variable for storing the rain_height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const String CHANNEL_ID = "XXXXXXXXXXXXXX"; // The Readiness.io channel ID | |
const String SENSOR_ID = "XXXXXXXXXXXXXXX"; // Your AgriWebb or made up sensor ID | |
const String TOPIC = "rain-gauge"; // The type of sensor or name of the data your sending | |
const String VERSION = "1"; | |
const String FORMAT = ""; | |
const char* WIFI_SSID = "XXXXXXX"; // Your WiFi SSID / name | |
const char* WIFI_PASS = "XXXXXXX"; // Your WiFi password | |
const uint16_t UPDATE_RATE = 120; // How long to wait between sending data back (in seconds) |