Skip to content

Commit

Permalink
Add readme to multiple device example
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianPugh committed Aug 12, 2022
1 parent 5397220 commit 330c61d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions examples/08_multiple_devices/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Example 08: Multiple Devices
============================

Belay can interact with multiple micropython boards on different ports.
Tasks and Threads can be decorated multiple times from different devices.
When executed, devices are executed in the order that they were decorated (bottom upwards).
4 changes: 2 additions & 2 deletions examples/08_multiple_devices/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ def read_temperature():

@device2.thread
@device1.thread
def blink_thread():
def blink_loop():
while True:
set_led(True)
time.sleep(0.5)
set_led(False)
time.sleep(0.5)


blink_thread()
blink_loop()

0 comments on commit 330c61d

Please sign in to comment.