SuperHouse / esp-open-rtos

Open source FreeRTOS-based ESP8266 software framework
BSD 3-Clause "New" or "Revised" License
1.52k stars 491 forks source link

esp-open-rtos ads1115 not working config errors #764

Open s5y3XZpGvQPApqR opened 3 years ago

s5y3XZpGvQPApqR commented 3 years ago

Per the datasheet:

esp-open-rtos/extras/ads111x/ads111x.c Line 24 see datasheet page 19 #define COMP_QUE_OFFSET should be 0 not 1

esp-open-rtos/extras/ads111x/ads111x.c Lines 54-61 see datasheet page 11 "Read Conversion register:" in read_reg byte order returned from i2c_slave_read in res is different endianess to uint16_t and needs swapping e.g. res = ((res & 0xff) << 8) | (res >> 8);

You might update the comment in esp-open-rtos/examples/ads1115_test/main.c to refer to the ADS111x not DS1302 RTC driver

Keep up the good work. Thanks in advance.