Sensor events

HomeForumsMonoBrick EV3 FirmwareSensor events

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5356
    Author Image
    Kristian Jensen
    Participant

    I am presently trying out the first experiments with your fantastic product.
    I would like to create a simple vehicle that will respond to the various sensor inputs.

    Is it only the keypad on the brick that can raise events, such as the ‘EscapePressed’ and ‘UpPressed’?
    Is it not possible to have respond to an event from e.g. the touch sensor?
    Alternatively, should an endless loop be used which constantly reads from the various, attached sensors and responds accordingly?

    Thank you.

    #5360
    Author Image
    Anders Søborg
    Keymaster

    Hi

    Is it not possible to have respond to an event from e.g. the touch sensor?

    No that is not part of the implementation.

    Alternatively, should an endless loop be used which constantly reads from the various, attached sensors and responds accordingly?

    Yes that would be one way. Be sure to add a sleep so you don’t do busy waiting. You might find the implementation for the button events usefull.

    /Anders

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Posted in

Make a donation