ChekBox Control

Support forum for MegunoLink
Post Reply
frankbicknell
Posts: 6
Joined: Wed Feb 28, 2018 1:54 pm

Fri Mar 02, 2018 4:13 pm

I am having a problem sending the value of a checkbox as a parameter. What is the data type of the checkbox control. I have tried boolean, char but I am not able to parse it. Thanks

Maybe it would be better to parse it in the Megunalink project and send it as an integer.

Even better is there documentation that shows all of the functions, properties and values, etc?
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Sat Mar 03, 2018 4:58 am

Hi Frank, yep we have a page that lists all the properties. If you use our Arduino library it will send the messages with the correct formatting.

These are the relevant pages to read through
https://www.megunolink.com/documentatio ... ace-panel/
https://www.megunolink.com/documentatio ... r-library/

I suggest you start by running the "Updating your Interface" example. Its available on the start page in MegunoLink. If you open the arduino code and MegunoLink project it will give you all you need to get going.

In the Arduino example look for the checkbox section. The below code is all you need (you do need to install the MegunoLink arduino library first otherwise the arduino program wont build).
MyPanel.SetCheck(F("MyCheckbox"));
MyPanel.ClearCheck(F("MyCheckbox"));

The above code ends up sending these serial messages to MegunoLink.
{UI|SET|MyCheckbox.Checked=true}
{UI|SET|MyCheckbox.Checked=false}

Cheers
Phil
Post Reply