Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:16 21 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 : gui gauge argument count

Author Message
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2681
Posted: 07:06pm 22 Aug 2022
Copy link to clipboard 
Print this post

I am trying to set up gui gauge but get Error: Argument count.
I read using commas for un needed parameters was ok.
I did use OPTION GUI CONTROLS 75.
Please point out my error.
OPTION BASE 0        ' 0 based arrays
OPTION EXPLICIT
dim myvoltage!

CONST bk = RGB(BLack)
const wh = rgb(white)
const bl = rgb(blue)
const gr = rgb(green)
const cy = rgb(cyan)
const re = rgb(red)
const ma = rgb(magenta)
const ye = rgb(yellow)
const br = rgb(brown)
'
SETPIN GP26, AIN
cls
gui gauge #1, 120, 160, 100, wh, bk, 0, 3.3, , , , , , , , ,

do
myvoltage! = PIN(GP26)
         ''text 0,0,left$(str$(myvoltage!),4)
CtrlVal(#1) =myvoltage!
loop
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3481
Posted: 07:40pm 22 Aug 2022
Copy link to clipboard 
Print this post

Try it without trailing commas.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2681
Posted: 07:41pm 22 Aug 2022
Copy link to clipboard 
Print this post

Forget it. Seems more parameters and ok. groovy!
OPTION BASE 0        ' 0 based arrays
OPTION EXPLICIT
dim myvoltage!

CONST bk = RGB(BLack)
const wh = rgb(white)
const bl = rgb(blue)
const gr = rgb(green)
const cy = rgb(cyan)
const re = rgb(red)
const ma = rgb(magenta)
const ye = rgb(yellow)
const br = rgb(brown)
'
SETPIN GP26, AIN
cls
gui gauge #1, 120, 160, 100, wh, bk, 0, 3.3, 3,"V" ,wh

do
myvoltage! = PIN(GP26)
         ''text 0,0,left$(str$(myvoltage!),4)
CtrlVal(#1) =myvoltage!
loop

 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2681
Posted: 07:49pm 22 Aug 2022
Copy link to clipboard 
Print this post

  lizby said  Try it without trailing commas.

Sorted it out. Seems you got to have the numbers displayed and number of places and a string which I just guessed could be "V".
I thought you could just have the dial bit. A few examoles in the manual would help imho. Too much is guessing.
luvin mmedit v4...better than terminal imho
Edited 2022-08-23 05:51 by stanleyella
 
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