I'm new to Arduino but have a background in electronics and programming.
I'm trying to decide whether to buy the Uno R3 or Mega 2560 R3 to get started.
I've read that most available sketches have been written for the Uno.
Do Uno sketches require modification to run on the Mega 2560?
If so, is it only a matter of changing the pinouts in the sketches?
Or are there other changes required that make it difficult to do?
Do Uno sketches require modification to run on the Mega 2560?
Some do, many pins have different functions or are numbered differently.
Or are there other changes required that make it difficult to do?
That depends on your program. If you don't need a Mega now, what do you imagine doing that will require you to avoid the Uno?
I suspect that if you started with an Uno and your project expands to the point that you need a Mega, by then you will understand Arduino well enough that the transition will not be difficult.
IanJamesOz:
Do Uno sketches require modification to run on the Mega 2560?
If so, is it only a matter of changing the pinouts in the sketches?
Or are there other changes required that make it difficult to do?
Very little modification, and it's not difficult. Most of the difference is in the I2c and SPI busses, where different pins are used but no change required to code. If know that you you want to have several duties like Ethernet, SD recording, and more complicated sensers, etc., you are likely to need a mega for its memory, not the pins, so there is one good reason for getting a Mega in the first place, rather than beating your head against the wall trying to squeeze the last bit into a Uno.
A big advantage of a Mega is the fact that it has 3 spare HardwareSerial ports. Programs that need SoftwareSerial on an Uno won't need to use it on a Mega. SoftwareSerial is not nearly as good as HardwareSerial.
Nick_Pyner:
Very little modification, and it's not difficult. Most of the difference is in the I2c and SPI busses, where different pins are used but no change required to code. If know that you you want to have several duties like Ethernet, SD recording, and more complicated sensers, etc., you are likely to need a mega for its memory, not the pins, so there is one good reason for getting a Mega in the first place, rather than beating your head against the wall trying to squeeze the last bit into a Uno.
Thanks Nick (and everyone else) for your helpful replies.
The reason I'm seriously considering getting the Mega straight off is that I have a strong background in electronics and programming. I hope to tackle some complex projects and don't want to run into the limitations of the Uno.
If the main issue with running Uno sketches on a Mega is dealing with different pinouts I think I'll be able to manage it after I get familiar with these differences (I hope! )