johanzebin,
It seems that I am working on a similar project. I am worried about pin count as well since we will be using two encoders which take up pins 2-5 (2 and 3 must be used since they allow for attachInterrupt function, 4 and 5 can be moved if needed), two motors which need PWM (so will prob use pins 6,9), and SPI digital pins 10-13 to read values from our digital compass. Somehow, we will also need to control up to 9 servos. I'm praying we won't need a second microcontroller, but I can't see this working out nicely. I know that the analog pins can be converted to digital output pins if needed, but will these be able to control motors or servos with PWM? Any suggestions on how to lay out my Arduino would be appreciated.
Also, I noticed that you were using a digital compass controlled by SPI communication. I'm new to SPI and have to write an Arduino sketch to read in heading values from our digital compass (sparkfun.com/commerce/product_info.php?products_id=236). I was wondering if I could see a copy of your code (if you got it working) so that I could write my own program. The only SPI examples I've seen so far was for a pressure sensor (arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213217330/5#5) which did not require any configuration. There are several functions for our compass to set configuration and get Data but I don't know if there is a library that establishes these functions or if I'll have to write them myself. Any help would be very much appreciated!
:-*
Thank you,
Lauren