Atlas-Scientific / Ezo_I2c_lib

Library for using Atlas Scientific EZO devices in I2C mode
MIT License
65 stars 39 forks source link

Error Compiling #17

Closed julianreistq closed 2 years ago

julianreistq commented 2 years ago

I have the same error in a newer version of the Arduino IDE. Is there another possible fix to this problem?

_Originally posted by @julianreistq in https://github.com/Atlas-Scientific/Ezo_I2c_lib/issues/3#issuecomment-1136896194_

julianreistq commented 2 years ago

void Ezo_board::send_cmd_with_num(const char* cmd, float num, uint8_t decimal_amount){ String temp = String(cmd )+ String(num); //, decimal_amount); const char* pointer = temp.c_str(); send_cmd(pointer); } Removing the decimal_amount from the String(num) fixed it for me.

bbombek commented 2 years ago

Hello! I did as is on the atlas tutorial for the new WiFi pool kit and i get the massage like this. poolkitcompilefail

Please help me! Thank you Boris

julianreistq commented 2 years ago

@bbombek As a quick fix try to adjust a line of code in class Ezo_board::send_cmd_with_num inside the Ezo_i2c.cpp file. The line: String temp = String(cmd )+ String(num, decimal_amount); to String temp = String(cmd )+ String(num)

bbombek commented 2 years ago

Guys at atlas helped me in a day do this and your problems are away!! Thank you atlas scientific for prompt answer!!!

@bbombek As a quick fix try to adjust a line of code in class Ezo_board::send_cmd_with_num inside the Ezo_i2c.cpp file. The line: String temp = String(cmd )+ String(num, decimal_amount); to String temp = String(cmd )+ String(num)

Atlas-Scientific commented 2 years ago

So it took some effort to replicate this issue and find the cause, and it seems like its been caused by espressif's latest update somehow. Specifically this bug fix. Its strange because the API allows the decimal amount to be set, there shouldn't be an issue there. I'm working on a more permanent fix, but if not I'll do something like the fix suggested here despite it breaking the decimal setting functionality. If any of you can find a way to make it work without breaking said functionality, let me know.

Another fix to this btw is to downgrade the esp32 library to 2.0.2 using the board manager in the Arduino IDE. See step 4B in this document on how to get to the board manager

bbombek commented 2 years ago

this did the trick THANK YOU Boris You are the best

On Wed, Jun 1, 2022 at 7:54 AM julianreistq @.***> wrote:

@bbombek https://github.com/bbombek As a quick fix try to adjust a line of code in class Ezo_board::send_cmd_with_num inside the Ezo_i2c.cpp file. The line: String temp = String(cmd )+ String(num, decimal_amount); to String temp = String(cmd )+ String(num)

— Reply to this email directly, view it on GitHub https://github.com/Atlas-Scientific/Ezo_I2c_lib/issues/17#issuecomment-1143145786, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATYFRBM4ESBVXQZXWD3ZJODVM33KJANCNFSM5W4HEUAA . You are receiving this because you were mentioned.Message ID: @.***>

Atlas-Scientific commented 2 years ago

Alright I believe this commit should fix it. Let me know if it doesn't work for you.

bbombek commented 1 year ago

another problem Now it works but i want to flash with a new code and (let say I put a new pump and change some code) now it is not in a bootloader mode?? How do I reset the ESP32 into bootloader? So I can put new cote on via arduino IDE?

[image: image.png]

Sketch uses 681565 bytes (51%) of program storage space. Maximum is 1310720 bytes. Global variables use 38824 bytes (11%) of dynamic memory, leaving 288856 bytes for local variables. Maximum is 327680 bytes. esptool.py v3.3 Serial port COM3 Connecting......................................

A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode. For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html the selected serial port For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html does not exist or your board is not connected

On Thu, Jun 2, 2022 at 1:49 AM Atlas @.***> wrote:

Closed #17 https://github.com/Atlas-Scientific/Ezo_I2c_lib/issues/17 as completed.

— Reply to this email directly, view it on GitHub https://github.com/Atlas-Scientific/Ezo_I2c_lib/issues/17#event-6723942346, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATYFRBJ2LVSJMOH2YKCO3O3VM7ZITANCNFSM5W4HEUAA . You are receiving this because you were mentioned.Message ID: @.***>