FINAL PROJECT, WEEK 8, POST 3

It seems as though the entire circuit doesn’t work when the two boards share a voltage… I tried plugging in 5V from the mega into the Vin port of the UNO and a common ground, and it doesn’t work. Additionally, when both boards are hooked up to a computer, it still doesn’t work.

IMG_3944

So, Ms. Jimenez and I decided to use GPIO pins for easy transfer.

IMG_3945

However, the GPIO pins only take in 3V, so we have to create a voltage divider. Ms. Jimenez calculated the resistance necessary for a 3V output with a 5V input. It came out to be a 10 and 15 Ohm resister in series for a total of 25 Ohms:

IMG_3946

Because I had proctor duty, I wasn’t able to work on this… BUT I want to go in early and get it done! It’s the final hurrah!

FINAL PROJECT, WEEK 8, POST 2

THE METHOD WORKS! IT WAS EXTREMELY LONG TO CODE OUT, BUT I GOT IT!!!

The only thing that’s not working now is the audio… The serial monitor prints out “Playing (instrument x)”, but the audio isn’t working. I tested out multiple scenarios and these are the two that give me a hint as to what’s going on:

  1. Power UNO with headphones on, automatically starts playing Synth 2 (code is 0010). Once I power MEGA, code reverts to 0000, but no audio can be played. The serial monitor still prints out what instrument should be playing
  2. Power MEGA with headphones on, then UNO, and when I press a button I hear some feedback, but no file is being played… mysterious…

I’m meeting with Ms. Jimenez tomorrow to discuss what we can do now… I’m so close! I’m going to get this done for sure…

FINAL PROJECT, WEEK 8, POST 1

After a long discussion with Ms. Jimenez, we came up with this new method:

Use a second arduino that would be connected to the mega and the music shield. The connection to the mega would be four ports, from digital port to digital port. This would send a signal, either one or zero, and based off what the signal of the four digital ports read, the music player will play a certain sound. For example:

Screen Shot 2016-05-26 at 2.55.29 AM

So the MEGA would be sending this information to the sound board, signaling that the “zipper button” was pressed. The UNO code would look like:

Screen Shot 2016-05-26 at 2.56.39 AM

Although the method is pretty redundant and messy, it makes sense. I hope it works….

FINAL PROJECT, WEEK 7, POST 2

Still no progress in regards to push-results in-audio. Rachel had a problem where two devices wouldn’t want to work together, so I asked her what was wrong. Apparently the two devices she was using were SPI devices, which are difficult to work with using one microprocessor and multiple slave devices. This means I have to turn one SPI off when I want the other to function, and vice versa.

After a lot of reading on websites, I came to the conclusion that:

  • Even if I fix the SPI problem, I need both devices to be working with each other (button press both lights up the LED AND plays audio).
  • I’m not dealing with two SPI devices, because the push-board isn’t a shield, nor does it use SPI. So SPI interference isn’t what I’m dealing with.

To be quite honest, I’m getting pretty frustrated and I don’t know what to do… I need to come up with a method in which both devices can work together…

FINAL PROJECT, WEEK 7, POST 1

Now to seriously consider how to get audio and push to work…

The space that the example code provided for other things to occur didn’t work… I need to understand why and how I can overcome the problem. When the shield is attached to the MEGA and I run the program, the buttons won’t even press. This is very confusing… All I did was add the set-up code from the Music Maker into the void setup(), and the loop code from the Music Maker into the void loop()… Theoretically, it should be smooth sailing but for some reason it’s not working…

FINAL PROJECT, WEEK 6, POST 1

Science Symposium is this week! I spent most of class time working on my poster, so not much progress in terms of my project… I DID get the multi color light up to work:

IMG_3926

This is personally a major milestone! I’m super close to getting all components of this project to work together!

FINAL PROJECT, WEEK 5, POST 2

So I cut my wires so it looks clean now, and it’s looking good now:IMG_3923

I also tried the example 1 code, where a button will light up individually in a certain sequence (color red). For some reason, a whole row of red doesn’t light up…?

IMG_3924

I also tried example two, where red will light up on any button I press:

IMG_3925

No audio yet… I want to be able to press the buttons first, then i can worry about the buttons!

FINAL PROJECT, WEEK 4, POST 2

2My code is not working AT ALL, and it’s most definitely because of the hardware… I bought two-prong LED’s, but the PCB calls up for 4-prong RGB LED’s… So I placed an order, but I don’t know when it’ll arrive. Meanwhile, I’ve decided to unsolder all of the LED’s that I’ve already attached.

I’m messing around with the code while I wait for my RGB LED’s, and I found a sample online that I could use… There’s a section of the button press where I can add a “play audio file x”:
if ( debounce_count[current][j] < MAX_DEBOUNCE)
{
debounce_count[current][j]++;
if ( debounce_count[current][j] == MAX_DEBOUNCE )
{
Serial.print(“Key Down “);
Serial.println((current * NUM_BTN_ROWS) + j);

// Do whatever you want to with the button press here:
// toggle the current LED state
LED_buffer[current][j] = !LED_buffer[current][j];
}
}
}

I put in the music maker shield code in there for now… let’s see how it goes.