You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

78 lines
2.8 KiB

#ifndef _HARDWARE_H
#define _HARDWARE_H
/* pin assignments */
// LED_BUILTIN = 2
// KEY_BUILTIN = 0
static constexpr uint8_t buttonPin = 0;
static constexpr uint8_t sensorPin = 0;
static constexpr uint8_t rotaryPinA = 39;
static constexpr uint8_t rotaryPinB = 38;
static constexpr uint8_t rotaryPinButton = 2;
static constexpr uint8_t PROGMEM LED_PIN = 21;
static constexpr uint8_t PROGMEM NUM_LEDS = 10;
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
static constexpr uint8_t ext_wakeup_pin_1 = 0;
static constexpr uint8_t ext_wakeup_pin_2 = 0;
static constexpr uint32_t secondsToSleep = 15*60;
static constexpr int batteryLimit = 2800;
#define SX1276_SCK 5
#define SX1276_MISO 19
#define SX1276_MOSI 27
#define SX1276_CS 18
#define SX1276_RST 14
#define SX1276_IRQ 26
#define SX1276_BAND 868
/* Wiring (Heltec OLED Lora)
* GND O O GND
* 5V O O 5V
* 3V3 O O 3V3
* GND O < 36 only input, no pullups
* RX * (3) < 37 only input, no pullups
* TX * (1) < 38 ROTARY_A only input, no pullups
* RST * BUTTON < 39 ROTARY_B only input, no pullups
* 0 * KEY_BUILTIN < 34 only input, no pullups
* 22 * ? < 35 only input, no pullups
* BME280_SDO 19 * LoRa_MISO ? * 32
* BME280_CS 23 * ? * 33
* 18 x LoRa_CS * 25 MAX98_DIN
* BME280_SCL/SCK 5 * LoRa_SCK LoRa_IRQ * 26
* 15 * OLED_SCL LoRa_MOSI * 27 BME280_SDA/SDI
* ROTARY_BTN 2 * LED_B LoRa_RST * 14
* 4 * OLED_SDA * 12 MAX98_BCLK
* 17 * * 13 MAX98_LRC
* 16 * OLED_RST * 21 WS2812B_DATA(?)
*/
/* Rotary Encoder
* 1 LED
* pinA A 2 LED pinA und PinB mit zusätzlichen externen Pullups
* GND C 3 BTN -| --ROTARY_BTN
* pinB B 4 LED /
* 5 Vin -| --R?--3V3
*/
/* load-shedding idea: +5V
* |
* ---R2(1k)------|
* | |
* o------------|--| Q2
* | |>-° P-Channel MOSFET
* | |-- IRF9350 / SUP75P03-07-E3
* |/ T1 |
* gpio ---R1(10k)---| 2N2904 ---- LED/AMP Power 5V
* |\
* v
* |
* GND
* (https://www.pjrc.com/teensy/td_libs_OctoWS2811.html)
* (https://learn.adafruit.com/rgb-led-strips/usage) (IRLB8721 N-Channel)
*/
#endif /* _HARDWARE_H */