ESP8266.vs.ESP32.zip (15.4 KB)
enclosed is ino + embeded html .. anybody welcome to use it 85% done
problem
Code compiles with warnings on ESP8266 LoLin D1 R1 , but runs as desired and webpage is as desired.......
Code NO compile on LoLin D1 R32, gets almost same warnings + a couple more.
It appears the compilers think the HTML has issues, which I'm sure it does, but the compilers are the only thing complaining , HTML appears to be working fine,
I tried HTML washer / fixers they just cause bigger problems.
I appreciate any help I can get , thanks in advance.....
put the generated HTML output in a HTML validator and fix it.
this will not fix your compile warnings, but your HTML output.
roll back to an older ESP32 core. Older ESP32 cores allow to compile with warnings.
if you don't want to use an older core, read: ESP32 unused variable compile error - #15 by cgvrl
Hi @xtal1011
I'm going to ask you to post the error message from the failed compilation.
NOTE: These instructions will not solve the problem. They are only intended to gather more information which might provide a clue that eventually leads to a solution.
Please do this:
- Open the problematic sketch in Arduino IDE.
- Select the board for you "LoLin D1 R32" in Arduino IDE.
- Select Sketch > Verify/Compile from the Arduino IDE menus.
- After the compilation fails you'll see a button on the right side of the orange bar in Arduino IDE: Copy error messages. Click that button.
- Open a forum reply here by clicking the Reply button.
- Click the
<CODE/>
icon on the post composer toolbar.
This will add the forum's code block markup (```
) to your reply to make sure the error messages are correctly formatted.
- Press Ctrl+V.
This will paste the compilation output into the code block. - Move the cursor outside of the code tags before you add any additional text to your reply.
- Click the Reply button to post the output.
the zip file has esp8266 errors and the esp32 errors and the program.ino file that contains the flash based html code.........unzip and take a look,,,,,
unzip then select all text from !DOCTYPE html to /html save as xyz.html, include gt and lt symbols
the 2-click to display webpage in browser ,,, I get no issues [using chrome]
I tried a code washer which slightly changed stuff , but still got same errors ,
I'm thinking its more of an ide issue, but cannot figure out what the compiller is saying
it all refers to client,printf_P(html1);
Why is the compilier checking my html code anyway???
1250 client.printf_P(html1); shows error then 17 lines of similiar
Irrigate_80I_ESP32_noRuns.ino:1250:21: error: unknown conversion type character ';' in format [-Werror=format=]
then ESP32 shows cc1plus.exe: some warnings being treated as errors
mike.html.txt (25.1 KB)
remove .txt then 2 click the html file to see webpage display
You should escape your %
signs in format strings. See std::printf, std::fprintf, std::sprintf, std::snprintf - cppreference.com
% signs where? Is this just an off the cuff remark? please detail :
using client.printf_P(html1);
In the format string you pass to printf_P
.
No, it is exactly what the compiler is telling you here:
The character sequence %;
is not valid in a format string, it needs to be escaped using another %
, see the printf documentation I linked to.
Alternatively, if you don't need to format anything, don't use printf_P
in the first place.
thx PieterP I think I isolated the code, it is a snippit to display heartbeat [not needed since using
websockets, Temperature , and humitiy, I never really understood the code but it worked !
I mainly found the html stuff w3school and internet ....do you have any suggestions on what to change ?
Its on 1st or 2nd page of html , I can't get the code to print
Beats
%H%
_
Temperature
%T%°F
_
Humidity
%H% %
`
thanks again Mike
I think I will just forget about the printf_P and just use print, and
rcode the header area.
ciient.print looks just fine and no warning flags on ESP32 wemos D1 R32
I lost my DVI port on the MB. I moved the IDE etc to another pc , reinstalled stuff, and now I don't need to change client.printf_P ,, I now get no flags during compile ! hmmmm,.
I went back to original pc to try , but the IDE tries to go to display 2, which no longer exists, reinstalled ide, it still tries to goto display 2 [ taskbar shows pgm loaded ] , but no IDe display.....
A solution to this problem was shared here:
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.