Light sensors controlling a piezo speaker?

Hi all,

I'm in an Arduino programming class (it's mandatory + I'm not a programmer = bad combo) and am researching how to have multiple light sensors controlling a piezo speaker. No luck online, so I came here!

In the meantime, I'm testing the waters with LEDs, one per photocell. But in the end, I will like to have either (hopefully) one photocell per piezo speaker OR several (maybe 8 or more?) photocells for one piezo speaker.

My teacher recommended a MUX—this one in particular: https://www.sparkfun.com/products/9056 He has a lot of students to get to, and it's really hard for me to figure this out on my own.

Any help out there, please?

  • It's Arduino Uno

Thanks a million in advance!

sketchur

So, what's happening right now? Do you have some photocells connected? Are you able to make the LED brightness change with the light level?

I'm in an Arduino programming class

What have you learned so far? Have you learned how to read the analog input and send it to the serial monitor? Have you learned how to make sounds with a piezo?

You say you're not a programmer, but do you understand the electronic hardware?

In the meantime, I'm testing the waters with LEDs, one per photocell.

Good! You need to break-down the project into separately-testable parts:

1. Getting a voltage from a photocell and reading the related value from the ADC. Confirming those values via the USB serial monitor. 2. Making sounds with a piezo. Changing the sounds based on values that will eventually come from the ADC. 3.If you are using an Arduino Uno, and the 6 analog inputs are not enough, hook-up a multiplexer and write the code to control the MUX and read the data. 4. Putting everything together in software so the light levels affect the sound.

I'm in an Arduino programming class (it's mandatory + I'm not a programmer = bad combo)

What's your major? If you are majoring in electronics, you'll need to know some programming... For any engineering or science, you should know some programming...