Gauge

Support forum for MegunoLink
Post Reply
Siderits
Posts: 2
Joined: Fri Jul 06, 2018 1:29 am

Mon Jul 09, 2018 1:20 am

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
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Mon Jul 09, 2018 7:34 pm

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
Siderits
Posts: 2
Joined: Fri Jul 06, 2018 1:29 am

Tue Jul 10, 2018 12:41 am

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
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Tue Jul 10, 2018 7:55 am

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?
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Tue Jul 10, 2018 8:19 am

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 817 times
Cheers
Phil
GDataAcq
Posts: 1
Joined: Sat Feb 01, 2020 3:20 am

Tue Feb 11, 2020 9:11 pm

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.
Post Reply