Update 'Feather-M4-Express_NeoTrellis_Music-Maker-FeatherWing-w-Amp.ino'
This commit is contained in:
		@@ -91,7 +91,6 @@ static struct ripple ripples[MAX_RIPPLES];
 | 
			
		||||
 | 
			
		||||
//define a callback for key presses
 | 
			
		||||
TrellisCallback blink(keyEvent evt){
 | 
			
		||||
 | 
			
		||||
  for(int i=0; i<MAX_RIPPLES; i++){
 | 
			
		||||
    if(ripples[i].center == -1){
 | 
			
		||||
      //create a new ripple here
 | 
			
		||||
@@ -116,12 +115,9 @@ Adafruit_VS1053_FilePlayer musicPlayer =
 | 
			
		||||
void setup() {
 | 
			
		||||
  Serial.begin(115200);
 | 
			
		||||
 | 
			
		||||
  // Wait for serial port to be opened, remove this line for 'standalone' operation
 | 
			
		||||
  while (!Serial) { delay(1); }
 | 
			
		||||
/*  delay(500);
 | 
			
		||||
*/  
 | 
			
		||||
  if (! musicPlayer.begin()) { // initialise the music player
 | 
			
		||||
     Serial.println(F("Couldn't find VS1053, do you have the right pins defined?"));
 | 
			
		||||
  // Check availability of hardwarecomponents
 | 
			
		||||
  if (!musicPlayer.begin() or !SD.begin(SD_CARDCS) or !trellis.begin()) {
 | 
			
		||||
    Serial.println(F("Failed to initialize all hardwarecomponents (VS1053, Trellis or SD card)"));
 | 
			
		||||
    while(1);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -130,11 +126,6 @@ void setup() {
 | 
			
		||||
  musicPlayer.sineTest(0x44, 500);
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
  if (!SD.begin(SD_CARDCS)) {
 | 
			
		||||
    Serial.println(F("SD failed, or not present"));
 | 
			
		||||
    while (1);  // don't do anything more
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  // Set volume for left, right channels. lower numbers == louder volume!
 | 
			
		||||
  musicPlayer.setVolume(25,25);
 | 
			
		||||
  musicPlayer.useInterrupt(VS1053_FILEPLAYER_PIN_INT);  // DREQ int
 | 
			
		||||
@@ -145,14 +136,6 @@ void setup() {
 | 
			
		||||
  pinMode(NT_INTERRUPT, INPUT);
 | 
			
		||||
  randomSeed(analogRead(0));
 | 
			
		||||
 | 
			
		||||
  if(!trellis.begin()){
 | 
			
		||||
    Serial.println("could not start trellis");
 | 
			
		||||
    while(1);
 | 
			
		||||
  }
 | 
			
		||||
  else{
 | 
			
		||||
    Serial.println("trellis started");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  for(int i=0; i<MAX_RIPPLES; i++)
 | 
			
		||||
    ripples[i].center = -1;
 | 
			
		||||
 | 
			
		||||
@@ -176,15 +159,7 @@ void setup() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void loop() {
 | 
			
		||||
  Serial.print(".");
 | 
			
		||||
  // File is playing in the background
 | 
			
		||||
/*  if (musicPlayer.stopped()) {
 | 
			
		||||
    Serial.println("Done playing music");
 | 
			
		||||
    while (1) {
 | 
			
		||||
      delay(10);  // we're done! do nothing...
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
*/  if (Serial.available()) {
 | 
			
		||||
  if (Serial.available()) {
 | 
			
		||||
    char c = Serial.read();
 | 
			
		||||
    
 | 
			
		||||
    // if we get an 's' on the serial console, stop!
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user