Commit bd6cc939 authored by Johannes Barop's avatar Johannes Barop

commented out not working stuff

parent 250dd8fb
......@@ -76,10 +76,11 @@ void setup() {
}
// Init SPI SS pins
Serial.println("Init pins ...");
pinMode(RC522_CS, OUTPUT);
digitalWrite(RC522_CS, HIGH);
pinMode(SD_CS, OUTPUT);
digitalWrite(SD_CS, HIGH);
// pinMode(SD_CS, OUTPUT);
// digitalWrite(SD_CS, HIGH);
pinMode(BREAKOUT_CS, OUTPUT);
digitalWrite(BREAKOUT_CS, HIGH);
pinMode(BREAKOUT_DCS, OUTPUT);
......@@ -97,11 +98,11 @@ void setup() {
Serial.println();
//Initialize the SdCard.
if (!SD.begin(SD_CS)) {
Serial.println(F("Could not initialize SD card"));
SD.initErrorHalt();
}
Serial.println(F("SD initialized"));
// if (!SD.begin(SD_CS)) {
// Serial.println(F("Could not initialize SD card"));
// SD.initErrorHalt();
// }
// Serial.println(F("SD initialized"));
// initialise the music player
if (!musicPlayer.begin()) { // initialise the music player
......@@ -121,18 +122,18 @@ void setup() {
Serial.println(F("VS1053 soft reset done"));
if (patchVS1053()) {
// if (patchVS1053()) {
// Enable Mono Output
musicPlayer.sciWrite(VS1053_REG_WRAMADDR, 0x1e09);
musicPlayer.sciWrite(VS1053_REG_WRAM, 0x0001);
// musicPlayer.sciWrite(VS1053_REG_WRAMADDR, 0x1e09);
// musicPlayer.sciWrite(VS1053_REG_WRAM, 0x0001);
//
// Enable differential output
/*uint16_t mode = VS1053_MODE_SM_DIFF | VS1053_MODE_SM_SDINEW;
musicPlayer.sciWrite(VS1053_REG_MODE, mode); */
Serial.println(F("VS1053 patch installed"));
} else {
Serial.println(F("Could not load patch"));
}
// musicPlayer.sciWrite(VS1053_REG_MODE, mode); */
// Serial.println(F("VS1053 patch installed"));
// } else {
// Serial.println(F("Could not load patch"));
// }
Serial.print(F("SampleRate "));
Serial.println(musicPlayer.sciRead(VS1053_REG_AUDATA));
......@@ -163,6 +164,7 @@ void setup() {
}
void loop() {
if (playing == PLAYING_FILE) {
if (musicPlayer.playingMusic) {
......@@ -458,6 +460,7 @@ void playHttp() {
http.begin(currentStreamUrl);
int httpCode = http.GET();
int len = http.getSize();
Serial.println(httpCode);
if ((httpCode != HTTP_CODE_OK) || !(len > 0 || len == -1)) {
Serial.println(F("Webradio request failed"));
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment