2018-02-02 18:48:27 +01:00
|
|
|
const enum InfraredSensorMode {
|
2017-07-10 12:37:14 +02:00
|
|
|
None = -1,
|
|
|
|
Proximity = 0,
|
|
|
|
Seek = 1,
|
|
|
|
RemoteControl = 2,
|
|
|
|
}
|
|
|
|
|
2018-02-02 18:48:27 +01:00
|
|
|
const enum InfraredRemoteChannel {
|
|
|
|
//% block="channel 0"
|
2017-07-10 12:37:14 +02:00
|
|
|
Ch0 = 0, // top
|
2018-02-02 18:48:27 +01:00
|
|
|
//% block="channel 1"
|
2017-07-10 12:37:14 +02:00
|
|
|
Ch1 = 1,
|
2018-02-02 18:48:27 +01:00
|
|
|
//% block="channel 2"
|
2017-07-10 12:37:14 +02:00
|
|
|
Ch2 = 2,
|
2018-02-02 18:48:27 +01:00
|
|
|
//% block="channel 3"
|
2017-07-10 12:37:14 +02:00
|
|
|
Ch3 = 3,
|
|
|
|
}
|
|
|
|
|
2018-02-02 18:48:27 +01:00
|
|
|
const enum InfraredRemoteButton {
|
|
|
|
//% block="center beacon"
|
2017-07-10 12:37:14 +02:00
|
|
|
CenterBeacon = 0x01,
|
2018-02-02 18:48:27 +01:00
|
|
|
//% block="top left"
|
2017-07-10 12:37:14 +02:00
|
|
|
TopLeft = 0x02,
|
2018-02-02 18:48:27 +01:00
|
|
|
//% block="bottom left"
|
2017-07-10 12:37:14 +02:00
|
|
|
BottomLeft = 0x04,
|
2018-02-02 18:48:27 +01:00
|
|
|
//% block="top right"
|
2017-07-10 12:37:14 +02:00
|
|
|
TopRight = 0x08,
|
2018-02-02 18:48:27 +01:00
|
|
|
//% block="bottom right"
|
2017-07-10 12:37:14 +02:00
|
|
|
BottomRight = 0x10,
|
|
|
|
}
|
|
|
|
|
2017-10-31 05:39:50 +01:00
|
|
|
const enum InfraredSensorEvent {
|
|
|
|
//% block="object near"
|
2018-02-02 07:03:01 +01:00
|
|
|
ObjectNear = 3,
|
2017-10-31 05:39:50 +01:00
|
|
|
//% block="object detected"
|
|
|
|
ObjectDetected = 2
|
|
|
|
}
|
|
|
|
|
2017-10-28 18:13:02 +02:00
|
|
|
namespace sensors {
|
2017-07-10 12:37:14 +02:00
|
|
|
function mapButton(v: number) {
|
|
|
|
switch (v) {
|
2018-02-06 00:11:11 +01:00
|
|
|
case 1: return InfraredRemoteButton.TopLeft;
|
|
|
|
case 2: return InfraredRemoteButton.BottomLeft;
|
|
|
|
case 3: return InfraredRemoteButton.TopRight;
|
|
|
|
case 4: return InfraredRemoteButton.BottomRight;
|
2018-02-02 18:48:27 +01:00
|
|
|
case 5: return InfraredRemoteButton.TopLeft | InfraredRemoteButton.TopRight
|
|
|
|
case 6: return InfraredRemoteButton.TopLeft | InfraredRemoteButton.BottomRight
|
|
|
|
case 7: return InfraredRemoteButton.BottomLeft | InfraredRemoteButton.TopRight
|
|
|
|
case 8: return InfraredRemoteButton.BottomLeft | InfraredRemoteButton.BottomRight
|
|
|
|
case 9: return InfraredRemoteButton.CenterBeacon
|
|
|
|
case 10: return InfraredRemoteButton.BottomLeft | InfraredRemoteButton.TopLeft
|
|
|
|
case 11: return InfraredRemoteButton.TopRight | InfraredRemoteButton.BottomRight
|
|
|
|
default: return 0;
|
2017-07-10 12:37:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-02 18:48:27 +01:00
|
|
|
const __remoteButtons: RemoteInfraredBeaconButton[] = [];
|
|
|
|
function __irButton(id: InfraredRemoteButton): RemoteInfraredBeaconButton {
|
2018-03-28 17:50:14 +02:00
|
|
|
for (let i = 0; i < __remoteButtons.length; ++i) {
|
2018-02-02 18:48:27 +01:00
|
|
|
if (__remoteButtons[i].position == id)
|
|
|
|
return __remoteButtons[i];
|
2017-10-24 20:58:52 +02:00
|
|
|
}
|
2018-02-02 18:48:27 +01:00
|
|
|
const btn = new RemoteInfraredBeaconButton(id, new brick.Button());
|
|
|
|
__remoteButtons.push(btn);
|
|
|
|
return btn;
|
2017-10-24 20:58:52 +02:00
|
|
|
}
|
2017-10-27 06:10:37 +02:00
|
|
|
|
|
|
|
//% fixedInstances
|
|
|
|
export class RemoteInfraredBeaconButton extends control.Component {
|
2018-02-02 18:48:27 +01:00
|
|
|
position: InfraredRemoteButton;
|
2018-02-06 00:11:11 +01:00
|
|
|
private _button: brick.Button;
|
2018-02-02 18:48:27 +01:00
|
|
|
constructor(position: InfraredRemoteButton, button: brick.Button) {
|
2017-10-27 06:10:37 +02:00
|
|
|
super();
|
2018-02-06 00:11:11 +01:00
|
|
|
this.position = position;
|
|
|
|
this._button = button;
|
2017-10-27 06:10:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
_update(curr: boolean) {
|
2018-02-06 00:11:11 +01:00
|
|
|
this._button._update(curr);
|
2017-10-27 06:10:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Check if a remote button is currently pressed or not.
|
|
|
|
* @param button the remote button to query the request
|
|
|
|
*/
|
2018-02-22 07:35:51 +01:00
|
|
|
//% help=sensors/beacon/is-pressed
|
2018-02-26 17:33:50 +01:00
|
|
|
//% block="**remote button** %button|is pressed"
|
2017-10-27 06:10:37 +02:00
|
|
|
//% blockId=remoteButtonIsPressed
|
|
|
|
//% parts="remote"
|
2017-10-28 18:13:02 +02:00
|
|
|
//% blockNamespace=sensors
|
2017-10-27 06:10:37 +02:00
|
|
|
//% weight=81 blockGap=8
|
|
|
|
//% group="Remote Infrared Beacon"
|
|
|
|
isPressed() {
|
2018-02-06 00:11:11 +01:00
|
|
|
return this._button.isPressed();
|
2017-10-27 06:10:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* See if the remote button was pressed again since the last time you checked.
|
|
|
|
* @param button the remote button to query the request
|
|
|
|
*/
|
2018-02-22 07:35:51 +01:00
|
|
|
//% help=sensors/beacon/was-pressed
|
2018-02-26 17:33:50 +01:00
|
|
|
//% block="**remote button** %button|was pressed"
|
2017-10-27 06:10:37 +02:00
|
|
|
//% blockId=remotebuttonWasPressed
|
2018-04-03 13:10:35 +02:00
|
|
|
//% blockHidden=true
|
2017-10-27 06:10:37 +02:00
|
|
|
//% parts="remote"
|
2017-10-28 18:13:02 +02:00
|
|
|
//% blockNamespace=sensors
|
2018-01-03 23:00:08 +01:00
|
|
|
//% weight=80
|
2017-10-27 06:10:37 +02:00
|
|
|
//% group="Remote Infrared Beacon"
|
|
|
|
wasPressed() {
|
2018-02-06 00:11:11 +01:00
|
|
|
return this._button.wasPressed();
|
2017-10-27 06:10:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2018-02-22 07:35:51 +01:00
|
|
|
* Do something when a remote button is pressed, bumped, or released
|
2017-10-27 06:10:37 +02:00
|
|
|
* @param button the button that needs to be clicked or used
|
|
|
|
* @param event the kind of button gesture that needs to be detected
|
|
|
|
* @param body code to run when the event is raised
|
|
|
|
*/
|
2018-02-22 07:35:51 +01:00
|
|
|
//% help=sensors/beacon/on-event
|
2018-02-26 17:33:50 +01:00
|
|
|
//% blockId=remotebuttonEvent block="on **remote button** %button|%event"
|
2017-10-27 06:10:37 +02:00
|
|
|
//% parts="remote"
|
2017-10-28 18:13:02 +02:00
|
|
|
//% blockNamespace=sensors
|
2017-10-27 06:10:37 +02:00
|
|
|
//% weight=99 blockGap=8
|
|
|
|
//% group="Remote Infrared Beacon"
|
|
|
|
onEvent(ev: ButtonEvent, body: () => void) {
|
2018-02-06 00:11:11 +01:00
|
|
|
this._button.onEvent(ev, body);
|
2017-10-27 06:10:37 +02:00
|
|
|
}
|
2018-02-02 18:48:27 +01:00
|
|
|
|
|
|
|
/**
|
2018-02-22 07:35:51 +01:00
|
|
|
* Pause until a remote button event happens
|
2018-02-02 18:48:27 +01:00
|
|
|
* @param ev the event to wait for
|
|
|
|
*/
|
2018-02-22 07:35:51 +01:00
|
|
|
//% help=sensors/beacon/pause-until
|
2018-02-26 17:33:50 +01:00
|
|
|
//% blockId=remoteButtonPauseUntil block="pause until **remote button** %button|%event"
|
2018-02-02 18:48:27 +01:00
|
|
|
//% parts="remote"
|
|
|
|
//% blockNamespace=sensors
|
|
|
|
//% weight=99 blockGap=8
|
|
|
|
//% group="Remote Infrared Beacon"
|
|
|
|
pauseUntil(ev: ButtonEvent) {
|
2018-02-06 00:11:11 +01:00
|
|
|
this._button.pauseUntil(ev);
|
2018-02-02 18:48:27 +01:00
|
|
|
}
|
2017-10-27 06:10:37 +02:00
|
|
|
}
|
2017-11-30 18:59:28 +01:00
|
|
|
|
2017-10-27 05:20:24 +02:00
|
|
|
//% fixedInstances
|
|
|
|
export class InfraredSensor extends internal.UartSensor {
|
2018-02-02 18:48:27 +01:00
|
|
|
private _channel: InfraredRemoteChannel;
|
|
|
|
private _proximityThreshold: sensors.ThresholdDetector;
|
2017-07-10 12:37:14 +02:00
|
|
|
|
2017-10-24 20:58:52 +02:00
|
|
|
constructor(port: number) {
|
|
|
|
super(port)
|
2018-02-02 18:48:27 +01:00
|
|
|
this._channel = InfraredRemoteChannel.Ch0
|
|
|
|
this._proximityThreshold = new sensors.ThresholdDetector(this._id, 0, 100, 10, 90);
|
|
|
|
this.setMode(InfraredSensorMode.Proximity);
|
2017-07-10 12:37:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
_query() {
|
2018-02-02 18:48:27 +01:00
|
|
|
if (this.mode == InfraredSensorMode.RemoteControl)
|
|
|
|
return mapButton(this.getNumber(NumberFormat.UInt8LE, this._channel));
|
|
|
|
else if (this.mode == InfraredSensorMode.Proximity) {
|
2017-11-30 18:59:28 +01:00
|
|
|
return this.getNumber(NumberFormat.UInt16LE, 0) & 0x0fff;
|
2017-10-27 05:51:13 +02:00
|
|
|
}
|
2017-07-10 12:37:14 +02:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-03-28 17:50:14 +02:00
|
|
|
_info(): string {
|
|
|
|
if (this.mode == InfraredSensorMode.RemoteControl)
|
|
|
|
return "remote";
|
|
|
|
else if (this.mode == InfraredSensorMode.Proximity)
|
|
|
|
return `${this._query()}%`;
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2017-07-10 12:37:14 +02:00
|
|
|
_update(prev: number, curr: number) {
|
2018-02-02 18:48:27 +01:00
|
|
|
if (this.mode == InfraredSensorMode.RemoteControl) {
|
|
|
|
for (let i = 0; i < __remoteButtons.length; ++i) {
|
2018-02-06 00:11:11 +01:00
|
|
|
const v = !!(curr & __remoteButtons[i].position);
|
2018-02-02 18:48:27 +01:00
|
|
|
__remoteButtons[i]._update(v)
|
2017-10-27 05:51:13 +02:00
|
|
|
}
|
2018-02-02 18:48:27 +01:00
|
|
|
} else if (this.mode == InfraredSensorMode.Proximity) {
|
|
|
|
this._proximityThreshold.setLevel(curr);
|
2017-07-10 12:37:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-10 13:47:00 +02:00
|
|
|
_deviceType() {
|
2017-07-11 16:18:59 +02:00
|
|
|
return DAL.DEVICE_TYPE_IR
|
2017-07-10 13:47:00 +02:00
|
|
|
}
|
|
|
|
|
2018-02-02 18:48:27 +01:00
|
|
|
setMode(m: InfraredSensorMode) {
|
2017-07-10 12:37:14 +02:00
|
|
|
this._setMode(m)
|
|
|
|
}
|
|
|
|
|
2017-10-27 05:51:13 +02:00
|
|
|
/**
|
2018-02-22 07:35:51 +01:00
|
|
|
* Register code to run when an object is getting near.
|
2017-10-27 05:51:13 +02:00
|
|
|
* @param handler the code to run when detected
|
|
|
|
*/
|
2018-02-20 19:38:41 +01:00
|
|
|
//% help=sensors/infrared/on-event
|
2018-02-26 17:33:50 +01:00
|
|
|
//% block="on **infrared** %this|%event"
|
2017-10-31 05:39:50 +01:00
|
|
|
//% blockId=infraredOn
|
2017-10-27 05:51:13 +02:00
|
|
|
//% parts="infraredsensor"
|
2017-10-28 18:13:02 +02:00
|
|
|
//% blockNamespace=sensors
|
2017-10-27 05:51:13 +02:00
|
|
|
//% weight=100 blockGap=8
|
|
|
|
//% group="Infrared Sensor"
|
2018-02-26 17:33:50 +01:00
|
|
|
//% this.fieldEditor="ports"
|
2017-11-30 18:53:43 +01:00
|
|
|
onEvent(event: InfraredSensorEvent, handler: () => void) {
|
2018-02-02 18:48:27 +01:00
|
|
|
this._setMode(InfraredSensorMode.Proximity)
|
2017-11-30 18:59:28 +01:00
|
|
|
control.onEvent(this._id, event, handler);
|
2017-10-27 05:51:13 +02:00
|
|
|
}
|
2017-10-27 05:57:18 +02:00
|
|
|
|
2017-10-31 05:39:50 +01:00
|
|
|
/**
|
2018-02-22 07:35:51 +01:00
|
|
|
* Wait until the infrared sensor detects something
|
2017-10-31 05:39:50 +01:00
|
|
|
*/
|
2018-02-20 19:38:41 +01:00
|
|
|
//% help=sensors/infrared/pause-until
|
2018-02-26 17:33:50 +01:00
|
|
|
//% block="pause until **infrared** %this| %event"
|
2017-10-31 17:42:53 +01:00
|
|
|
//% blockId=infraredwait
|
2017-10-31 05:39:50 +01:00
|
|
|
//% parts="infraredsensor"
|
|
|
|
//% blockNamespace=sensors
|
|
|
|
//% weight=99 blockGap=8
|
2017-11-16 21:41:47 +01:00
|
|
|
//% group="Infrared Sensor"
|
2018-02-26 17:33:50 +01:00
|
|
|
//% this.fieldEditor="ports"
|
2017-12-12 19:46:56 +01:00
|
|
|
pauseUntil(event: InfraredSensorEvent) {
|
2018-02-02 18:48:27 +01:00
|
|
|
this._setMode(InfraredSensorMode.Proximity)
|
2017-11-30 18:38:04 +01:00
|
|
|
control.waitForEvent(this._id, event);
|
2017-10-27 05:57:18 +02:00
|
|
|
}
|
2017-11-30 18:59:28 +01:00
|
|
|
|
2017-10-24 14:30:05 +02:00
|
|
|
/**
|
2017-10-27 05:20:24 +02:00
|
|
|
* Get the promixity measured by the infrared sensor, from ``0`` (close) to ``100`` (far)
|
2017-12-07 07:34:11 +01:00
|
|
|
* @param sensor the infrared sensor
|
2017-10-24 14:30:05 +02:00
|
|
|
*/
|
2018-02-20 19:38:41 +01:00
|
|
|
//% help=sensors/infrared/proximity
|
2018-02-26 17:33:50 +01:00
|
|
|
//% block="**infrared** %this|proximity"
|
2017-10-27 05:20:24 +02:00
|
|
|
//% blockId=infraredGetProximity
|
2017-10-24 14:30:05 +02:00
|
|
|
//% parts="infrared"
|
2017-10-28 18:13:02 +02:00
|
|
|
//% blockNamespace=sensors
|
2018-02-26 17:33:50 +01:00
|
|
|
//% weight=98 blockGap=8
|
|
|
|
//% group="Infrared Sensor"
|
|
|
|
//% this.fieldEditor="ports"
|
2017-11-30 18:53:43 +01:00
|
|
|
proximity(): number {
|
2018-02-02 18:48:27 +01:00
|
|
|
this._setMode(InfraredSensorMode.Proximity)
|
2017-07-10 12:37:14 +02:00
|
|
|
return this.getNumber(NumberFormat.UInt8LE, 0)
|
|
|
|
}
|
|
|
|
|
2017-10-24 14:30:05 +02:00
|
|
|
/**
|
2018-02-22 07:35:51 +01:00
|
|
|
* Set the remote channel to listen to
|
2018-02-02 18:48:27 +01:00
|
|
|
* @param channel the channel to listen
|
2017-10-24 14:30:05 +02:00
|
|
|
*/
|
2017-10-28 18:13:02 +02:00
|
|
|
//% blockNamespace=sensors
|
2018-02-26 17:33:50 +01:00
|
|
|
//% blockId=irSetRemoteChannel block="set **infrared** %this|remote channel to %channel"
|
|
|
|
//% weight=99
|
2018-02-02 18:48:27 +01:00
|
|
|
//% group="Remote Infrared Beacon"
|
2018-02-26 17:33:50 +01:00
|
|
|
//% this.fieldEditor="ports"
|
2018-02-22 07:35:51 +01:00
|
|
|
//% help=sensors/beacon/set-remote-channel
|
2018-02-02 18:48:27 +01:00
|
|
|
setRemoteChannel(channel: InfraredRemoteChannel) {
|
|
|
|
this.setMode(InfraredSensorMode.RemoteControl)
|
|
|
|
channel = Math.clamp(0, 3, channel | 0)
|
|
|
|
this._channel = channel;
|
2017-07-10 12:37:14 +02:00
|
|
|
}
|
2018-01-09 21:46:48 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets a threshold value
|
|
|
|
* @param condition the dark or bright light condition
|
|
|
|
* @param value the value threshold
|
|
|
|
*/
|
2018-02-26 17:33:50 +01:00
|
|
|
//% blockId=irSetThreshold block="set **infrared** %this|%condition|to %value"
|
2018-04-12 23:25:44 +02:00
|
|
|
//% group="Calibration" blockGap=8 weight=49
|
2018-01-10 20:45:08 +01:00
|
|
|
//% value.min=0 value.max=100
|
2018-02-26 17:33:50 +01:00
|
|
|
//% this.fieldEditor="ports"
|
2018-02-02 18:48:27 +01:00
|
|
|
setPromixityThreshold(condition: InfraredSensorEvent, value: number) {
|
2018-01-09 21:46:48 +01:00
|
|
|
if (condition == InfraredSensorEvent.ObjectNear)
|
2018-02-02 18:48:27 +01:00
|
|
|
this._proximityThreshold.setLowThreshold(value)
|
2018-01-09 21:46:48 +01:00
|
|
|
else
|
2018-02-02 18:48:27 +01:00
|
|
|
this._proximityThreshold.setHighThreshold(value);
|
2018-01-09 21:46:48 +01:00
|
|
|
}
|
2018-01-30 17:27:23 +01:00
|
|
|
|
|
|
|
/**
|
2018-02-22 07:35:51 +01:00
|
|
|
* Get a threshold value
|
2018-01-30 17:27:23 +01:00
|
|
|
* @param condition the proximity condition
|
|
|
|
*/
|
2018-02-26 17:33:50 +01:00
|
|
|
//% blockId=irGetThreshold block="**infrared** %this|%condition"
|
2018-04-12 23:25:44 +02:00
|
|
|
//% group="Calibration" weight=49
|
2018-02-26 17:33:50 +01:00
|
|
|
//% this.fieldEditor="ports"
|
2018-02-02 18:48:27 +01:00
|
|
|
proximityThreshold(condition: InfraredSensorEvent): number {
|
2018-04-11 17:58:34 +02:00
|
|
|
return this._proximityThreshold.threshold(<ThresholdState><number>condition);
|
2018-02-02 18:48:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// TODO
|
|
|
|
private getDirectionAndDistance() {
|
|
|
|
this._setMode(InfraredSensorMode.Seek)
|
|
|
|
return this.getNumber(NumberFormat.UInt16LE, this._channel * 2)
|
|
|
|
}
|
2017-07-10 12:37:14 +02:00
|
|
|
}
|
|
|
|
|
2018-02-26 17:33:50 +01:00
|
|
|
//% fixedInstance whenUsed block="1" jres=icons.port1
|
2018-02-26 19:39:15 +01:00
|
|
|
export const infrared1: InfraredSensor = new InfraredSensor(1)
|
2017-10-24 20:58:52 +02:00
|
|
|
|
2018-02-26 17:33:50 +01:00
|
|
|
//% fixedInstance whenUsed block="2" jres=icons.port2
|
2018-02-26 19:39:15 +01:00
|
|
|
export const infrared2: InfraredSensor = new InfraredSensor(2)
|
2017-10-24 20:58:52 +02:00
|
|
|
|
2018-02-26 17:33:50 +01:00
|
|
|
//% fixedInstance whenUsed block="3" jres=icons.port3
|
2018-02-26 19:39:15 +01:00
|
|
|
export const infrared3: InfraredSensor = new InfraredSensor(3)
|
2017-10-24 20:58:52 +02:00
|
|
|
|
2018-02-26 17:33:50 +01:00
|
|
|
//% fixedInstance whenUsed block="4" jres=icons.port4
|
2018-02-26 19:39:15 +01:00
|
|
|
export const infrared4: InfraredSensor = new InfraredSensor(4)
|
2017-07-10 15:26:19 +02:00
|
|
|
|
2017-10-27 06:10:37 +02:00
|
|
|
/**
|
|
|
|
* Remote beacon (center) button.
|
|
|
|
*/
|
2018-02-26 17:33:50 +01:00
|
|
|
//% whenUsed block="center" weight=95 fixedInstance
|
2018-02-02 18:48:27 +01:00
|
|
|
export const remoteButtonCenter = __irButton(InfraredRemoteButton.CenterBeacon)
|
2017-11-30 18:59:28 +01:00
|
|
|
|
2017-07-10 15:26:19 +02:00
|
|
|
/**
|
|
|
|
* Remote top-left button.
|
|
|
|
*/
|
2018-02-26 17:33:50 +01:00
|
|
|
//% whenUsed block="top left" weight=95 fixedInstance
|
2018-02-02 18:48:27 +01:00
|
|
|
export const remoteButtonTopLeft = __irButton(InfraredRemoteButton.TopLeft)
|
2017-07-10 15:26:19 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Remote top-right button.
|
|
|
|
*/
|
2018-02-26 17:33:50 +01:00
|
|
|
//% whenUsed block="top right" weight=95 fixedInstance
|
2018-02-02 18:48:27 +01:00
|
|
|
export const remoteButtonTopRight = __irButton(InfraredRemoteButton.TopRight)
|
2017-07-10 15:26:19 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Remote bottom-left button.
|
|
|
|
*/
|
2018-02-26 17:33:50 +01:00
|
|
|
//% whenUsed block="bottom left" weight=95 fixedInstance
|
2018-02-02 18:48:27 +01:00
|
|
|
export const remoteButtonBottomLeft = __irButton(InfraredRemoteButton.BottomLeft)
|
2017-07-10 15:26:19 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Remote bottom-right button.
|
|
|
|
*/
|
2018-02-26 17:33:50 +01:00
|
|
|
//% whenUsed block="bottom right" weight=95 fixedInstance
|
2018-02-02 18:48:27 +01:00
|
|
|
export const remoteButtonBottomRight = __irButton(InfraredRemoteButton.BottomRight)
|
2017-07-10 12:37:14 +02:00
|
|
|
}
|