has anyone used Steel series gauges with arduino acting as a web server?
I am total noob at html programming and serving web pages - I know justhow to serve simple html page. Things with steel series are more complicated, since you have to include .js libraries.
I could really use some guidance or simple example.
You might start by providing a link so we know what "steel series gauges" are.
here is the link:
Gauges are very nice and it would be great if arduino (or esp) could serve them
That link has some nice pictures but it says nothing about how they are created.
So Arduino will have to serve html page and also js library. One solution si that html page just directs to js library somewhere on the internet, but I would rather have self-sufficient page, not depending on anything on the net.
One solution si that html page just directs to js library somewhere on the internet,
To my mind that is the only practical solution with an Arduino. If that is not suitable maybe use a RaspberryPi or a cheap laptop.
To serve a lot of text from an Arduino you would probably have to store it on an SD card and reading from it would be slow.
Those gauges look interesting. This seems to be there home:
The LightBulb example might be the best starting place.
The JS running in the browser is probably not going to have a way to use the serial port directly, and if it did it would be on the local machine where the script was running (right?).
So how to interface the JS running on a client web browser to something that has access to the physical serial port. I was exploring that very thing a while back, but it needed a rest.
I have an idea that this will be fuel for that project.
actually I want to serve web page from ESP8266 or ESP32 using Arduino IDE. So all html and js would be stored in SPIFFS (flash memory).
I want to use those gauges on a standalone sensors, based on ESP microcontroller. Some sensors would act as AP (access point) and will not have connection to the internet, so my device needs to have complete page and necessery libraries.
, so my device needs to have complete page and necessery libraries.
I have not studied the code for those gauges but the usual way that web stuff works is that an image is displayed once and then parts of it are updated from time to time based on data that is sent by the server. That would probably require the browser making repeated requests to the server for (say) the latest RPM value.
On that basis I suspect it is not necessary to serve the JS code for creating the gauges from your ESP8266 - unless (of course) you wish to operate in a location where there is no regular internet access.
Have you looked at the esp8266 Forum - it probably has examples of how to serve web pages from SPIFFS
The stand-alone setup is what I prefer. The way I am thinking about trying a gauge is to run a gateway server on an R-Pi that connects to the serial hardware. This is the topic for that:
The idea was to have an R-Pi's serial hardware connected to the micro-controller. Then the gateway runs at a network port (8000) so the webpage can use JS's XMLHttpRequest() to access the WebSocket for updated values. This is where I got to with that project it has some notes that may (or not) help:
I have not used the ESP's, and suspect they have a few ways to do this sort of thing, but I like having the web server port (e.g. 80) separate from the WebSocket port that does stuff to the hardware.
Hi. I was able to use this library on UNO ,DUE , ESP32. This sketch I found on the Internet and do not know who the author. This is a very easy example. Libraries on third-party servers are used.
There is also a more complex project Arduino Mega Server.https://hi-lab.ru/english/arduino-mega-server (https://hi-lab.ru/english/arduino-mega-server)
In it the libraries are stored on the SD card .