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.

53 lines
1.9 KiB

7 years ago
#ifndef _HARDWARE_H
#define _HARDWARE_H
/* pin assignments */
// LED_BUILTIN = 2
// KEY_BUILTIN = 0
7 years ago
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 = 17;
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 = 3600;
7 years ago
/* 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
7 years ago
* RST * BUTTON < 39 ROTARY_B only input, no pullups
* 0 * KEY_BUILTIN < 34 only input, no pullups
* 22 * ? < 35 only input, no pullups
7 years ago
* 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
* 2 * LED_B LoRa_RST * 14
7 years ago
* 4 * OLED_SDA * 12 MAX98_BCLK
* ROTARY_BTN 17 * * 13 MAX98_LRC
* 16 * OLED_RST * 21 WS2812B_DATA(?)
7 years ago
*/
/* Rotary Encoder
* 1 LED
* pinA A 2 LED pinA und PinB mit externen Pullups
7 years ago
* GND C 3 BTN -|
* pinB B 4 LED /
* 5 Vin -|
*/
#endif /* _HARDWARE_H */