So I bought an Arduino Mega 2560.
I was using it and started writing my own classes for it.
And then I read about programming AVR's in the eclipse IDE.
I have set that up and it works nicely.
However I wanted to write my own set of classes and start programming AVR's in C++. I understand C++ takes up more memory on AVR's than C, but on something as big as the 2560, I have read it is not such an issue.
I found a few classes lying around the internet for the mega8 so I have begun writing my code extending this.
So far I am quite pleased with how things are going, but I wanted to see if anyone could have a look and see if Im going drastically wrong anywhere because alot of my code I am porting from C and turning into C++ classes.
If anyone can, I would be very appreciative if they could look at my Button class, which is supposed to handle debouncing - although Im a little wary of my implementation, my Serial class - and perhaps some ideas on how to state which UART it is going to use so I dont have to write a whole class for each UART channel and how I could change the Timer class so that it was much more general - and it could handle any Timer (1,2,3).
Lastly I want to write a class to handle MIDI communication. It will rely on a Serial object to send the information but my serial class does not use interrupts. Should I use an interrupt based Serial class to handle the midi communication to keep timing very accurate?