Skip to content

Commit 28188a8

Browse files
authored
Update asyncio_simpletest.py
1 parent a1ca479 commit 28188a8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/asyncio_simpletest.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: MIT
44

5-
### Example for one led:
5+
# -----[Example for one led]-----------------------------
66

77
import asyncio
88
import board
@@ -28,14 +28,13 @@ async def main(): # Don't forget the async!
2828
asyncio.run(main())
2929

3030

31-
### Example for two leds:
31+
# -----[Example for two leds]-------------------------------
3232

33-
import asyncio
34-
import board
35-
import digitalio
33+
# Import modules as above
3634

3735

3836
async def blink(pin, interval, count):
37+
# pylint: disable=function-redefined
3938
with digitalio.DigitalInOut(pin) as led:
4039
led.switch_to_output(value=False)
4140
for _ in range(count):
@@ -46,6 +45,7 @@ async def blink(pin, interval, count):
4645

4746

4847
async def main():
48+
# pylint: disable=function-redefined
4949
led1_task = asyncio.create_task(blink(board.D1, 0.25, 10))
5050
led2_task = asyncio.create_task(blink(board.D2, 0.1, 20))
5151

0 commit comments

Comments
 (0)