×

Please see all COVID-19 updates here as some shipments may be delayed due to CDC safety and staffing guidelines. If you have an order or shipping question please refer to our Customer Support page. For technical questions please check out our Forums. Thank you for your continued support.

avatar

Dakine

Member Since: March 31, 2014

Country: United States

  • Were you able to resolve this? I'm hitting my head against this issue on the Arduino Micro.

  • How would one mount this to a project box? Will it sit flush to the bottom of the black plastic, or will there be a gap exposing the circuitry underneath?

  • Any update on this tutorial? Sounds quite useful!

  • Ok, so the Arduino Micro uses the ATmega32u4 versus the ATmega328P used in the "Generic" Arduino referenced in this guide. This means your pin connections are as follows:

          10->CS
    MO(MISO)->SDA
    MI(MOSI)->SDO
         SCK->SCL
          3V->VCC
         Gnd->GND
    

    Resources for figuring this out:

    ADXL345 Datasheet, Specifically Table 4

    Wikipedia SPI Bus, Specifically the Interface Section

    Ardino Micro Schematic, Specifically the top left bit.

    Here's a few lines of sample output:

    (At Rest)

    9,-8,129
    9,-9,129
    10,-9,129
    9,-8,129
    

    (Moving it around)

    19,-25,128
    14,4,129
    10,-8,129
    23,-11,132
    6,12,137
    11,41,114
    36,-3,180
    13,-76,99
    
  • I'm getting what I think is invalid output from the basic code, but since there's no sample output included it's hard to say - Can any one confirm?

    I'm seeing only 0,0,0 when motionless, which is expected, but any sort of motion produces -1,-1,-1. Rarely, and I mean once in maybe 15 seconds of shaking, I'll get something like 2,0,7943.

    I've triple checked my connections, and have not changed the code. I did try jbeale's suggestions as well, no change.

    Edit: I should point out that I am using a Micro, if it makes a difference.

    Edit 2: Further research would indicate that given the orientation of my chip I should expect the readout to be a steady 0,0,1 when it is not in motion.

No public wish lists :(