Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:48 17 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : drawing a Circular gauge

Author Message
envirotronics
Newbie

Joined: 18/02/2016
Location: Australia
Posts: 23
Posted: 03:47am 21 Dec 2020
Copy link to clipboard 
Print this post

Can anyone provide a couple of lines of code to draw the GUI GAGE.
I just cannot get it to work.
Also, when the line of code is longer than the LCD do we just ignore the message :line of code too long" and keep coding?
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 2006
Posted: 06:40am 21 Dec 2020
Copy link to clipboard 
Print this post

Don't know what platform you are using but look at Geoff's Projects-Micromite Backpack.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 08:29am 21 Dec 2020
Copy link to clipboard 
Print this post

This draws two gages.  The first is single colour while the second has green/yellow/red for increasing temperatures.

font 4, 1
GUI gauge #1, 150, 110, 100, RGB(white), 0, 0, 1000, 0, "l/h", RGB(cyan)
CtrlVal(#1) = 612
GUI gauge #2,150,310,100,RGB(white),0,0,100,1,"`C",RGB(green),50,RGB(yellow),75,RGB(red)
CtrlVal(#2) = 80


  envirotronics said  Also, when the line of code is longer than the LCD do we just ignore the message :line of code too long" and keep coding?

No.  Instead you can break the line in sections to edit it - then later reassembled it by deleting the line breaks.  This is tedious but there is a limit to what an editor embedded in a microcontroller can do.

Geoff
Edited 2020-12-21 18:30 by Geoffg
Geoff Graham - http://geoffg.net
 
envirotronics
Newbie

Joined: 18/02/2016
Location: Australia
Posts: 23
Posted: 08:46am 21 Dec 2020
Copy link to clipboard 
Print this post

Thank you Geoff for your respectful and mentoring style assistance.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025