|
@ -40,7 +40,7 @@ |
|
|
|
|
|
|
|
|
extern "C" { |
|
|
extern "C" { |
|
|
int rom_phy_get_vdd33(); |
|
|
int rom_phy_get_vdd33(); |
|
|
//uint8_t temprature_sens_read();
|
|
|
uint8_t temprature_sens_read(); |
|
|
//uint32_t hall_sens_read();
|
|
|
//uint32_t hall_sens_read();
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -49,6 +49,7 @@ U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ 16, /* clock=*/ 15 |
|
|
|
|
|
|
|
|
char timeStr[20]; |
|
|
char timeStr[20]; |
|
|
char weatherStr[32]; |
|
|
char weatherStr[32]; |
|
|
|
|
|
char statusStr[32]; |
|
|
RTC_DATA_ATTR static int boot_count = 0; |
|
|
RTC_DATA_ATTR static int boot_count = 0; |
|
|
RTC_DATA_ATTR struct tm alarmTime; |
|
|
RTC_DATA_ATTR struct tm alarmTime; |
|
|
RTC_DATA_ATTR bool alarmArmed = false; |
|
|
RTC_DATA_ATTR bool alarmArmed = false; |
|
@ -382,9 +383,10 @@ void loop() |
|
|
lastButtonPress = millis(); |
|
|
lastButtonPress = millis(); |
|
|
led.wakeUpLight(0); |
|
|
led.wakeUpLight(0); |
|
|
Serial.println("WAKEUP TIME!!!!!"); |
|
|
Serial.println("WAKEUP TIME!!!!!"); |
|
|
mp3.setVolume(2); |
|
|
// mp3.setVolume(10);
|
|
|
// mp3.start_Progmem();
|
|
|
// mp3.start_Progmem();
|
|
|
// delay(1500);
|
|
|
// delay(1500);
|
|
|
|
|
|
mp3.setVolume(2); |
|
|
mp3.start("http://radioessen.cast.addradio.de/radioessen/simulcast/high/stream.mp3"); |
|
|
mp3.start("http://radioessen.cast.addradio.de/radioessen/simulcast/high/stream.mp3"); |
|
|
led.changeAnimation(2, 0); |
|
|
led.changeAnimation(2, 0); |
|
|
} |
|
|
} |
|
@ -396,8 +398,8 @@ void loop() |
|
|
Serial.printf("voltage: %d\n", voltage); |
|
|
Serial.printf("voltage: %d\n", voltage); |
|
|
|
|
|
|
|
|
strftime(timeStr, sizeof(timeStr), "%H:%M:%S", &timeinfo); |
|
|
strftime(timeStr, sizeof(timeStr), "%H:%M:%S", &timeinfo); |
|
|
sprintf(weatherStr, "%.1f°C %.1f%% %dmV", bme280.readTemperature(), bme280.readHumidity(), voltage); |
|
|
sprintf(weatherStr, "%.1f°C %.1f%% %.0fhPa", bme280.readTemperature(), bme280.readHumidity(), bme280.readPressure()); |
|
|
// sprintf(weatherStr, "%.1f°C %.1f%% %.0fhPa", bme280.readTemperature(), bme280.readHumidity(), bme280.readPressure());
|
|
|
sprintf(statusStr, "%.1f°C %dmV %u %s", temperatureRead(), voltage, ESP.getFreeHeap()/1024, isAlarmActive()?"A":"_"); |
|
|
|
|
|
|
|
|
Serial.print("Free Heap: "); |
|
|
Serial.print("Free Heap: "); |
|
|
Serial.println(ESP.getFreeHeap()); |
|
|
Serial.println(ESP.getFreeHeap()); |
|
|