0

Trellis not detecting ADXL343
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trellis not detecting ADXL343

by spconrad on Wed Jan 23, 2019 2:46 pm

Hello,

Got the most recent AdaBox with the Neo Trellis and am having a tough time accessing the ADXL343 accelerometer.

Followed the tutorial steps and installed the proper libraries, but whenever I try to run sensortest I get the following error in the Serial Monitor:

Code: Select all | TOGGLE FULL SIZE
Accelerometer Test

Device ID: FF
Ooops, no ADXL343 detected ... Check your wiring!


As I said, it's a Trellis board, so I'm a bit lost as to how I could be improperly wiring it as the sensor is literally attached to the board. Example sketches for the pretty lights work just fine.

I'm on a 2016 MBP running Mac OS 10.14
Arduino IDE 1.8.8

Please let me know what additional information I can provide that might be helpful.
Attachments
Screen Shot 2019-01-23 at 1.39.36 PM.png
Screen Shot 2019-01-23 at 1.39.36 PM.png (644.94 KiB) Viewed 100 times

spconrad
 
Posts: 7
Joined: Sun Mar 11, 2018 6:15 pm

Re: Trellis not detecting ADXL343

by adafruit_support_carter on Thu Jan 24, 2019 10:55 pm

On the NeoTrellis M4, the accelo is on Wire1:
https://learn.adafruit.com/adafruit-neo ... meter-2-17

Unfortunately, the Arduino library is hard coded for Wire. So it would need to be updated.

You could use CircuitPython to access the accelo, if that route would work for you.

adafruit_support_carter
 
Posts: 9858
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trellis not detecting ADXL343

by spconrad on Fri Jan 25, 2019 10:46 am

I'm a bit confused, are you saying I can't use the Adafruit Unified Sensor library that's referred to in the NeoTrellis tutorial? https://learn.adafruit.com/adafruit-neo ... -libraries.

spconrad
 
Posts: 7
Joined: Sun Mar 11, 2018 6:15 pm

Re: Trellis not detecting ADXL343

by adafruit_support_carter on Fri Jan 25, 2019 12:21 pm

Sorry, my bad. I was looking at the older library. That newer library allows for specifying a different I2C bus. In the example sketch:
https://github.com/adafruit/Adafruit_AD ... ortest.ino
change this line:
Code: Select all | TOGGLE FULL SIZE
Adafruit_ADXL343 accel = Adafruit_ADXL343(12345);

to this:
Code: Select all | TOGGLE FULL SIZE
Adafruit_ADXL343 accel = Adafruit_ADXL343(12345, &Wire1);

adafruit_support_carter
 
Posts: 9858
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trellis not detecting ADXL343

by spconrad on Sat Feb 09, 2019 5:57 pm

Hey, that fixed it! Thank you!

Should probably add that to the NeoTrellis and/or Adabox 010 tutorials :)

spconrad
 
Posts: 7
Joined: Sun Mar 11, 2018 6:15 pm

Re: Trellis not detecting ADXL343

by adafruit_support_carter on Sun Feb 10, 2019 2:17 pm

Cool, glad that fixed. Agree, we need to update a few things. There's been some additional work done since the original page was put up.

adafruit_support_carter
 
Posts: 9858
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.