If you have a photo of your wiring and a link to the datasheet we can check our assumptions. You have to be ultra careful about pinouts w.r.t front and back as different datasheets use different views. 3D-style diagrams are always preferably in my mind. How was the Mega being powered BTW?