jowood4 / RHINESTONE

0 stars 1 forks source link

Accel pins and some notification output #4

Closed pedrodude closed 9 years ago

pedrodude commented 9 years ago

Getting there. That wait seemed to do the trick and I'm getting some reliable serial output. I do appear to be running into the "FF Ooops, no ADXL345 detected ... Check your wiring!" error a lot. I'm not sure if my h/w is flaky or not. The pin assignments are correct (although I do have an INT1 on my accel connected to the A0 of my board, assuming that won't have an effect but correct me if I'm wrong).

I have had one instance where it did get past that error, and appeared to be outputting some info. If I understand it correctly, it was the pitch angle calculation. Didn't appear to change from 0.00, and triggering the switch seemed to change the output to nan.

I haven't been able to reliably get my device to acknowledge the accel is connected enough to verify the rest of the program. I'll plug away at it some more tomorrow, and let you know how it goes. We're getting there though.

jowood4 commented 9 years ago

I just found a tutorial by Sparkfun that might be easier than the Adafruit version. https://www.sparkfun.com/tutorials/240 It does use hardware SPI, which it looks like you have wired up correctly anyway. The Adafruit version uses a software bit-banging SPI. I don't believe the INT should matter at this point... I don't think it is used right now, but it might be good to put that in, especially if this will be battery-powered. If and when we do use it, you probably want it on a digital pin instead of an analog one.

Also, it looks like it is a 3.3V device. Make sure you aren't connected to the 5V supply. I think the Pro Micro has a jumper that turns on the 3.3V regulator. You'll need that in place.