Hi everyone! I'm a newbie in electronics and arduino, so excuse me if I write strange or stupid things.
This is my problem: I'm trying to connect a Freescale MMA7260Q accelerometer (http://www.robot-italy.com/product_info.php?products_id=834) to a standard Arduino duemilanove.
The sensor works with 3.3v, and has 2 control pins for selecting its sensibility and a sleep pin (sleep mode is activated with LOW value).
I followed this tutorial:
http://itp.nyu.edu/physcomp/sensors/Reports/MMA7260Q
but instead of connecting the sleep pin to a digital out of the Arduino I used the 3.3V out, just to give it a try.
I wrote some straight lines of code to send values for X axis in order to see the sensor behaviour in Matlab:
void setup()
{
Serial.begin(9600);
}
void loop()
{
int x = analogRead(0);
Serial.println(x);
}
but what I get is a random output; by moving the sensor I don't get any meaningful response.
This is my setup:
you can see that the sensor is not soldered to the strips and that I'm quite messy with the links :-/ But I don't see errors in the connections.
-
Any ideas? Did I do something wrong?
-
what if I want to control the sleep pin with an Arduino digital out? How do I scale the 5V digital out to 3.3v? Can I just use resistors?
Thanks in advance ![]()