Wifi switched off, 80MHz MCU and lower volume

This commit is contained in:
Jens Noack 2021-05-21 07:51:24 +02:00
parent c8319d86a8
commit 3d9c9a3f0b
6 changed files with 14 additions and 1 deletions

BIN
audio/01Elefant.wav Normal file

Binary file not shown.

Binary file not shown.

View file

@ -14,3 +14,6 @@ board = d1_mini_pro
framework = arduino framework = arduino
monitor_speed = 115200 monitor_speed = 115200
lib_deps = salvadorrueda/SerialMP3Player@^1.1.0 lib_deps = salvadorrueda/SerialMP3Player@^1.1.0
; set frequency to 160MHz
board_build.f_cpu = 80000000L

View file

@ -1,4 +1,5 @@
#include "SerialMP3Player.h" #include "SerialMP3Player.h"
#include <ESP8266WiFi.h>
#define TX D3 #define TX D3
#define RX D2 #define RX D2
@ -35,15 +36,24 @@ bool button_pressed(unsigned int button_pin){
} }
void setup() { void setup() {
Serial.begin(115200); // start serial interface Serial.begin(115200); // start serial interface
pinMode(BUTTON,INPUT_PULLUP); pinMode(BUTTON,INPUT_PULLUP);
WiFi.mode(WIFI_OFF);
WiFi.forceSleepBegin();
delay(10);
mp3.begin(9600); // start mp3-communication mp3.begin(9600); // start mp3-communication
delay(500); // wait for init delay(500); // wait for init
mp3.setVol(25);
delay(500);
mp3.sendCommand(CMD_SEL_DEV, 0, 2); //select sd-card mp3.sendCommand(CMD_SEL_DEV, 0, 2); //select sd-card
delay(500); // wait for init delay(500); // wait for init
mp3.setVol(30);
} }
// the loop function runs over and over again forever // the loop function runs over and over again forever