-
Hi all, I am trying for my project to use After an initialisation, board just freez ESP_ERROR_CHECK(i2cdev_init());
esp_err_t r;
max1704x_t dev = {0 };
max1704x_config_t config = { 0 };
max1704x_status_t status = { 0 };
uint16_t version = 0;
float voltage = 0;
float soc_percent = 0;
float rate_change = 0;
/**
* Set up I2C bus to communicate with MAX1704X
*/
dev.model = MAX17048_9;
ESP_ERROR_CHECK(max1704x_init_desc(&dev, 0, 18, 19)); // SDA 18, SCL 19 for S3
ESP_ERROR_CHECK_WITHOUT_ABORT(max1704x_get_config(&dev)); // when I comment this line it works As described in the example above for ESP-32 S3 boards SDA is 18 and SCL is 19, but in this case, on Adafruit with integrated MAX17048 chip I am not sure. Does anyone have a clue what could be a problem and did anyone tried to test this on Feather board? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
@shuki25 Please comment |
Beta Was this translation helpful? Give feedback.
-
I reviewed the pinout for your board and the pinout for SCL is 4 and SDA is 3. |
Beta Was this translation helpful? Give feedback.
-
Hi @shuki25, hi @UncleRus I have one additional not directly related question to an upper problem. For my project, I want to determine the entire power consumption of my sensor network. My question is, can I rely on SOC and Voltage parameters received and collected from every node during some period of time? Clearly, i can see voltage and SOC percentage drop during some period of time, and plot it inside a graph but can this be a good indicator of how much power my sensor network is using during runtime? My test scenario is 5 nodes scattered throughout a closed space. I did 3 measurements with all nodes in the same places, the same code deployed on every one of them, the same antenna orientation, and closely the same battery SOC at the beginning of the measurement. In all three times, I got almost the same values with 0,01750 Voltage and 0,34766 SOC percentage difference at the end. |
Beta Was this translation helpful? Give feedback.
@shuki25 Finally, I managed to get it to work on my Adafruit ESP32 S3 Feather board :)
In the end problem was the pullup resistors between SDA - 3V and SCL - 3V. Also, the last comment in this thread helped me. Esp32 IDF release/5.0 running on ESP32S3 Feather I2C problem. For this implementation I used 3k resistors.
It is not the best and most beautiful implementation, but for the test it was sufficient.
i2c-tools detected it immediately. SDA 3 - SCl 4
And here is an output from your library :)
Thank you both @shuki25 and @UncleRus again for the quick responses and help you provided.