Skip to content

Commit 9452baf

Browse files
committed
Add interpreter to examples script
1 parent 2f043f3 commit 9452baf

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

examples/change_address.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def main():
2323
print("The following devices were found on the bus:")
2424

2525
for index, device in enumerate(devices):
26-
print(f"{index + 1}) {device.device_type} at {hex(device.address)}")
26+
dev_type = device.device_type if device.device_type is not None else "Unknown Device"
27+
print(f"{index + 1}) {dev_type} at {hex(device.address)}")
2728

2829
choice_is_valid = False
2930
while not choice_is_valid:

run_examples.py

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python3
12
# This script will list the examples in the examples folder and run the selected example using mpremote.
23
# The user can select the example using the arrow keys.
34
# To run the script, use the following command:

0 commit comments

Comments
 (0)