Question about how to get started developing own code with ESP-IDF SDK

ujurmsde
Posts: 38
Joined: Tue Jan 19, 2021 6:37 am

Question about how to get started developing own code with ESP-IDF SDK

Postby ujurmsde » Sun Mar 14, 2021 12:14 pm

Hi,

I have a question regarding making own code and upload it to ESP boards. I have already tried few samples like examples/peripheral/LEDC and ../GPIO , ../hello_world. and those worked like a charm!!

Now, I want to try my own code for things like GPIO, I2C, SPI, BLE etc. I don't understand everything inside a code which is necessary and which is not!! Could you tell what is easiest way to start developing??

ESP_Sprite
Posts: 9617
Joined: Thu Nov 26, 2015 4:08 am

Re: Question about how to get started developing own code with ESP-IDF SDK

Postby ESP_Sprite » Mon Mar 15, 2021 4:16 am

Easiest way is to copy one of the simpler examples (hello_world, or blink, for example) and remove the few lines that are in there. Edit the Cmakelists.txt file as well to give your project it's own name, and if the example had a Kconfig.projbuild, remove it. Now figure out what you want to do, read the ESP-IDF documentation pages that apply, perhaps consult the other examples if you want to copy-paste code, and off you go!

ujurmsde
Posts: 38
Joined: Tue Jan 19, 2021 6:37 am

Re: Question about how to get started developing own code with ESP-IDF SDK

Postby ujurmsde » Wed Mar 24, 2021 7:10 am

Thanks for the reply.
One more question. Suppose I want to try the I2C sensor BME280 from Bosch. From the I2C API what I can see is that there are only read-write operations available.
So is it that I have to look for what registers to configure, write and read from the sensor?

ESP_Minatel
Posts: 364
Joined: Mon Jan 04, 2021 2:06 pm

Re: Question about how to get started developing own code with ESP-IDF SDK

Postby ESP_Minatel » Wed Mar 24, 2021 8:32 am

Hi,

In addition to my colleague ESP_Sprite, we provide a sample application that shows you how to create a project. You can find that here: esp-jumpstart

For the BME280 you can try the official Bosch driver: BME280_driver

Who is online

Users browsing this forum: danergo, Google [Bot] and 87 guests