Page 1 of 1

Controlling interface from Arduino

Posted: Mon Apr 15, 2019 3:04 am
by RBerliner
I have been attempting to control the interface from my Arduino to have the interface reflect the status of variables stored in NV RAM on startup.

I have created an InterfacePanel Variable and I have included an MLPUIMessageProcessor in the Interface Panel Tray.

I have tried to simply set or clear a checkbox using:

razorPanel.SetCheck("Name");

placed in the loop method, where Name is the name of the panel checkbox control. Can razorPanel.SetCheck("Name") be placed in the setup method?

I have left the ChannelName for the MLPUIMessageProcessor blank.

I never see any messages in the Serial Monitro that begin with {UI.....

and in fact my program hangs when the razorPanel.SetCheck("Name") is not commented out.

I am Communicating through LOG_PORT (a usb serial port) and not a simple serial port. Is this supposed to be noted somewhere for the message processor to work?

I do have CommandHandler<> SerialCommandHandler(LOG_PORT);

and actions on the interface panel are propagated through to the Arduino.

Re: Controlling interface from Arduino

Posted: Mon Apr 15, 2019 6:26 am
by philr
Hi, what is a LOG_PORT? haven't seen that before. You can definitely put it in the setup function as long as you configure your serial port beforehand (serial.begin(9600)). You might want a slight delay after setting up the port. If your device isn't reset when connecting then you might also miss that message as setup is only called once.

Cheers
Phil

Re: Controlling interface from Arduino

Posted: Tue Apr 16, 2019 12:50 am
by RBerliner
Hi Phil:

The website said that the posting did not go out so I tried something else. See the next Post.