mc-Things
mc-Products => mc-Studio => Topic started by: gaston on August 12, 2016, 04:58:23 pm
-
Trying to lear how to use mc-Studio, I am writing a simple program to react to the button being pressed and released.
Class MQTT_Button
// The following will test the usage of the button on the McModule
Shared Event Button0Pressed() // The button have been pressed
LedGreen = True // Set the LedGreen ON
End Event
// The following will test the usage of the button on the McModule
Shared Event Button0Released() // The button have been released
LedGreen = False // Set the LedGreen OFF
End Event
End Class
I am using the build-in event Button0Pressed and Button0Released, mc-Studio is giving me an ertor 'Expected the Priority or Raised Clause'. I do not want to use the Raised clause since this event will be random when the button is pressed, how do I use the Priority Clause?
-
It should be ButtonPressed and ButtonReleased (without the 0)
-
Please update the mc-ScriptUserGuide (page 49 and 50)
-
I just did
-
Sorry, but I checked in mc-ScriptUserGuide.pdf online and the Butto0Pressed is still there.
-
I was not very clear but what I meant to say that I changed it in the version here. It still needs to be published to our web-site.