I'm sorry if it's bad form to have my first post be begging for help, but I'm new to both Max and Arduino, and I'm also pretty down to the wire on a school project.
Project: I clap my hands together, a mic picks up the sound of me clapping and sends it to my patch, at which point a song and a lamp turn on. I'm going to communicate with the lamp through a 5v relay. I've gotten the hacked floor lamp to run Arduino's blink example. But for now I'm just using an LED for simplicity.
Attached is an image of the patch and the Arduino sketch I'm working with. It's quite possible there's problems with the code as well as the patch. Anyways, when I clap, the song turns on and my LED turns on, but it is very dim. I'm assuming this is because the metro object is sending out data really rapidly, and it can't totally turn on. Furthermore, when I do plug it into my hacked floor lamp, it doesn't work, and I'm assuming that's because the relay can't work that fast.
It's also totally possible that other things are wrong, but any help would be greatly appreciated at this point.
I've attached the maxpat and an image with the Arduino stuff.
at the moment, this patch is sending a rapid stream of ‘0’s to Arduino, and it therefore depends what you are doing with that data inside your code; therefore we need to see the code. If all you wish to do is turn on an LED when your audio input passes a threshold, then a constant stream of numbers isn’t necessary.