Hi there,
Working with a student on an Arduino controlled Smart Greenhouse. We are using an R4 WiFi with hopes to use Serial Monitor over Wifi to track what is going on without needing a direct USB connection.
Is there a simple way to do this?
I assumed it would be all over the web by now, but none of my searches found even a mention of it yet. I'm assuming I just had the wrong keywords, as this seems like one of the most basic things to do with it. All the examples were for more complicated things.
Sorry for the confusion, I mean the values that would be seen in serial monitor. They can be viewed in any format for this project, though the ability to send a serial command would be a nice bonus.
To clarify, is there example code to simple use the R4 as a local webserver and have it write out the serial.print commands in simple text format?
There is a build in ESP32 on the R4 Wifi, so I'm assuming that should work. I'm new to the IoT webserver bit, so I think the missing connection in my head is the converting the Serial.print command to print onto the webserver page. Is it automatic, or is there an extra bit of code needed, and where do I look this up?
Great! Thanks everyone for the help.
If anyone has a link to a good resource that helps provide examples of this I can give to my students that would be great!
I think that you are missing the point. What you can do is have the webserver serve HTML pages to the browser that contain the data that you want to display. This could be as simple as a list of numbers or a full blown web page with colour highlighting of significant values, tables of previous values, links to other pages etc, etc
Think of it as your own personal Internet holding data that you are interested in and presenting it in a meaningful way
For the ESP32 there is a real HUGE library collection. The ESP32 is the de-facto standard for WiFi
The WebSerial-library offers exactly what you are looking for.
I see a lot of half intelligent answers and suggestions, but this is easily the smartest way to handle serial ‘command line’ style of operation over a network.
It happily handled 115200 across the internet with a telnet client like PuTTY.
Use same print and parse routines - it just works.
I wrote my own telnet functions (not the above library) - it’s that easy once you get started.
Good luck… it opens up a huge opportunity, and is rarely mentioned!