Closed jksemple closed 1 year ago
This is such a good solution and I kind of feel dumb on why I didn't think of it before! haha. Kudos for sharing it with everyone :)
I'll test this soon and merge it.
@jksemple , There is a minor incompatibility in examples with ESP32 platform. Can you please fix it?, other than that it looks very promising.
Reference: here
Fixed - my apologies for a dumb error!
Great PR, but I thought WebSerial.printf("Free heap=[%u]\n", ESP.getFreeHeap());
should use %u
instead of %lu
.
Odd that both millis() and getFreeHeap() apparently return uint32_t but millis() needs %ul and getFreeHeap() needs %u. I must be missing something. I have fixed the examples anyway.
Um... So what now?
Sorry, I had to devote some time to my office work. I’ll test this by Thursday.
Tested and merged :) Brilliant solution.
The joy of Open Source :-)
Inherit from Arduino Print class.
This fixes Issue #55 (cannot do WebSerial.print(WiFi.localIP()) and possibly Issue #53 (memory leak) It also allows WebSerial.print(millis()) which otherwise fails. And allows WebSerial.printf(.....)