simplified IR API
This commit is contained in:
@ -68,10 +68,11 @@
|
||||
"sensors.ColorSensor.reflectedLight": "Get current reflected light value from the color sensor.",
|
||||
"sensors.GyroSensor.angle": "Get the current angle from the gyroscope.",
|
||||
"sensors.GyroSensor.rate": "Get the current rotation rate from the gyroscope.",
|
||||
"sensors.InfraredSensor.onObjectNear": "Registers code to run when an object is getting near.",
|
||||
"sensors.InfraredSensor.onObjectNear|param|handler": "the code to run when detected",
|
||||
"sensors.InfraredSensor.on": "Registers code to run when an object is getting near.",
|
||||
"sensors.InfraredSensor.on|param|handler": "the code to run when detected",
|
||||
"sensors.InfraredSensor.proximity": "Get the promixity measured by the infrared sensor, from ``0`` (close) to ``100`` (far)",
|
||||
"sensors.InfraredSensor.remoteCommand": "Get the remote commandreceived the infrared sensor.",
|
||||
"sensors.InfraredSensor.wait": "Waits for the event to occur",
|
||||
"sensors.RemoteInfraredBeaconButton.isPressed": "Check if a remote button is currently pressed or not.",
|
||||
"sensors.RemoteInfraredBeaconButton.onEvent": "Do something when a button or sensor is clicked, up or down",
|
||||
"sensors.RemoteInfraredBeaconButton.onEvent|param|body": "code to run when the event is raised",
|
||||
@ -80,8 +81,9 @@
|
||||
"sensors.TouchSensor.onEvent": "Do something when a touch sensor is touched...",
|
||||
"sensors.TouchSensor.onEvent|param|body": "code to run when the event is raised",
|
||||
"sensors.UltraSonicSensor.distance": "Gets the distance from the sonar in millimeters",
|
||||
"sensors.UltraSonicSensor.onObjectNear": "Registers code to run when the given color is close",
|
||||
"sensors.UltraSonicSensor.onObjectNear|param|handler": "the code to run when detected",
|
||||
"sensors.UltraSonicSensor.on": "Registers code to run when the given color is close",
|
||||
"sensors.UltraSonicSensor.on|param|handler": "the code to run when detected",
|
||||
"sensors.UltraSonicSensor.wait": "Waits for the event to occur",
|
||||
"sensors.remoteButtonBottomLeft": "Remote bottom-left button.",
|
||||
"sensors.remoteButtonBottomRight": "Remote bottom-right button.",
|
||||
"sensors.remoteButtonCenter": "Remote beacon (center) button.",
|
||||
|
@ -10,6 +10,8 @@
|
||||
"ColorSensorColor.Red|block": "red",
|
||||
"ColorSensorColor.White|block": "white",
|
||||
"ColorSensorColor.Yellow|block": "yellow",
|
||||
"InfraredSensorEvent.ObjectDetected|block": "object detected",
|
||||
"InfraredSensorEvent.ObjectNear|block": "object near",
|
||||
"LightsPattern.GreenFlash|block": "Flashing Green",
|
||||
"LightsPattern.GreenPulse|block": "Pulsing Green",
|
||||
"LightsPattern.Green|block": "Green",
|
||||
@ -25,11 +27,11 @@
|
||||
"Output.B|block": "B",
|
||||
"Output.C|block": "C",
|
||||
"Output.D|block": "D",
|
||||
"PromixityEvent.ObjectDetected|block": "object detected",
|
||||
"PromixityEvent.ObjectNear|block": "object near",
|
||||
"TouchSensorEvent.Bumped|block": "bumped",
|
||||
"TouchSensorEvent.Pressed|block": "pressed",
|
||||
"TouchSensorEvent.Released|block": "released",
|
||||
"UltrasonicSensorEvent.ObjectDetected|block": "object detected",
|
||||
"UltrasonicSensorEvent.ObjectNear|block": "object near",
|
||||
"brick.Button.isPressed|block": "%button|is pressed",
|
||||
"brick.Button.onEvent|block": "on %button|%event",
|
||||
"brick.Button.wasPressed|block": "%button|was pressed",
|
||||
@ -71,16 +73,18 @@
|
||||
"sensors.ColorSensor.reflectedLight|block": "%color| reflected light",
|
||||
"sensors.GyroSensor.angle|block": "%sensor|angle",
|
||||
"sensors.GyroSensor.rate|block": "%sensor|rotation rate",
|
||||
"sensors.InfraredSensor.onObjectNear|block": "on %sensor|object near",
|
||||
"sensors.InfraredSensor.on|block": "on %sensor|%event",
|
||||
"sensors.InfraredSensor.proximity|block": "%infrared|proximity",
|
||||
"sensors.InfraredSensor.remoteCommand|block": "%infrared|remote command",
|
||||
"sensors.InfraredSensor.wait|block": "wait %sensor|for %event",
|
||||
"sensors.RemoteInfraredBeaconButton.isPressed|block": "%button|is pressed",
|
||||
"sensors.RemoteInfraredBeaconButton.onEvent|block": "on %button|%event",
|
||||
"sensors.RemoteInfraredBeaconButton.wasPressed|block": "%button|was pressed",
|
||||
"sensors.TouchSensor.isTouched|block": "%sensor|is touched",
|
||||
"sensors.TouchSensor.onEvent|block": "on %sensor|%event",
|
||||
"sensors.UltraSonicSensor.distance|block": "%sensor|distance",
|
||||
"sensors.UltraSonicSensor.onObjectNear|block": "on %sensor|object near",
|
||||
"sensors.UltraSonicSensor.on|block": "on %sensor|%event",
|
||||
"sensors.UltraSonicSensor.wait|block": "wait %sensor|for %event",
|
||||
"sensors.color1|block": "color sensor 1",
|
||||
"sensors.color2|block": "color sensor 2",
|
||||
"sensors.color3|block": "color sensor 3",
|
||||
|
Reference in New Issue
Block a user