Compare commits
No commits in common. "61d9502e5517f8190d775c56e1724d78b69e5735" and "11cf1cf78259dab472622a6d3ab881c77b616e58" have entirely different histories.
61d9502e55
...
11cf1cf782
13
Makefile
13
Makefile
@ -1,13 +0,0 @@
|
|||||||
PHONY:
|
|
||||||
|
|
||||||
compile: esp32_radio/esp32_radio.ino esp32_radio/wifiinfo.h
|
|
||||||
arduino-cli compile --fqbn esp32:esp32:esp32 esp32_radio
|
|
||||||
|
|
||||||
upload:
|
|
||||||
arduino-cli upload -p /dev/ttyUSB0 -b esp32:esp32:esp32 esp32_radio
|
|
||||||
|
|
||||||
watch:
|
|
||||||
screen /dev/ttyUSB0 115200
|
|
||||||
|
|
||||||
all: compile upload watch
|
|
||||||
|
|
@ -26,27 +26,11 @@ void setup() {
|
|||||||
pinMode(STATUSLED, OUTPUT);
|
pinMode(STATUSLED, OUTPUT);
|
||||||
pinMode(POWERBUTTON, INPUT);
|
pinMode(POWERBUTTON, INPUT);
|
||||||
|
|
||||||
esp_sleep_enable_ext0_wakeup(POWERBUTTON, 1);
|
|
||||||
|
|
||||||
esp_sleep_wakeup_cause_t source_reveil;
|
|
||||||
|
|
||||||
source_reveil = esp_sleep_get_wakeup_cause();
|
|
||||||
|
|
||||||
Serial.println(source_reveil);
|
|
||||||
|
|
||||||
switch(source_reveil){
|
|
||||||
case ESP_SLEEP_WAKEUP_EXT0 :
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
Serial.println("Deepsleep mod -- first boot");
|
|
||||||
delay(500);
|
|
||||||
esp_deep_sleep_start();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
wifi_init();
|
wifi_init();
|
||||||
wifi_info();
|
wifi_info();
|
||||||
|
|
||||||
|
esp_sleep_enable_ext0_wakeup(POWERBUTTON, 1);
|
||||||
|
|
||||||
audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
|
audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
|
||||||
audio.setVolume(30);
|
audio.setVolume(30);
|
||||||
// audio.connecttohost("http://192.168.2.216:8000/06%20-%20H4dopi.mp3");
|
// audio.connecttohost("http://192.168.2.216:8000/06%20-%20H4dopi.mp3");
|
||||||
|
Loading…
Reference in New Issue
Block a user