Go Down

Topic: Accelerometer not working (Read 617 times) previous topic - next topic

charlesblack

Here you have the circuit. Gnd And 3.3V are well connected.



And here the serial monitor:


NI$HANT

Quote
Do you have the monitor set to 57600 baud?


baud rate shouldn't be a problem here at all as the Serial is used here just to print the statements, and also as the Begin statement in the setup is executing well fine (as theres no gibberish or gribble) it means the baud rate is already fine.

The 8452Q uses i2c to workout(I'm using it in a custom circuitry of mine.)

Ahh I think I got it , So do you have the correct address in the code , I mean the sparkFun's hardware pcb uses SA0 pin HIGH that is connected to voltage so if its high then the address of acc. is 0x1D or else if its low then the address is 0x1C.

refer to this excerpt of the code:

Code: [Select]
// The SparkFun breakout board defaults to 1, set to 0 if SA0 jumper on the bottom of the board is set
#define MMA8452_ADDRESS 0x1D  // 0x1D if SA0 is high, 0x1C if low
"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

????? ???? !

charlesblack


NI$HANT

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

????? ???? !

Go Up