I’m doing a project using the DYIRDaikin.h DYIRDaikin.h library, it has a void function called .description() that prints 7 lines to the serial monitor. I would like to be able to have those 7 lines stored in a char array so I can publish them on the device webpage.
I tried in multiple ways using the Serial.read() to read the data from the serial monitor but without success. I’m starting to question if it’s actually possible.
Reading back from the serial output is not a good idea, and would be difficult to do. It is not possible to actually read back from the serial monitor.
You can rewrite the function to save the text into a char array, but a better way (particularly if you are short of ram) is to pass a structure to the function so that it can save the data that needs to be printed, then generate the print statements later when you publish to the webpage. All of the functions being called in the print() statements return uint8_t, so that would not take much memory to implement.
I'm not an expert but I found the void DYIRDaikinRecv::descriptionARC(uint8_t *recvData) function in the DYIRDaikinRecv.cppv file that has the same syntax (and errors) that appear on the serial monitor:
If getting the data from the serial monitor it's too complicate I will give it a try but since I haven't done anything similar before I'm afraid I'm going to break the functionality of the library but we'll see
I moved your topic to an appropriate forum category @Katoz.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.