Home→Forums→MonoBrick EV3 Firmware→wait for input from touch sensor→Reply To: wait for input from touch sensor
September 18, 2014 at 14:44
#4852

Tcm0
Participant
You use the button event and a loop. But that doesn’t work: You either have to use the button event or the loop.
Here is a quick example on how to use buttons without event:
`Buttons.ButtonStates TastenStatus = new Buttons.ButtonStates ();
Buttons.Instance.LedPattern (1);
do {
TastenStatus = Buttons.Instance.GetKeypress();
if (TastenStatus == Buttons.ButtonStates.Enter) { LcdConsole.WriteLine(“Enter is pressed.”); }
else LcdConsole.WriteLine(Convert.ToString(TastenStatus) + ” is pressed.”);
} while (TastenStatus != Buttons.ButtonStates.Escape);
Follow