Sir,
I have one nRF52840 DK and ADXL335 accelerometer. I need to get the 3-axis values, Xout, Yout & Zout, from the accelerometer and send through BLE to my nRF mobile app.
Which program and SDK I want to use for this?
Please reply ASAP.
Sir,
I have one nRF52840 DK and ADXL335 accelerometer. I need to get the 3-axis values, Xout, Yout & Zout, from the accelerometer and send through BLE to my nRF mobile app.
Which program and SDK I want to use for this?
Please reply ASAP.
Hi,
The BLE app uart example would be a good starting point. You can read the output from the accelerometer by using GPIO as input. The values can then be sent using ble_nus_data_send().
Best regards
Jared
Which program and SDK I want to use for this?
If you go to the Product Page for the nRF52840 it has links to the appropriate SDK, SoftDevices, etc ...
https://www.nordicsemi.com/Products/Low-power-short-range-wireless/nRF52840
You can read the output from the accelerometer by using GPIO as input
Specifically, you will need to use the AIN analogue inputs, and the Analogue-to-Digital converter.
See the nRF52840 Product Specification for details, and look at the Examples in the SDK
Sir can we read the sensor values directly using nrf_gpio_pin_read()?
Or whether I need to configure ADC?
nrf_gpio_pin_read() is just a digital read: ie, it just tells you whether the pin is at a logic low or high level - '0' or '1'; true or false ...
If you want to read an analogue value, you need to use an Analogue-to-Digital Converter (ADC).
How to configure ADC?
Is there any example programs which read analogue values and print on uart or ble?