Browse Source

more documentation

main
Hendrik Langer 7 years ago
parent
commit
bdb581732b
  1. 29
      src/hardware.h
  2. 6
      src/main.cpp

29
src/hardware.h

@ -16,7 +16,7 @@ static constexpr uint8_t PROGMEM NUM_LEDS = 10;
static constexpr uint8_t ext_wakeup_pin_1 = 0;
static constexpr uint8_t ext_wakeup_pin_2 = 0;
static constexpr uint32_t secondsToSleep = 3600;
static constexpr uint32_t secondsToSleep = 30*60;
/* Wiring (Heltec OLED Lora)
@ -34,18 +34,35 @@ static constexpr uint32_t secondsToSleep = 3600;
* 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
* ROTARY_BTN 2 * LED_B LoRa_RST * 14
* 4 * OLED_SDA * 12 MAX98_BCLK
* ROTARY_BTN 17 * * 13 MAX98_LRC
* 17 * * 13 MAX98_LRC
* 16 * OLED_RST * 21 WS2812B_DATA(?)
*/
/* Rotary Encoder
* 1 LED
* pinA A 2 LED pinA und PinB mit externen Pullups
* GND C 3 BTN -|
* pinA A 2 LED pinA und PinB mit zusätzlichen externen Pullups
* GND C 3 BTN -| --ROTARY_BTN
* pinB B 4 LED /
* 5 Vin -|
* 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)
*/

6
src/main.cpp

@ -12,6 +12,8 @@
#include <Basecamp.hpp>
#include <Configuration.hpp>
#include "esp_wifi.h"
#include <U8g2lib.h>
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
@ -67,6 +69,8 @@ void setup() {
boot_count++;
static wifi_country_t wifi_country = {.cc="EU", .schan=1, .nchan=13, .policy=WIFI_COUNTRY_POLICY_AUTO};
esp_wifi_set_country(&wifi_country);
//Initialize Basecamp
iot.begin();
@ -277,7 +281,7 @@ void loop()
}
if(millis() - lastTransmit >= 60000) {
if(millis() - lastTransmit >= 60*1000) {
lastTransmit = millis();
transmitStatus();
}

Loading…
Cancel
Save