Go Down

Topic: help! photocell needs to trigger mp3 (Read 591 times) previous topic - next topic

efundis

I'm brand new to arduino, and I've been digging my own grave by making everything more complex than it needs to be-

I know how to wire the board, but I'm clueless as to how to code it.  Basically, I need to make it so that when my photocell detects light, it triggers an mp3 on my computer or through iTunes (I have a mac).  If someone could so kindly steer me towards a code that would work for this, I would be incredibly grateful.


Thank you so much!
Emily

MikMo

You will need some software on the Mac that can read the serial port and start the MP3 file playing.
Arduino nows nothing about Mac's / PC's / folders / files and all that.

It's easy to set up the photoresistor as a voltage divider and use Analog read on the arduino board to get a "light level" reading. Then send something over the seral line to the Mac, but theres no way the Arduino board can start playing a MP3 file on the Mac. Some program on the Mac must be listening on the serial port for what the Arduino board sends and take action.

efundis

Quote
You will need some software on the Mac that can read the serial port and start the MP3 file playing.
Arduino nows nothing about Mac's / PC's / folders / files and all that.

It's easy to set up the photoresistor as a voltage divider and use Analog read on the arduino board to get a "light level" reading. Then send something over the seral line to the Mac, but theres no way the Arduino board can start playing a MP3 file on the Mac. Some program on the Mac must be listening on the serial port for what the Arduino board sends and take action.


thank you!  I think I got it now.

Go Up