Arduino Forum

Using Arduino => Interfacing w/ Software on the Computer => Topic started by: damo1023 on Jan 08, 2019, 09:23 pm

Title: Steel Series gauges from HanSolo
Post by: damo1023 on Jan 08, 2019, 09:23 pm
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
Title: Re: Steel Series gauges from HanSolo
Post by: Robin2 on Jan 08, 2019, 10:29 pm
You might start by providing a link so we know what "steel series gauges" are.

...R
Title: Re: Steel Series gauges from HanSolo
Post by: damo1023 on Jan 09, 2019, 07:08 am
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
Title: Re: Steel Series gauges from HanSolo
Post by: Robin2 on Jan 09, 2019, 10:24 am
That link has some nice pictures but it says nothing about how they are created.

...R
Title: Re: Steel Series gauges from HanSolo
Post by: damo1023 on Jan 10, 2019, 09:19 am
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.
Title: Re: Steel Series gauges from HanSolo
Post by: Robin2 on Jan 10, 2019, 10:39 am
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
Title: Re: Steel Series gauges from HanSolo
Post by: ron_sutherland on Jan 10, 2019, 09:28 pm
Those gauges look interesting. This seems to be there home:

https://github.com/HanSolo/SteelSeries-Canvas (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.
Title: Re: Steel Series gauges from HanSolo
Post by: damo1023 on Jan 11, 2019, 08:32 am
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.
Title: Re: Steel Series gauges from HanSolo
Post by: Robin2 on Jan 11, 2019, 10:42 am
, 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
Title: Re: Steel Series gauges from HanSolo
Post by: ron_sutherland on Jan 11, 2019, 10:29 pm
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 (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 (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.
Title: Re: Steel Series gauges from HanSolo
Post by: serghei1963 on Apr 13, 2019, 10:53 pm
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 .