Page 1 of 1

List All Updates Buttons

Posted: Sat Apr 23, 2016 12:24 am
by bpatt
Hello,

New to the MegunoLink but it looks very promising.

I'm trying to create an interface for a real time voltage measurement. I have the Arduino working correctly, taking measurements, outputting data in MegunoLink format, and variables to externally control it. But, I'm new to the interface thing and not sure if what I'm trying to do is something possible or that these features don't exist so I thought I would ask.

First, is there a way to use !ListAll when the interface panel is first opened to get the current status of all control commands? I.e. if my frequency variable is set to 15 Hz and I have a variable input box on the interface panel, it would be nice if when I started up, it would show 15 (or whatever the real value is) instead of 0.

This also leads into the next question which is, can I make a toggle status button? I.e. a button to start/stop collecting data which tells me Collect On or Collect Off depending on what the current state of the collect variable on the Arduino is.

Third, is it possible to use check boxes to update a variable on the interface panel (not send a command) which the variable is then sent on to the Arduino? I.e. 4 check boxes where each box represents a bit in a byte which is then sent to the Arduino.

I'm sure I'll have more questions later on but this is enough for now.

Thanks,

Re: List All Updates Buttons

Posted: Tue May 03, 2016 2:42 am
by admin
Hi, sorry for the late reply. I'll answer in order

- Unfortunately there is not a 1 time firing option for requesting all of the current settings. I'll put it on the request list. The only way that comes to mind for now is to have a button which requests the details.

- I think the only control that we currently support that could do this is the checkbox which could indicate its state as collecting or not. Another way is to have a button which enables collection and another which disables it and use pictures to indicate the current state. Like we did with the air conditioning example. (http://www.megunolink.com/articles/ardu ... nditioner/)

- To answer your third question I present a bit of a hidden feature (well we do mention parts of it). You can execute logic inside the command editor for sending a message. For example if you have two checkboxes you can send their logical state like this.
[IPCheckBox1.Checked?1:0][IPCheckBox2.Checked?1:0]

You would have to decode it specially but it will be possible.

Cheers
Phil