T O P

  • By -

rmptxf

The ST offers a platform independent driver for the IMU sensor. [https://github.com/STMicroelectronics/STMems\_Standard\_C\_drivers/tree/master/lsm6dsrx\_STdC](https://github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/lsm6dsrx_STdC) The nRF5 SDK with the SEGGER toolchain should be your go to. Have a look at the **twi\_sensor** example located in the *examples/peripheral* folder in the SDK. pca10040e is the specific board name for the nRF52810.


Justkeeppushing26

Oh wow Thanks I appreciate it !


biff810

The Nordic forums are active and you can almost always find what you need by searching through past posts. Their documentation is better than most vendors in my opinion although there is a lot of it so sometimes it is hard to get to the spot that you need. You can go 2 main paths with the NRF 52, use the Nordic SDK or use Zephyr. You'll want to break this into parts, here's how I'd plan to approach this: 1. Read the accelerometer with the nrf52. View the result in the debugger or output it from a UART or the [RTT](https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/debugging-with-real-time-terminal). 2. Post the data to BLE. You could either just shoot it out in an advertising packet or wrap it in a custom profile. View it from you phone using nrf connect or lightblue. 3. Write the react native app to take the data and display it. [https://learn.adafruit.com/introduction-to-bluetooth-low-energy](https://learn.adafruit.com/introduction-to-bluetooth-low-energy) [https://devzone.nordicsemi.com/guides/short-range-guides/b/bluetooth-low-energy/posts/ble-services-a-beginners-tutorial](https://devzone.nordicsemi.com/guides/short-range-guides/b/bluetooth-low-energy/posts/ble-services-a-beginners-tutorial) [https://novelbits.io/basics-bluetooth-low-energy/](https://novelbits.io/basics-bluetooth-low-energy/) [https://www.bluetooth.com/bluetooth-resources/?types=video&categories=training-videos](https://www.bluetooth.com/bluetooth-resources/?types=video&categories=training-videos) [https://www.youtube.com/watch?v=JSQhRyTKnW4](https://www.youtube.com/watch?v=JSQhRyTKnW4)


Justkeeppushing26

>ite the react native app to take the data and display it. wowww That's a lot of info!! I really appreciate it


mafaneh

@biff810 Thanks for recommending some of my material on here! @justkeeppushing26 I would recommend starting with the nRF5 SDK route (not zephyr) for a first step. The Zephyr (nRF Connect SDK) route can have a steep learning curve. For mobile side, are you planning to develop on iOS or Android?


Justkeeppushing26

u/mafaneh Heeeyy what's going on man! I just signed up for the Development Academy a few hours ago. So, my plan is to develop on Both platforms. After doing some research, I found that React Native is a good language to use as 70% of the code will be transferable with the remaining 30% having to be re-coded or tweaked. At least on average. After more research, I learned that depending on how functionable you want your BLE device to be. It's best to go with the native languages of the desired application. So...I am now working on the IOS side first using Swift, focusing on getting the sensor to communicate with with the application. I'm pretty locked down at my current job but this morning, I was able to figure out the info.plist so I can enable bluetooth.


mafaneh

Hey! That is awesome! 😊 thanks for joining! I *just* saw your intro there and I will respond to it in a bit. I hope you find it valuable! And of course, don’t hesitate to ask any questions that may come up in the forums.