I need an Arduino genius, someone who groks it all the way down to the bare metal.
I have a robot giving me issues. I'll describe the hardware, the software, and then the symptoms I'm seeing.
Hardware:
I have an open source wall-hanging drawbot
http://github.com/i-make-robots/drawbot build on an arduino with an adafruit motor shield connected to two NEMA17 steppers (for XY motion) and a hobby servo (for Z).
Software:
I use FrequencyTimer2 to control a timer interrupt on timer2. I communicate with a Java app over Serial, which I'm told uses timer0. The servo PWM is done on timer1. I tell the steppers to move at a constant speed and they do, emitting a hum.
Symptoms:
1. FrequencyTimer2 ruins the PWM on pins 9 and 10 on a mega
http://www.pjrc.com/teensy/td_libs_FrequencyTimer2.html which are the two pins used for servo on the shield. I'm looking for a lib that will make it easy to create timer interrupts (takes care of board-specific issues) and that doesn't screw with pins 9 & 10. I'm willing to use ServoTimer2 if I can switch the FrequencyTimer to use timer1. Do you know of one?
2. If If the Arduino receives serial data while this is happening I can hear breaks in the hum, which tells me I am losing steps over time.
3. If I try to send too much serial data from the Arduino the program is likely to hang.
I really want this to work on Duemilanove 328s, mega 2560s, and UNOs. Unfortunately the timer stuff is getting way past my level of expertise. Please, geniuses of Arduino! Can you tell me how to make this work?
Thank you!