i want to interface the nrf52840 with 2 sensors accelerometer and barometer and read the values what should i do.
i want to interface the nrf52840 with 2 sensors accelerometer and barometer and read the values what should i do.
Let me get this straight, by gy-521 you mean mpu6050 right?
BMP180
CAN YOU PLEASE HELP ME HOW TO READ SENSOR VALUE THAT HAVE SCK,SDA PINS AND MONITOR IN ANY SERIAL MONITOR.
YOU CAN TELL FOR ANY SENSOR,THEN I WILL MODIFY FOR MY CODE
Refer the TWI Master example in the sdk for reference(SCK and SDA pins are used in TWI protocol). All the libraries are already there you just have to understand and use it.
I also found a site which may help you
https://github.com/gabriel-ns/nRF5-sensor-libraries
Now that library is made for nf51 but you're using an nrf52840 so just use this as a reference, it has BMP180 interfacing example
The breakout board gy-521, includes the MPU-6050 device (accelerometer and gyro), thus you can use this link to get it working.
Follow these steps (assuming you have keil installed):
#define MPU_TWI_SCL_PIN 27 #define MPU_TWI_SDA_PIN 26
I followed these steps using MPU9250, and it worked fine. However, the examples are not tested on MPU6050, but please ask if it doesn't work. This could be a start, and if you get it to work I can help you with the gy-89.
Best regards Simon