Go Down

Topic: Steel Series gauges from HanSolo (Read 28565 times) previous topic - next topic

damo1023

Hello,


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.

Thank you!


Damo

Robin2

You might start by providing a link so we know what "steel series gauges" are.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

damo1023

Sorry,

here is the link:

https://harmoniccode.blogspot.com/2011/09/steelseries-396.html


Gauges are very nice and it would be great if arduino (or esp) could serve them

Robin2

That link has some nice pictures but it says nothing about how they are created.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

damo1023

Gauges are created in javascript.

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.

Robin2

#5
Jan 10, 2019, 10:39 am Last Edit: Jan 10, 2019, 10:40 am by Robin2
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.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

ron_sutherland

Those gauges look interesting. This seems to be there home:

https://github.com/HanSolo/SteelSeries-Canvas

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.
I use an R-Pi Zero on an RPUpi shield to have a tool-chain at the network edge.

damo1023

Hello,

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.

Robin2

#8
Jan 11, 2019, 10:42 am Last Edit: Jan 11, 2019, 10:43 am by Robin2
, 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

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

ron_sutherland

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:

https://forum.arduino.cc/index.php?topic=571320.0

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:

https://github.com/epccs/RPUpi/tree/master/WSGIdaemon

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.
I use an R-Pi Zero on an RPUpi shield to have a tool-chain at the network edge.

Go Up