I have been developing a sketch on a Uno, but due to lack of pins and memory, I am porting it to a Mega.
Apart from having to change pin numbers and change from Uno to Mega in the compiler, are there any other changes that need to be taken into consideration?
About the only software consideration involves using the SD card, where you need to define an OUTPUT pin 53 instead of 10. The SPI and I2C buses are on different pins but that is just mechanical. I have never heard of a library that has to be modified, but I guess you may decide to do that on your own whim, or as a result of mechanical convenience.
Needing to modify a library is extremely unlikely, and a pretty sure pointer to a badly conceived library that includes pin calls. On the rare occasions that you need to, you can do it with Notepad++, which is a freebie.
Need help I have code for Ardiuno DUE but I have Ardiuno Mega board. Any inputs to use this code for Mega board
That is a completely different issue than the one in the 3 years old thread that you necro'd. Please start a new topic in the forum instead. Also, when you do that, read the sticky threads at the top of the forum first, and then post your code. Describe what happens when you try to run the sketch on the Mega.