Skip to content

Commit d17b8c1

Browse files
committed
Remove call to connected function in examples
1 parent 35426ee commit d17b8c1

File tree

4 files changed

+0
-19
lines changed

4 files changed

+0
-19
lines changed

docs/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ To use this library you can import the `modulino` module along with the desired
88
from modulino import ModulinoPixels
99

1010
pixels = ModulinoPixels()
11-
12-
if not pixels.connected:
13-
print("🤷 No pixel modulino found")
14-
exit()
1511
```
1612
Once the desired object is obtained you can call functions and query properties on these objects such as `pixels.set_all_rgb(255, 0, 0)`.
1713

examples/buttons.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@
99
"""
1010

1111
from modulino import ModulinoButtons
12-
from sys import exit
1312

1413
buttons = ModulinoButtons()
1514

16-
if not buttons.connected:
17-
print("🤷 No button modulino found")
18-
exit()
19-
2015
buttons.on_button_a_press = lambda : print("Button A pressed")
2116
buttons.on_button_a_long_press = lambda : print("Button A long press")
2217
buttons.on_button_a_release = lambda : print("Button A released")

examples/pixels.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@
1010

1111
from modulino import ModulinoPixels, ModulinoColor
1212
from time import sleep
13-
from sys import exit
1413

1514
pixels = ModulinoPixels()
1615

17-
if not pixels.connected:
18-
print("🤷 No pixel modulino found")
19-
exit()
20-
2116
for index in range(0, 8):
2217
color_wheel_colors = [
2318
(255, 0, 0),

examples/thermo.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@
88

99
from modulino import ModulinoThermo
1010
from time import sleep
11-
from sys import exit
1211

1312
thermo_module = ModulinoThermo()
1413

15-
if not thermo_module.connected:
16-
print("🤷 No thermo modulino found")
17-
exit()
18-
1914
while True:
2015
temperature = thermo_module.temperature
2116
humidity = thermo_module.relative_humidity

0 commit comments

Comments
 (0)