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

Beginner: Displaying accelerometer values from SPI to computer console

Hello all, first time using a I am using a nordic board im a little overwhelmed by all the options. I have nrf51 development kit and I just used the getting started tutorial to get the device working with my android phone. I now want to display the readings from an accelerometer onto the board which uses SPI. Then i want the board to transmit that data to my terminal on my pc so i can see how the accelerometer reacts. Is there any way to do this given the "examples" in the SDK? its a bit confusing

Parents
  • Hi,

    I would recommend that you start by looking at the SPI Master example in the SDK. This is setup to execute a SPI transactions every 200 ms and toggles the LED when the transfer is completed. The data can also be transferred to the terminal if you set NRF_LOG_ENABLE in the SDK configuration header.

    You will have to change the example to use the commands specific for your accelerometer, to get correct data. There are drivers available for some accelerometer models in the SDK and here on DevZone. Please search for your model if you have any questions, or ask in this post if you cannot find the required information and I will try to help!

    Best regards,

    Jørgen

Reply
  • Hi,

    I would recommend that you start by looking at the SPI Master example in the SDK. This is setup to execute a SPI transactions every 200 ms and toggles the LED when the transfer is completed. The data can also be transferred to the terminal if you set NRF_LOG_ENABLE in the SDK configuration header.

    You will have to change the example to use the commands specific for your accelerometer, to get correct data. There are drivers available for some accelerometer models in the SDK and here on DevZone. Please search for your model if you have any questions, or ask in this post if you cannot find the required information and I will try to help!

    Best regards,

    Jørgen

Children
No Data
Related