SapFlow Probe
A low-cost HRM probe for measuring a tree's water consumption
pinout.h File Reference
#include <pt.h>
#include <FeatherFault.h>

Enumerations

enum  pinout {
  EN_3v3 = 5, EN_5v = 6, SD_CS = 10, HEATER = 17,
  ALARM_PIN = 12, STATUS_LED = 13, I2C_SDA = 20, I2C_SCL = 21,
  SPI_SCK = 24, SPI_MOSI = 23, SPI_MISO = 22, TX = 1,
  RX = 0, RFM95_CS = 8, RFM95_RST = 4, RFM95_INT = 3
}
 Pin definitions for our project. More...
 

Functions

void hardware_init (void)
 Initializes the hardware. More...
 
void hardware_deinit (void)
 De-initializes hardware. More...
 

Enumeration Type Documentation

◆ pinout

enum pinout

Pin definitions for our project.

This enum defines the board pinout. It is similar to using DEFINE, but has the added benefit of preventing address conflicts.

Enumerator
EN_3v3 

Control pin for 3.3V power rail. Output, Active-low.

EN_5v 

Control pin for 5v Power rail. Output, Active-high.

SD_CS 

SPI chip select for SD card. Output, Active-low.

HEATER 

Control pin for heater switch. Output, Active-high.

ALARM_PIN 

Interrupt pin from RTC. Pull-up, Active-low.

STATUS_LED 

Built-in LED on feather. Active-high.

I2C_SDA 

I2C data pin. Pull-up.

I2C_SCL 

I2C clock pin. Pull-up.

SPI_SCK 

SPI clock pin. Output.

SPI_MOSI 

SPI data pin. Output.

SPI_MISO 

SPI data pin. Input.

TX 

Serial1 transmit, used for RS232. Output.

RX 

Serial1 receive, used for RS232. Input.

RFM95_CS 

SPI chip select used for LoRa. Output, Active-low.

RFM95_RST 

Reset pin used for LoRa. Output. Active-low?

RFM95_INT 

Interrupt pin used for LoRa. Input. Active-low?

Function Documentation

◆ hardware_deinit()

void hardware_deinit ( void  )

De-initializes hardware.

Used before sleeping to save power

References EN_3v3, EN_5v, SD_CS, SPI_MOSI, SPI_SCK, and STATUS_LED.

Referenced by feather_sleep().

◆ hardware_init()

void hardware_init ( void  )

Initializes the hardware.

Used at startup or when waking from sleep

References EN_3v3, EN_5v, HEATER, I2C_SCL, I2C_SDA, RFM95_CS, sd, SD_CS, SPI_MOSI, SPI_SCK, and STATUS_LED.

Referenced by feather_sleep(), and setup().