Notifications
Clear all

Gauges for ESP devices

8 Posts
6 Users
2 Reactions
3,025 Views
(@ve3cga)
Member
Joined: 1 year ago
Posts: 9
Topic starter  

Hi all... I'd like to see a simple gauge example for the ESP devices on a web screen.

I have been using canvas-gauges but as I descovered they change their position way off in the card after a brief period

Tried google gauges but although easy to setup they need to be connected to the internet which means you can't use them offline, unlike canvas-gauges where you can download the main js.

Currently playing with SVG gauges but having trouble with the jscript transfering the ESP variable into the gauge variable

an example of a working google gauge

{5F6F05EE 5774 44F0 B270 E3B842688B44}

example of a yet to be tamed SVG gauge

{4AC84540 56C0 4FE7 92D5 D5E955D6F4B9}

a tutorial using the SVG gauge to take ESP readings and insert those into the SVG would be super

I can supply a sample of the ESP32 code which I traced into the webpage js using console, it just doesnt get into the gauge

 

thanks, Bob

 



   
Quote
robotBuilder
(@robotbuilder)
Member
Joined: 7 years ago
Posts: 2510
 

@ve3cga

Is this the sort of thing you are writing about?

https://randomnerdtutorials.com/esp32-web-server-gauges/

 



   
Ron reacted
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 2 years ago
Posts: 514
 

@robotbuilder 

Amazing!

As if "Made to order ..."

Nice find.


The one who has the most fun, wins!


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 6 years ago
Posts: 8047
 

@robotbuilder Perfect, exactly what he was looking for.


First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@ve3cga)
Member
Joined: 1 year ago
Posts: 9
Topic starter  

@robotbuilder hi, I have been using their gauges for some time now - amazing site and info

The problem is that the canvas-gauge after calling up the esp32 webpage, the gauge will move about 1/2 way up and 1/2 way to the left. which positions it 1/2 off the card

I looked on the site for the the jscript:

 http://cdn.rawgit.com/Mikhus/canvas-gauges/gh-pages/download/2.1.7/all/gauge.min.js 

and there are reports of this happening to others plus requests to Mikhus to look into it.

here is what the screen looks like when accessed:

{5C36432D 29E3 4AC0 8484 FA5E36161B6A}

and here is what it ends up as after a short time:

{CD0465DB 1C8A 47BB 891C 803A004F1AD9}

I have downloaded the Mikhus jscript and its part of the spiff files since I need this to work offline

I managed to get google gauges to work and they dont do this shifting, Problem is that google wont let you download their gauge script. We lost our internet last week this gauge disappeared and all that was left was the red square and the info under it.

{D11C2D0A D03E 4232 BCBA 458B95FD6963}

currently I'm trying to get the SVG gauge to work but for the life of me can't get the variable from the ESP32 into the gauge value. Using console log, I can verify that data from the esp32 is received in the jscript but doesnt get into the gauge value.

Its likely I dont know the correct code method to do this. It doesnt work the same as with canvas-gauges or google gauge.

I can zip up the files and attach them if needed

 

 

 



   
ReplyQuote
(@ve3cga)
Member
Joined: 1 year ago
Posts: 9
Topic starter  

 final update:

I gave up on others gauge libraries and radial gauges, the linear gauges are simple using svg grafix

I'm using svg gauges, no libraries to download!!

Been working perfectly for over a month now on my pool temp display and the house monitor

{1A0F9593 072F 4C56 AD4F 0736E2506611}
{15B9441C 4741 4B6E 8449 4AC338B76044}

 the gauge scales are cut n paste from actual outdoor temperature thermometers

simple to do but some fiddling to get the vertical line min & max to match actual reading on the 

scale grafix, but simple to do, just fiddley to get range, span and grafix centered to match the variable line from low to hi. Once that adjusting is done its copy n paste the degC & degF picture and the vertical line to each temp readout, same for voltage or what ever

The overall code is smaller as well since theres no embedding downloaded libs into the spiff files

I put a writeup on qrz in this forum:  https://forums.qrz.com/index.php?threads/chartgauge-problem.942693/

   



   
Marcelo reacted
ReplyQuote
noweare
(@noweare)
Member
Joined: 6 years ago
Posts: 220
 

Those graphics look really nice ! I will have to check this out for future projects. Thanks for sharing the results of your hard work !



   
ReplyQuote
(@marcelo)
Member
Joined: 3 years ago
Posts: 11
 

These color graphics are really vibrant and nice. Working wirh arduino IoT cloud would be much easier, no? Widgetd in arduino IoT cloud are ugly, but works fine



   
ReplyQuote