Are you sure you have the accelerometer connected to analog pin 3 and not digital pin 3?
If so, put some debugging in to check the values coming out of your accelerometer.
Are you sure you have the accelerometer connected to analog pin 3 and not digital pin 3?
If so, put some debugging in to check the values coming out of your accelerometer.