Pleeeaassee Help MMA7660 Sensor Module

I got this accelerometer (MMA7660) Mind you guys I'm a newbie I need to make It work first how do I plug it in (im running a mega 2560 with sensor shield) secondly what code do I use ive done some research and theres a library for it but i dont know how to plug it in (it uses 2 analog pins from what ive read and i want to plug it into analog pin1 and pin2 has anyone had experience with this sensor please reply!!! Help!

It doesn't use "analog pins", its uses the I2C bus (the SDA and SCL pins). On the Mega these are pins 20 and 21 I believe.

However your first priority is to make sure its given 3.3V supply (5V will overload and destroy it). The I2C bus will need level conversion too in some way (you might get away with adding 4k7 pull-ups to 3.3V rail, but I'm not certain).

Do you have a specific breakout board with this on? Some have level-conversion and 3V3 regulator built-in, some don't...

I have the mega sensor shied v4 plugged in but ive got absolutely no idea how to connect it now the sensor shield has theese COM2 COM3 etc ports will those be it??? and how will i plug the code to the arduino??

http://www.ebay.com/itm/MMA7660-3Axis-Digital-Motion-Detection-Sensor-Module-Arduino-Compatible-/130625919994?pt=BI_Robotics&hash=item1e69e95bfa

I Followed the instructions on this site ( http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=152_160&products_id=2160 )

I Also downloaded the library and placed it in the libraries folder where i have installed arduino but when i run it i get the following error :

In file included from MMA7660_test.cpp:2:
C:\Program Files\Arduino Control Platform\arduino-1.0\libraries\MMA7660/MMA7660.h:29:22: error: WProgram.h: No such file or directory

any ideas why guys??

#include <WProgram.h> //It is very important to remember this! note that if you are using Arduino 1.0 IDE, change "WProgram.h" to "Arduino.h"

That module has an onboard regulator and provides 5V-compatible SDA and SCL - so all you need to do is connect it up (Mega has different pin out for SDA and SCL from the standard Arduinos, note, as I've explaned)

thank you soooo much i will try the arduino.h next time i plug it in! the mega sensor shield has an i2c port so hopefully its just plug n play

I am trying to get this sensor to work as well, so if anyone has a break-through let me know.