File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,15 @@ that they are on `sys.path`.
85
85
* ` mqtt_log.py ` A publish-only MQTT application for Pyboard D. See below.
86
86
87
87
` mqtt_log.py ` requires the ` umqtt.simple ` library. This may be installed with
88
- [ upip_m ] ( https://github.com/peterhinch/micropython-samples/tree/master/micropip ) .
88
+ upip. See [ Installing library modules ] ( https://github.com/peterhinch/micropython-samples/tree/master/micropip ) .
89
89
```
90
- >>> upip_m.install('micropython-umqtt.simple')
90
+ >>> import upip
91
+ >>> upip.install('micropython-umqtt.simple')
91
92
```
93
+ Owing to [ this issue] ( https://github.com/micropython/micropython/issues/5152 )
94
+ this test is currently broken and I suspect that any usage of WiFi in low power
95
+ mode will fail.
96
+
92
97
This test is "experimental". Pyboard D support for low power WiFi is currently
93
98
incomplete. I have seen anomolous results where power was low initially before
94
99
jumping to ~ 30mA after a few hours. The application continued to run, but the
Original file line number Diff line number Diff line change @@ -50,8 +50,10 @@ async def main(loop):
50
50
Latency (2000 )
51
51
count = 0
52
52
while True :
53
+ print ('Publish' )
53
54
publish (ujson .dumps ([count , rtc .datetime ()]))
54
55
count += 1
56
+ print ('Wait 2 mins' )
55
57
await asyncio .sleep (120 ) # 2 mins
56
58
else : # Fail to connect
57
59
red .on ()
Original file line number Diff line number Diff line change 21
21
# Power won't be saved if this is done.
22
22
sleep_ms = utime .sleep_ms
23
23
24
- d_series = uname ().machine [:5 ] == 'PYBD_ '
24
+ d_series = uname ().machine [:4 ] == 'PYBD '
25
25
use_utime = True # Assume the normal utime timebase
26
26
27
27
if sys .platform == 'pyboard' :
41
41
42
42
# For lowest power consumption set unused pins as inputs with pullups.
43
43
# Note the 4K7 I2C pullups on X9 X10 Y9 Y10 (Pyboard 1.x).
44
+
45
+ # Pulling Pyboard D pins should be disabled if using WiFi as it now seems to
46
+ # interfere with it. Although until issue #5152 is fixed it's broken anyway.
44
47
if d_series :
45
48
print ('Running on Pyboard D' )
46
49
if not use_utime :
You can’t perform that action at this time.
0 commit comments