How to convert Arduino libraries

Hello,

I have several sketches from prototyping my project but It's occurred to me that the libraries used for some sensors are unique. I want to use the SDK connect examples for development purposes but I do not know how to port the Ardiuno libraries over for compilation. What should I do? (I cannot use the sensors without the libraries)

-Calvin

Parents
  • Hello,

    Porting Arduino libraries to the nRF Connect SDK will likely be challenging because the two platforms are quite different in their architecture. Arduino libraries are usually designed for a simple, single-threaded environment, while the nRF Connect SDK is based on Zephyr RTOS, which supports multi-threading, interrupts, and various advanced features.

    Zephyr has a more complex hardware abstraction layer that communicates with devices using device trees and driver APIs, while Arduino uses simpler APIs and straightforward calls.

    If there are no existing drivers available, a better approach might be to write your own wrapper libraries that connect directly to the sensor hardware. This way, you can customize the library to meet your specific needs while maintaining control over the hardware interaction.

    Kind regards,
    Abhijith

Reply
  • Hello,

    Porting Arduino libraries to the nRF Connect SDK will likely be challenging because the two platforms are quite different in their architecture. Arduino libraries are usually designed for a simple, single-threaded environment, while the nRF Connect SDK is based on Zephyr RTOS, which supports multi-threading, interrupts, and various advanced features.

    Zephyr has a more complex hardware abstraction layer that communicates with devices using device trees and driver APIs, while Arduino uses simpler APIs and straightforward calls.

    If there are no existing drivers available, a better approach might be to write your own wrapper libraries that connect directly to the sensor hardware. This way, you can customize the library to meet your specific needs while maintaining control over the hardware interaction.

    Kind regards,
    Abhijith

Children
No Data
Related