Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
If i use exactly the same setup on PINS 21 and 22 with the BMP280 simple test in Arduino IDE then the temperature and pressure are picked up without an issue. However if i use the ESP-IDF with the exact setup defined here but pins 21 & 22 (https://github.com/utkumaden/esp-idf-bmx280) then i do not get any output it fails on the first step to i2c_param_config(I2C_NUM_0, &i2c_cfg). I did try with pins 17 and 16 but it made no difference.
My next step is to try https://github.com/duff2013/ulptool to get the ULP working with Arduino IDE but it would be good to see why the ESP-IDF setup doesn't work for me and try to get it working as i wrote the code for it.
Use an official I2C example form the IDF. Like this: https://github.com/espressif/esp-idf/blob/master/examples/peripherals/i2c/i2c_simple/main/i2c_simple_main.c I’stand corrected with respect to the call order, it appears the driver install comes later. Your speed is unusually low, use the default speed of 400K. If you still get the error in the setup, use the source: the IDF is fully source distributed. Look into the implementation of the function, which errors occur form which code parts. Use ESP_LOGE or similar calls to get output messages on where you are getting to within the code. So that you learn where it’s expectations aren’t met.
Related posts
- ESP32 ULP coprocessor programming in Arduino or Platformio with minimum fuss?
- Any good/worthwhile Camera sensor modules for arduino/pico for still photography?
- I am trying to write to an SD card, it "works" but I can only find the file on PC if I use data recovery software?
- ESP32 memory corruption
- ESP32 WiFiMulti: Connect to the Strongest Wi-Fi Network (from a listing of networks).