Call a function when ‘Connect’ is clicked

Support forum for MegunoLink
Post Reply
indridkold
Posts: 4
Joined: Thu Apr 25, 2019 11:35 am

Tue Oct 15, 2019 1:04 pm

Hello,
Is there a way to call an ‘OnConnect’ function? I’d like to initialize the display values with current values from the Arduino. I have an ‘Initialize’ button that does this, but sometimes users forget to click it. Any assistance appreciated, IK
philr
Posts: 292
Joined: Mon May 26, 2014 10:58 am

Wed Oct 16, 2019 5:30 am

Hi you can use the serial connection item in the interface panel
x2scrap2.png
x2scrap2.png (24.46 KiB) Viewed 109 times
It will send your microcontroller a message after connection is established.

Cheers
Phil
indridkold
Posts: 4
Joined: Thu Apr 25, 2019 11:35 am

Fri Oct 18, 2019 12:22 pm

Perfect! That’s exactly what I was looking for.
Thanks,
IK
Post Reply