File tree 3 files changed +5
-5
lines changed 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def timed_out(self): # Time since last change or last timeout rep
37
37
return True
38
38
return False
39
39
40
- async def accel_coro (timeout = 2000 ):
40
+ async def accel_coro (timeout = 2000 ):
41
41
accelhw = pyb .Accel () # Instantiate accelerometer hardware
42
42
await asyncio .sleep_ms (30 ) # Allow it to settle
43
43
accel = Accelerometer (accelhw , timeout )
@@ -53,7 +53,7 @@ async def accel_coro(timeout = 2000):
53
53
54
54
async def main (delay ):
55
55
print ('Testing accelerometer for {} secs. Move the Pyboard!' .format (delay ))
56
- print ('Test runs for 20s.' )
56
+ print ('Test runs for {}s.' . format ( delay ) )
57
57
asyncio .create_task (accel_coro ())
58
58
await asyncio .sleep (delay )
59
59
print ('Test complete!' )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ async def receiver():
18
18
sreader = asyncio .StreamReader (uart )
19
19
while True :
20
20
res = await sreader .readline ()
21
- print ('Recieved ' , res )
21
+ print ('Received ' , res )
22
22
23
23
async def main ():
24
24
asyncio .create_task (sender ())
Original file line number Diff line number Diff line change @@ -591,7 +591,7 @@ async def task(i, lock):
591
591
lock.release()
592
592
593
593
async def main ():
594
- lock = asyncio. Lock() # The Lock instance
594
+ lock = Lock() # The Lock instance
595
595
for n in range (1 , 4 ):
596
596
asyncio.create_task(task(n, lock))
597
597
await asyncio.sleep(10 )
@@ -620,7 +620,7 @@ async def task(i, lock):
620
620
await asyncio.sleep(0.5 )
621
621
622
622
async def main ():
623
- lock = asyncio. Lock() # The Lock instance
623
+ lock = Lock() # The Lock instance
624
624
for n in range (1 , 4 ):
625
625
asyncio.create_task(task(n, lock))
626
626
await asyncio.sleep(10 )
You can’t perform that action at this time.
0 commit comments