I know quite a bit about programming but am new to hardware/electronics and finally stumbled into a problem I was unable to solve.
I made a synth, but the only way to get it to perform quickly enough is to do some timer magic:
// Apparently sets up Timer2? sbi (TCCR2B, CS20); cbi (TCCR2B, CS21); cbi (TCCR2B, CS22); cbi (TCCR2A, COM2A0); sbi (TCCR2A, COM2A1); sbi (TCCR2A, WGM20); cbi (TCCR2A, WGM21); cbi (TCCR2B, WGM22); // Changes interrupts cbi (TIMSK0,TOIE0); // disable Timer0 !!! delay() is now not available sbi (TIMSK2,TOIE2); // enable Timer2 Interrupt
But when I do this I am unable to communicate with it over Serial in any sort of manner. I started messing around with software serials to see if that could solve the problem, but soon realized I don't know enough and had to find help.
The other half of this project is a little personal computer (Arduino Mega) that runs code off of the SD card, I want this Arduino Mega to be able to act as a sequencer: sending key presses and pitches to the synthesizer (Arduino Uno).
My current last resort is figuring out some complex mode of information transfer over several wires. This would require an additional arduino that only accepts commands from the Mega and converts them into a format for the synth, but this seems very wasteful.
Does anyone know how I can best accomplish this?