the ports are different between the mega and uno (what pins map to what functions), so those need to be changed.