Page 1 of 1

Gauge

Posted: Mon Jul 09, 2018 1:20 am
by Siderits
Would anyone have some insight about why my Gauge is stuck?

I'm using the statement MyPanel.GetValue(F("MyGauge"), SensorValue); in the Loop section of the Arduino sketch, but the visualizer shows the following message: some ASCII characters and the sentence "doesn't exist in MyGauge".

The TimePlot works fine with the analogRead(0) which stores to the variable SensorValue.

Thanks!

Rich

Re: Gauge

Posted: Mon Jul 09, 2018 7:34 pm
by philr
Hi Rich, are you trying to "get" the value from your gauge or "set" the gauge to show a value? You're example shows a get.

Cheers
Phil

Re: Gauge

Posted: Tue Jul 10, 2018 12:41 am
by Siderits
Hi Phil:

I have a simple light sensor setup on a breadboard that is updating a TimePlot with no problem, but would like to have a gauge also reading the SensorValue from the photo-resistor.

I can set the gauge value with a statement like: MyPanel.SetNumber(F("MyGauge"), 42); but I can't figure out how to read the photo-resistor value thats coming in from int SensorValue = analogRead(0); and then have that number display on the gauge. There doesn't yet seem to be an example of a gauge script to follow and learn from.

Thanks

Richard

Re: Gauge

Posted: Tue Jul 10, 2018 7:55 am
by philr
Hi Richard, so you would just go MyPanel.SetNumber(F("MyGauge"),analogRead(0)). or:

SensorValue = analogRead(0);
MyPanel.SetNumber(F("MyGauge"),SensorValue);

Does that make sense?

Re: Gauge

Posted: Tue Jul 10, 2018 8:19 am
by philr
Attached is an example which includes setting the gauge. The .ino files is the arduino program and the .mlpz file is a pre-made megunolink interface.
UpdatingInterfaceFromArduino.zip
(30.77 KiB) Downloaded 214 times
Cheers
Phil

Re: Gauge - instructions are very minimal, no examples

Posted: Tue Feb 11, 2020 9:11 pm
by GDataAcq
I am mostly using MegunoLink for monitoring sensors and Data Acquistion on my Stirling engine. The explaination of the "Gauge" feature in Interface Panel is really insufficient, unless you already know how it works. The one example posted here, on the forum, helped me at least find the general format of entries into the Arduino sketch. There should be a good example in the MegunoLink website for Gauge that is much more complete. It should address which items go into the Arduino sketch (and the format) and which are controlled in the Designer and Properties and its sub-menus and how to open these (such as the label collection). It was only by much trial and error that I discovered label collection editor and how it works.

The document under "controls" for gauge, shows what I can only guess are text boxes below each gauge but no information about how that information got there. It does not seem to be a part of the Interface Designer.