|
3 | 3 | from uerrno import ENODEV |
4 | 4 |
|
5 | 5 | # Dictionary of device identifiers along with their name. |
6 | | -# Also check https://github.com/pybricks/technical-info/blob/master/assigned-numbers.md#io-device-type-ids |
7 | | -# for retired/internal |
8 | 6 | device_names = { |
9 | | - 1: "Wedo 2.0 Medium Motor", #DCMotor, analog ID |
10 | | - 2: "PUP Train Motor", #DCMotor, analog ID |
11 | | - 8: "PUP Light", #Light, analog ID |
12 | | - 34: "Wedo 2.0 Tilt Sensor", |
13 | | - 35: "Wedo 2.0 Infrared Sensor", # aka WeDo 2.0 Motion Sensor |
14 | | - 37: "BOOST Color Distance Sensor", |
| 7 | + # pybricks.pupdevices.DCMotor |
| 8 | + 1: "Wedo 2.0 Medium Motor", |
| 9 | + 2: "Powered Up Train Motor", |
| 10 | + # pybricks.pupdevices.Light |
| 11 | + 8: "Powered Up Light", |
| 12 | + # pybricks.pupdevices.Motor |
15 | 13 | 38: "BOOST Interactive Motor", |
16 | 14 | 46: "Technic Large Motor", |
17 | 15 | 47: "Technic Extra Large Motor", |
18 | 16 | 48: "SPIKE Medium Angular Motor", |
19 | 17 | 49: "SPIKE Large Angular Motor", |
| 18 | + 65: "SPIKE Small Angular Motor", |
| 19 | + 75: "Technic Medium Angular Motor", |
| 20 | + 76: "Technic Large Angular Motor", |
| 21 | + # pybricks.pupdevices.TiltSensor |
| 22 | + 34: "Wedo 2.0 Tilt Sensor", |
| 23 | + # pybricks.pupdevices.InfraredSensor |
| 24 | + 35: "Wedo 2.0 Infrared Motion Sensor", |
| 25 | + # pybricks.pupdevices.ColorDistanceSensor |
| 26 | + 37: "BOOST Color Distance Sensor", |
| 27 | + # pybricks.pupdevices.ColorSensor |
20 | 28 | 61: "SPIKE Color Sensor", |
| 29 | + # pybricks.pupdevices.UltrasonicSensor |
21 | 30 | 62: "SPIKE Ultrasonic Sensor", |
| 31 | + # pybricks.pupdevices.ForceSensor |
22 | 32 | 63: "SPIKE Force Sensor", |
23 | | - 64: "SPIKE 3x3 Color Light Matrix", |
24 | | - 65: "SPIKE Small Angular Motor", |
25 | | - 75: "Technic Medium Angular Motor", |
26 | | - 76: "Technic Large Angular Motor", |
| 33 | + # pybricks.pupdevices.ColorLightMatrix |
| 34 | + 64: "SPIKE 3x3 Color Light Matrix", |
27 | 35 | } |
28 | 36 |
|
29 | 37 | # Make a list of known ports. |
|
0 commit comments