I would also agree with Grumpy_Mike.
For 5V compatibility, software maturity, and less headaches,
given a choice between MEGA and DUE boards, I'd pick Mega at this point in time.
But there are other AVR based options for more pins.
For example, the Teensy boards http://www.pjrc.com/teensy/
if you don't need shield compatibility. Teensy++ has almost as many
i/o pins and the same amount of flash/sram/eeprom as MEGA but is MUCH smaller,
is more breadboard friendly for prototyping and has native USB support - something
not available on MEGA.
Teensy++ is also much cheaper than an Arduino MEGA.
As for speed, Teensy does have some core library modifications to make things faster
in certain situations without having to change any sketch code or using AVR specific coding.
For example, if doing digitalWrite() with all constant values, teensy can do that
in 62.5 ns vs Mega will do it in about 5us (Teensy in this case about 80x faster)
when you say:
i have to buy an arduino board with more i/o pins and a better clock cycle
Do you really mean "have to" or "want to".
At the present there really is no such animal.
There is no "arduino" board that can offer compatibility with existing AVR s/w and libraries
*and* give a better clock cycle. (faster)
The mega, offers more i/o pins but is still the same clock rate so the clock cycle will be the same.
Mega is not a speed up. It offers more RAM and more pins than Uno.
The advantage is that there is fairly good support for mega in many of the AVR based libraries out there.
DUE is faster than Uno/Mega, but given it is so new there are bound to be issues.
It is a different processor so any library that strayed away from using the arduino core code
functions and touches ARV registers or did inline AVR assembler will not work.
There are many libraries out there that do this for various reasons, from speed to needing
functionality that the arduino core code does not provide.
Also consider this, the Arduino team keep the final design specs and s/w a secret from
the general community until it was released, because of this the hardware and
software has not been reviewed or beat on by very many people at this point in time
and the Arduino community at large is just now starting to look at the impact
on existing libraries and shield compatibility issues.
Honestly right now the Due hardware is showing piles of weaknesses much like the hardware that came before, give it time for better designed kit to come out from other vendors. The software side is mostly there.
What are the piles of weaknesses? and what other vendors can do that we can't do?
Granted this is probably only a near term supply issue.
But today, DUE is hard to get vs other 3rd party boards.
- 5 volt tolerant inputs.
IMHO, this is a really big deal and the main weakness in the DUE.
From a "ease of use" and "backward compatibility" perspective,
how useful is the Arduino shield compatible headers on the DUE
when there are many shields out there that do bi-direction i/o
and will drive input pins with 5v and potentially fry the DUE?
Boards like the chipkit boards don't have this issue since their input pins
are all 5v tolerant.
- Value for the dollar
The chipkit UNO32 hits a nice sweet spot, in that it offers 32 bit performance
in an Arduino Uno form factor yet costs about the same as the Arduino Uno.
(32bit 80mhz MCU with 128k flash and 16k of RAM with 22 extra i/o lines.)
In other words:
32bit, 5x the clock speed, double the i/o lines, 8 times the RAM, 4x the flash,
5V tolerant in the same form factor and the same cost as an Arduino UNO.
Boards like the Teensy 3 are much smaller, cheaper than MEGA and will consume less power so
they will be better for 1 off small projects that are space and power limited.
Teensy also is much more friendly to bread-board prototyping.
For general playing around with 3v MCU boards,
the STM based boards like the STM32F discovery board are currently about $12USD
Not "duino" s/w but
it has 192k of RAM, same amount of ROM, it runs at double the clock speed of the Due and the board has various things on it (a DAC, a mic, an accelerometor, and a usb host port).http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATA_BRIEF/DM00037955.pdf