Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add soil module registers enum #100

Merged
merged 2 commits into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Adafruit_seesaw.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ enum {
SEESAW_KEYPAD_BASE = 0x10,
SEESAW_ENCODER_BASE = 0x11,
SEESAW_SPECTRUM_BASE = 0x12,
SEESAW_SOIL_BASE = 0x13,
};

/** GPIO module function address registers
Expand Down Expand Up @@ -172,6 +173,21 @@ enum {
SEESAW_SPECTRUM_STATUS = 0xFF,
};

/** soil moisture module function address registers
*/
enum {
// 0x00..0x0F Global Settings
SEESAW_SOIL_STATUS = 0x00,
SEESAW_SOIL_RATE = 0x01,
// 0x10..0xF0 Sensor Settings
// lower four bits = sensor number
// upper four bits = setting type
SEESAW_SOIL_VALUE = 0x10,
SEESAW_SOIL_SAMPLES = 0x20,
SEESAW_SOIL_XDELAY = 0x30,
SEESAW_SOIL_TIMEOUT = 0x40,
};

#define ADC_INPUT_0_PIN 2 ///< default ADC input pin
#define ADC_INPUT_1_PIN 3 ///< default ADC input pin
#define ADC_INPUT_2_PIN 4 ///< default ADC input pin
Expand Down
Loading