I took an ADXL345 accelerometer sketch /example from here:
http://www.i2cdevlib.com/usage
which works on arduino uno flawlessly with the following pins connected:
Arduino -> ADXL345
Ground -> Ground
VCC -> 3v3 V
CS -> 3v3 V
SDA -> SDA
SCL -> SCL
However that same code and equivalent connection does not work on Teensy3.1. The program always freezes on wire.endTransmission ( this is supposed to finish sending the single via i2c).
My pinout for teensy is the following:
Teensy -> ADXL345
Ground -> Ground (before the 0 pin)
VCC -> 3v3 V (before pin 23/9A)
CS -> 3v3 (same as above)
SDA -> SDA (pin 18/A4)
SCL -> SCL (pin 19/A5)
I get other responses from the board while commenting out the i2c code but as soon as I attempt to read i2c with the accelerometer; it freezes.
Can anyone please offer some advice as I'm not sure what could be wrong?
Thanks!
http://www.i2cdevlib.com/usage
which works on arduino uno flawlessly with the following pins connected:
Arduino -> ADXL345
Ground -> Ground
VCC -> 3v3 V
CS -> 3v3 V
SDA -> SDA
SCL -> SCL
However that same code and equivalent connection does not work on Teensy3.1. The program always freezes on wire.endTransmission ( this is supposed to finish sending the single via i2c).
My pinout for teensy is the following:
Teensy -> ADXL345
Ground -> Ground (before the 0 pin)
VCC -> 3v3 V (before pin 23/9A)
CS -> 3v3 (same as above)
SDA -> SDA (pin 18/A4)
SCL -> SCL (pin 19/A5)
I get other responses from the board while commenting out the i2c code but as soon as I attempt to read i2c with the accelerometer; it freezes.
Can anyone please offer some advice as I'm not sure what could be wrong?
Thanks!