Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

How can I include and use some of the core espressif arduino esp32 libraries

I have a simple Arduino program that uses functions from a core esp32 library esp32-hal-ledc.h. These functions can be used to drive a passive piezo buzzer, for example. I want to now transfer/modify this code to be mongoose-os compatible.

As I'm still learning the ropes with Mongoose OS, I am just wondering if these libraries are already included when I define my esp32 board within the mongoose framework. If not, can I simply refer to these libraries in my mos.yml or would I need to modify them to make them mos compatible?

Comments

  • There are many already made mOS libraries.

    To answer your question, you can't use Arduino libraries (eg. EspClass) directly. You have to port them to Mongoose OS and my choice is to make it mOS native (ie. without using the Arduino compat layer).

    To be more specific, the functions from esp32-hal-ledc.h can be easily "translated" to be used with mOS. They look to be wrappers of esp-idf functions.

    Thanked by 1gerrikoio
  • Ok, thanks for the advice. You've just confirmed what I thought too.

Sign In or Register to comment.