SapFlow Probe
A low-cost HRM probe for measuring a tree's water consumption
|
Go to the documentation of this file.
16 Serial.println(
"Serial connected");
28 pinMode(
EN_5v, OUTPUT);
35 digitalWrite(
EN_5v, HIGH);
38 pinMode(
SD_CS, OUTPUT);
static struct pt measure_thd
Protothread control structure for measure()
@ I2C_SCL
I2C clock pin. Pull-up.
static struct pt baseline_thd
Protothread control structure for baseline()
@ EN_5v
Control pin for 5v Power rail. Output, Active-high.
@ STATUS_LED
Built-in LED on feather. Active-high.
@ EN_3v3
Control pin for 3.3V power rail. Output, Active-low.
static struct pt sched_thd
Protothread control structure for measure()
int sample_timer(struct pt *pt)
Controls timing of the measurements.
@ SPI_MOSI
SPI data pin. Output.
void init(int period)
Initialize the watchdog at the period given.
void loop()
Implicit loop.
int measure(struct pt *pt)
Captures a measurement from the three probes.
static SdFat sd
File system object.
@ HEATER
Control pin for heater switch. Output, Active-high.
void setup()
One-time initialization.
@ RFM95_CS
SPI chip select used for LoRa. Output, Active-low.
static class FunctionMarker halt_location
Singleton of our debug class.
static struct pt delta_thd
Protothread control structure for delta()
static struct pt sample_timer_thd
Protothread control structure for sample_timer()
int schedule(struct pt *pt)
Controls general measurement schedule.
static bool sleep
Global flag to prep for sleep.
@ I2C_SDA
I2C data pin. Pull-up.
@ SPI_SCK
SPI clock pin. Output.
@ SD_CS
SPI chip select for SD card. Output, Active-low.