Reply To: TouchSensor event

HomeForumsMonoBrick EV3 FirmwareTouchSensor eventReply To: TouchSensor event

Author Image
Kees Smit

Ouch, stupid me…
The solution was simple. I made the mistake to create a MonoBrickFirmware.Sound.Speaker object in the method that is called whenever the event occurs (method StateChanged in TouchSensorEvents.cs). It takes some time to create this object for the first time, that’s why the events didn’t seem to come through at first press on TouchSensor. Instead of playing a sound I now write a line to the LCD and now everything works fine.
I hope my explanation is clear enough to understand it. As said before, I’m a newbe to C#…
Furthermore I simplyfied the code, see attachment.


  • This reply was modified 8 years, 3 months ago by Author ImageKees Smit.
You must be logged in to view attached files.
Posted in

Make a donation