event for ultrasonic module

This commit is contained in:
Peli de Halleux
2017-10-26 20:38:17 -07:00
parent 9a883d5672
commit 6b44352839
3 changed files with 45 additions and 1 deletions

View File

@ -38,6 +38,9 @@
"input.TouchSensor.onEvent": "Do something when a touch sensor is touched...",
"input.TouchSensor.onEvent|param|body": "code to run when the event is raised",
"input.UltraSonicSensor.distance": "Gets the distance from the sonar in millimeters",
"input.UltraSonicSensor.onObject": "Registers code to run when the given color is close",
"input.UltraSonicSensor.onObject|param|distance": "the distance in centimeters when an object is close, eg: 10",
"input.UltraSonicSensor.onObject|param|handler": "the code to run when detected",
"input.buttonDown": "Down button on the EV3 Brick.",
"input.buttonEnter": "Enter button on the EV3 Brick.",
"input.buttonLeft": "Left button on the EV3 Brick.",

View File

@ -44,6 +44,7 @@
"input.TouchSensor.isTouched|block": "%sensor|is touched",
"input.TouchSensor.onEvent|block": "on %sensor|%event",
"input.UltraSonicSensor.distance|block": "%sensor|distance",
"input.UltraSonicSensor.onObject|block": "on %sensor|object within %distance|cm",
"input.buttonDown|block": "brick button down",
"input.buttonEnter|block": "brick button enter",
"input.buttonLeft|block": "brick button left",