We just learned about arduinos in electronics class. I have a project due next week and I'm still struggling with the concepts. Here is what I want to do:
I want to play a song on the speaker connected to the arduino, while simultaneously displaying some visual display corresponding to the song. I want to have multiple songs and displays, and they have to be triggered by something, like a button on the laptop keyboard.
I've been playing around with the arduino tone function, and it's simple enough. My professor said that I need processing for the visual display, so I was wondering if I could run the processing program simultaneously with the arduino?
On a side note, I'd love to be able to harmonize the songs. I know I can't run two tone functions at once, and sending mixed frequencies to the speaker is very difficult. Is it possible to run two arduino programs at once, though? Or any other way to play chords?
DanLo1108:
so I was wondering if I could run the processing program simultaneously with the arduino?
Arduino sketches run on an Arduino and don't rely on the computer to run.
Processing programs run on a computer and don't rely on the Arduino to run.
Unless you are starving for electricity, I don't see why Arduino can't do its thing while Processing does its.
Is it possible to run two arduino programs at once, though?
Sure you just need two Arduinos. The more cost effective option, though, is to combine the two sketches using multitasking techniques, such as those showcased in the Blink with Delay example.
Or any other way to play chords?
On one what I am assuming is a small piezo speaker?