Problem transferring program from Uno to Mega2560

DKWatson is right. I recently move a sketch from UNO to MEGA and got to change most of pins because of libraries dependency used a lot of timers. The change depending on the board.