|
|
@ -1,3 +1,11 @@ |
|
|
|
/*
|
|
|
|
* |
|
|
|
* Compile and flash: |
|
|
|
* platformio run --target upload && platformio device monitor -b 115200 |
|
|
|
* Decode stack trace: |
|
|
|
* addr2line -pfiaC -e .pioenvs/heltec_wifi_lora_32/firmware.elf 0x4013abed:0x3ffe35d0 |
|
|
|
*/ |
|
|
|
|
|
|
|
#include <Arduino.h> |
|
|
|
|
|
|
|
//Include Basecamp in this sketch
|
|
|
@ -38,7 +46,7 @@ BME280 bme280; |
|
|
|
MP3 mp3; |
|
|
|
Rotary rotary; |
|
|
|
Screen* screen; |
|
|
|
Led led; |
|
|
|
//Led led;
|
|
|
|
|
|
|
|
menuType menuChange = eNone; |
|
|
|
uint32_t lastButtonPress = 0; |
|
|
@ -138,7 +146,7 @@ Serial.println(strftime_buf); |
|
|
|
} |
|
|
|
|
|
|
|
mp3.begin(); |
|
|
|
led.setup(); |
|
|
|
// led.setup();
|
|
|
|
|
|
|
|
rotary.registerCallback(rotation); |
|
|
|
rotary.begin(rotaryPinA, rotaryPinB, rotaryPinButton); |
|
|
@ -244,6 +252,9 @@ void loop() |
|
|
|
strftime(timeStr, sizeof(timeStr), "%H:%M:%S", &timeinfo); |
|
|
|
sprintf(weatherStr, "%.1f°C %.1f%% %.0fhPa", bme280.readTemperature(), bme280.readHumidity(), bme280.readPressure()); |
|
|
|
|
|
|
|
Serial.print("Free Heap: "); |
|
|
|
Serial.println(ESP.getFreeHeap()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(millis() - lastTransmit >= 60000) { |
|
|
|