mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
api/ev3devices: add InfraredSensor.keypad
This commit is contained in:
@@ -153,6 +153,9 @@ class InfraredSensor():
|
||||
def buttons(self, channel):
|
||||
"""Check which buttons on the infrared remote are pressed.
|
||||
|
||||
This method can detect up to two buttons at once. If you press
|
||||
more buttons, you may not get useful data.
|
||||
|
||||
Arguments:
|
||||
channel (int): Channel number of the remote.
|
||||
|
||||
@@ -162,6 +165,20 @@ class InfraredSensor():
|
||||
"""
|
||||
pass
|
||||
|
||||
def keypad(self):
|
||||
"""Check which buttons on the infrared remote are pressed.
|
||||
|
||||
This method can independently detect all 4 up/down buttons, but
|
||||
it cannot detect the beacon button.
|
||||
|
||||
This method only works with the remote in channel 1.
|
||||
|
||||
:returns: List of pressed buttons on the remote on selected channel.
|
||||
:rtype: List of :class:`Button <.parameters.Button>`
|
||||
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class GyroSensor():
|
||||
"""LEGO® MINDSTORMS® EV3 Gyro Sensor.
|
||||
|
||||
Reference in New Issue
Block a user