pxt-ev3/tests/touch.ts
2018-01-05 19:14:55 -08:00

7 lines
270 B
TypeScript

tests.test("Touch sensor pressed", function () {
brick.print("Press touch sensor", 0, 50)
brick.print("and click enter", 0, 60)
brick.buttonEnter.pauseUntil(ButtonEvent.Click)
brick.clearScreen()
tests.assert("Pressed", sensors.touch1.isPressed())
})