Final Project Update

Concept Recap

For my final project, I decided to make a radio that changes FM values according to what number you turn the potentiometer dial to (I will input song files that play according to their designated serial monitor value).

Each range of values will take you to a different channel.

This includes:

  • 4-204 (Hip Hop), which is designated the variable RED on p5
  • 205-408 (Historic Events), variable YELLOW on p5
  • 409-612 (Classic Rock/ Oldies), variable GREEN on p5
  • 613-816 (Classical), variable TEAL on p5
  • 817-1023 (Khaleeji), variable BLUE on p5

For 0-3 Radio is switched off (variable OFF on p5)

Design and Circuit

 

 

 

 

 

 

 

 

 

Still kind of stuck on what more to add to the bottom half of the p5 design, so it’s still subject to change!

 

 

 

 

 

 

 

 

Arduino circuit is done, but still trying to see if I can fit making a cardboard/ wood covering in time. 

Note:

I need to lengthen the potentiometer diodes as they aren’t as tall as the LEDs’ diodes (I want to make a simple cardboard covering that hides everything but the potentiometer and the LEDs– basically anything that isn’t going to be used by the user).

Updates

I added variables that would encompass the ranges on both Arduino and p5, so instead of the designated range numbers from 0-1023 popping up, the numbers 0-6 would pop up for each input in the serial monitor on p5/ Arduino.

  • In p5, this is written in if statements:
else if (inData == GREEN) {

greenSongs(); // calls function that plays songs
// replace with randomized array?

noStroke();
fill (128,172,57); // text color
textFont(radioFont, 45); // (font name, font size)
text("CLASSIC ROCK", 142, 148); // (text, x, y)
glow(color(128,172,57), 19); // calls glow function

}
  • In Arduino, this is done by simply adding the integer currentColor which would equal each value from 0-6 depending on what the potentiometer value is. For example:
else if ((potMeasure >= 409) && (potMeasure < 613)) {
  currentColor = 4;
  digitalWrite (greenPin, HIGH);
  digitalWrite (redPin, LOW);
  digitalWrite (yellowPin, LOW);
  digitalWrite (tealPin, LOW);
  digitalWrite (bluePin, LOW);
  int GREEN = 3;
}

User Testing

Improvements to be made

  • The music was being played in function draw (), so it started to play in an infinite loop. I tried to fix this by adding another function that plays the music when draw calls it, but that didn’t work. The song just keep playing a thousand times per second and became inaudible.
  • I might cut up a wooden or cardboard slab to cover all the wires, but I don’t know if I’ll have time to do that until I figure out the software of playing the music files without them being on a loop.Welcome to you're "DOOM!"

Leave a Reply