Hi all,
I'm very new to this (so please excuse my lack of technical terms!), and am trying to build an audio project for a university module.
I've done some of the more basic tutorials and they've all worked, and have basic coding knowledge, so hopefully I'll be able to get to grips with it asap! :-\
Right, my aim is to have 8 boxes (approx 8” x 8”) - each with a hole in the top. I want to have a photoresistor in each box that will trigger a sound when the hole is covered (less light gets in). The sounds need to be able to play simultaneously, and start/stop individually according to the amount of light getting in to each box. (I hope I'm making sense!)
So far I've used this:
int photocellPin = 0;
int photocellReading;
void setup(void) {
Serial.begin(9600);
}
void loop(void) {
photocellReading = analogRead(photocellPin);
Serial.print("Analog reading = ");
Serial.print(photocellReading);
if (photocellReading < 500) {
Serial.println(" - Play");
} else {
Serial.println(" - Stop");
}
delay(1000);
}
Which seems to be working (as a basic starting point!)
My next couple of tasks are:
- Getting the sound to play when the photocellReading is low. This is where I need you advice please! Is there a (simple??) way of getting a sound to play through a pc? Maybe a .wav? If I can get this working then I'll be one step closer to my goal.
Do you think there will be a way of getting multiple sound files to run at once? Any possible solution suggestions (if this is a problem) would be very very much appreciated!
- Hooking up multiple photoresistors, so that multiple sounds can be played. I will no doubt run into problems here(!), so if you can see any obvious flaws in this plan please do give me a heads up! Is there a maximum number of ‘boxes’ a could have from one Arduino board?
I'm hoping to make this in to a large audio installation, and plan to make ceramic boxes and a specialised wooden table. This is where my strengths lie, so any help with the technical side of things would be greatly appreciated!!!
Thank you in advance
(If I haven't been clear, or haven't given enough information, please feel free to (call me an idiot) ask for a clearer description ....)