This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to get data ADXL345 using nRF51822 via arduino IDE and mbed compiler

I've already tried before using ADXL345 using nRF51822 using mbed compiler this is the link.. os.mbed.com/.../

but that program can't get ADXL345 data, just UART nRF51. I've tried using nrf51822 too with Arduino with this method.. github.com/.../arduino-nRF5

that problem appear again, using Arduino compiler can't advertise/beaconing UART via nRF UART mobile phone. so please help me to fix both problem..

  • fix program using mbed compiler, to read ADXL345 data using nRF51822
  • fix program using Arduino compiler to flashing the nRF51822 using stlink v2
Parents
  • Hi,

    You can't use UART for this. The digital output data from the ADXL345 is formatted as 16-bit twos complement and is accessible through either a SPI (3- or 4-wire) or I2C digital interface.

    AnalogDevices have an mbed library for the ADXL362, which have a similar register map as the ADXL345, you can take a look at the library here. You can also take a look at this mbed code here.

Reply
  • Hi,

    You can't use UART for this. The digital output data from the ADXL345 is formatted as 16-bit twos complement and is accessible through either a SPI (3- or 4-wire) or I2C digital interface.

    AnalogDevices have an mbed library for the ADXL362, which have a similar register map as the ADXL345, you can take a look at the library here. You can also take a look at this mbed code here.

Children
Related