I'm new to Arduino and I've been playing around with the Redboard and a solderless breadboard. I've gotten the hang of creating different sketches to serve different functions (ex. blinking LEDs, using a Piezo buzzer, etc.) but I was wondering if it would be possible to merge these sketches somehow. According to my research, Arduino won't let me run two sketches simultaneously, but is there a way to mimic this?
More specifically, I'm looking to play a simple song using the Piezo buzzer and run a LED light show to the tune of the song. Nothing complex, just Twinkle Twinkle for now, but that's the idea. I have a sketch for the song, and a different sketch for the light show currently.
A friend of mine suggested defining them as different functions, and then using some sort of if/then statements, which I'm not sure is feasible. Is there any way to accomplish my goal without having to splice the code together (which I'm not quite sure how I'd go about, anyways)?
Thanks in Advance,
FredStark