|
|
|
@ -19,7 +19,7 @@ I2CSoilMoistureSensor sensor_soil_catnip;
|
|
|
|
|
// Various tunables
|
|
|
|
|
#define ERROR_LED_PIN 13 |
|
|
|
|
#define ERROR_LED_LIGHTUP_STATE HIGH |
|
|
|
|
#define PIXEL_PIN 40 // pin of pixel
|
|
|
|
|
#define PIXEL_PIN 2 // pin of pixel -- 40 for metro on board pixel
|
|
|
|
|
#define PIXEL_MAX_BRIGHTNESS 48 // 255 max
|
|
|
|
|
#define PIXEL_MIN_BRIGHTNESS 4 // 0 min
|
|
|
|
|
#define BREATHE_DELAY 5 // milliseconds
|
|
|
|
@ -106,12 +106,12 @@ void setup() {
|
|
|
|
|
tft.setCursor(tft.width() / 2 - 138, tft.height() / 2 + 10); |
|
|
|
|
tft.println("Press Up/Down"); |
|
|
|
|
|
|
|
|
|
pinMode(BUTTON_UP, INPUT_PULLUP); |
|
|
|
|
pinMode(BUTTON_DOWN, INPUT_PULLUP); |
|
|
|
|
pinMode(BUTTON_OK, INPUT_PULLUP); |
|
|
|
|
attachInterrupt(digitalPinToInterrupt(BUTTON_UP), InterruptHandlerButtonUp, RISING); |
|
|
|
|
attachInterrupt(digitalPinToInterrupt(BUTTON_DOWN), InterruptHandlerButtonDown, RISING); |
|
|
|
|
attachInterrupt(digitalPinToInterrupt(BUTTON_OK), InterruptHandlerButtonOk, RISING); |
|
|
|
|
pinMode(BUTTON_UP, INPUT); |
|
|
|
|
pinMode(BUTTON_DOWN, INPUT); |
|
|
|
|
pinMode(BUTTON_OK, INPUT); |
|
|
|
|
attachInterrupt(digitalPinToInterrupt(BUTTON_UP), InterruptHandlerButtonUp, FALLING); |
|
|
|
|
attachInterrupt(digitalPinToInterrupt(BUTTON_DOWN), InterruptHandlerButtonDown, FALLING); |
|
|
|
|
attachInterrupt(digitalPinToInterrupt(BUTTON_OK), InterruptHandlerButtonOk, FALLING); |
|
|
|
|
|
|
|
|
|
sem_btn_up = xSemaphoreCreateBinary(); |
|
|
|
|
sem_btn_down = xSemaphoreCreateBinary(); |
|
|
|
|