Uno to mega

Uno to mega

Hi how easy is it to transfer code written for uno on to the mega

All you need to change is the pin mapping (the Mega has more pins, SPI is on different pins, and different pins have PWM). Other than that, things should transfer without issue.

Oh, and if you have a clone Mega from ebay, some of them ship with a bootloader that has a bug in it that prevents uploading sketches with three consecutive exclamation points in a string (effected boards can be fixed by reburning the bootloader using an ISP programmer - either another Arduino or a tool like a USBAsp... or you can just not use !!! in any string (it's okay to use the !!! in comments, just not strings). This bug is not present on recent production official boards, nor is it present on all clones; some of the chinese clone manufacturers are just using the old, buggy version still.

And remember to change the board type in the IDE. That will recompile your code for the new board.

DrAzzy:
a bug in it that prevents uploading sketches with three consecutive exclamation points in a string

I thought that was a "feature"