Program works on UNO but not on MEGA2650

I have the following that works fine on the UNO board but not on the mega 2650, I would really appreciate some help!
Scrolling the mouse pointer on the small screen control the intensity of an LED, brighter going to the right.
Thank you.

flyingchef:
I have the following that works fine on the UNO board but not on the mega 2650, I would really appreciate some help!
Scrolling the mouse pointer on the small screen control the intensity of an LED, brighter going to the right.

Please post your code. Not a picture of the code, but the actual code itself. And please, within code tags.

Oh, and please tell us in what way it "doesn't work". That's not much to go on.

And show us the schematic so we can see how your LED is hooked up on pin 9.