<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Deep Sleep shield stopped working]]></title><description><![CDATA[<p dir="auto">I have a number of the original LoPy and V1 Expansion boards and the deepsleep shields. I got it working when the ds shield was released but tried today and no go.</p>
<p dir="auto">The example code on in the Docs does not work with the current library (1.0.5).  The following code does not error but never wakes up. LoPy starts blue flashing when it is meant to be asleep.</p>
<p dir="auto">code [Code tags added by <a class="plugin-mentions-group plugin-mentions-a" href="https://forum.pycom.io/groups/administrators">@administrators</a>]</p>
<pre><code>import deepsleep

ds = deepsleep.DeepSleep()

# get the wake reason and the value of the pins during wake up
wake_s = ds.get_wake_status()
print(wake_s)

if wake_s['wake'] == deepsleep.PIN_WAKE:
    print(&quot;Pin wake up&quot;)
elif wake_s['wake'] == deepsleep.TIMER_WAKE:
    print(&quot;Timer wake up&quot;)
else:  # deepsleep.POWER_ON_WAKE:
    print(&quot;Power ON reset&quot;)

ds.enable_pullups('P17')  # can also do ds.enable_pullups(['P17', 'P18'])
ds.enable_wake_on_fall('P17') # can also do ds.enable_wake_on_fall(['P17', 'P18'])

ds.go_to_sleep(10)  # go to sleep for 60 seconds 
</code></pre>
<p dir="auto">Result</p>
<pre><code>Uploading project (main folder)...
Reading file status
[1/1] Writing file main.py
Upload done, resetting board...
ets Jun  8 2016 00:22:57

rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff8028,len:8
load:0x3fff8030,len:1728
load:0x4009fa00,len:0
load:0x4009fa00,len:14584
entry 0x400a059c
Booting...
Telnet server started
{'P10': 0, 'wake': 0, 'P18': 0, 'P17': 0}
Pin wake up
Traceback (most recent call last):
  File &quot;main.py&quot;, line 42, in &lt;module&gt;
  File &quot;/flash/lib/deepsleep.py&quot;, line 182, in go_to_sleep
  File &quot;/flash/lib/deepsleep.py&quot;, line 75, in poke
  File &quot;/flash/lib/deepsleep.py&quot;, line 48, in _magic
KeyboardInterrupt:
Pycom MicroPython 1.18.0 [v1.8.6-849-046b350] on 2018-06-01; LoPy with ESP32
Type &quot;help()&quot; for more information.
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff8028,len:8
load:0x3fff8030,len:1728
load:0x4009fa00,len:0
load:0x4009fa00,len:14584
entry 0x400a059c
Booting...
Telnet server started
{'P10': 0, 'wake': 0, 'P18': 0, 'P17': 0}
Pin wake up
Traceback (most recent call last):
  File &quot;main.py&quot;, line 42, in &lt;module&gt;
  File &quot;/flash/lib/deepsleep.py&quot;, line 184, in go_to_sleep
  File &quot;/flash/lib/deepsleep.py&quot;, line 75, in poke
  File &quot;/flash/lib/deepsleep.py&quot;, line 48, in _magic
KeyboardInterrupt:
Pycom MicroPython 1.18.0 [v1.8.6-849-046b350] on 2018-06-01; LoPy with ESP32
Type &quot;help()&quot; for more information.
&gt;&gt;&gt;
&gt;&gt;&gt; os.uname()
(sysname='LoPy', nodename='LoPy', release='1.18.0', version='v1.8.6-849-046b350 on 2018-06-01', machine='LoPy with ESP32', lorawan='1.0.2')
&gt;&gt;&gt;
</code></pre>
]]></description><link>https://forum.pycom.io/topic/3404/deep-sleep-shield-stopped-working</link><generator>RSS for Node</generator><lastBuildDate>Tue, 16 Jun 2026 18:42:39 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/3404.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 24 Jun 2018 21:41:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Deep Sleep shield stopped working on Mon, 25 Jun 2018 15:23:37 GMT]]></title><description><![CDATA[<p dir="auto">I have a number of the original LoPy and V1 Expansion boards and the deepsleep shields. I got it working when the ds shield was released but tried today and no go.</p>
<p dir="auto">The example code on in the Docs does not work with the current library (1.0.5).  The following code does not error but never wakes up. LoPy starts blue flashing when it is meant to be asleep.</p>
<p dir="auto">code [Code tags added by <a class="plugin-mentions-group plugin-mentions-a" href="https://forum.pycom.io/groups/administrators">@administrators</a>]</p>
<pre><code>import deepsleep

ds = deepsleep.DeepSleep()

# get the wake reason and the value of the pins during wake up
wake_s = ds.get_wake_status()
print(wake_s)

if wake_s['wake'] == deepsleep.PIN_WAKE:
    print(&quot;Pin wake up&quot;)
elif wake_s['wake'] == deepsleep.TIMER_WAKE:
    print(&quot;Timer wake up&quot;)
else:  # deepsleep.POWER_ON_WAKE:
    print(&quot;Power ON reset&quot;)

ds.enable_pullups('P17')  # can also do ds.enable_pullups(['P17', 'P18'])
ds.enable_wake_on_fall('P17') # can also do ds.enable_wake_on_fall(['P17', 'P18'])

ds.go_to_sleep(10)  # go to sleep for 60 seconds 
</code></pre>
<p dir="auto">Result</p>
<pre><code>Uploading project (main folder)...
Reading file status
[1/1] Writing file main.py
Upload done, resetting board...
ets Jun  8 2016 00:22:57

rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff8028,len:8
load:0x3fff8030,len:1728
load:0x4009fa00,len:0
load:0x4009fa00,len:14584
entry 0x400a059c
Booting...
Telnet server started
{'P10': 0, 'wake': 0, 'P18': 0, 'P17': 0}
Pin wake up
Traceback (most recent call last):
  File &quot;main.py&quot;, line 42, in &lt;module&gt;
  File &quot;/flash/lib/deepsleep.py&quot;, line 182, in go_to_sleep
  File &quot;/flash/lib/deepsleep.py&quot;, line 75, in poke
  File &quot;/flash/lib/deepsleep.py&quot;, line 48, in _magic
KeyboardInterrupt:
Pycom MicroPython 1.18.0 [v1.8.6-849-046b350] on 2018-06-01; LoPy with ESP32
Type &quot;help()&quot; for more information.
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff8028,len:8
load:0x3fff8030,len:1728
load:0x4009fa00,len:0
load:0x4009fa00,len:14584
entry 0x400a059c
Booting...
Telnet server started
{'P10': 0, 'wake': 0, 'P18': 0, 'P17': 0}
Pin wake up
Traceback (most recent call last):
  File &quot;main.py&quot;, line 42, in &lt;module&gt;
  File &quot;/flash/lib/deepsleep.py&quot;, line 184, in go_to_sleep
  File &quot;/flash/lib/deepsleep.py&quot;, line 75, in poke
  File &quot;/flash/lib/deepsleep.py&quot;, line 48, in _magic
KeyboardInterrupt:
Pycom MicroPython 1.18.0 [v1.8.6-849-046b350] on 2018-06-01; LoPy with ESP32
Type &quot;help()&quot; for more information.
&gt;&gt;&gt;
&gt;&gt;&gt; os.uname()
(sysname='LoPy', nodename='LoPy', release='1.18.0', version='v1.8.6-849-046b350 on 2018-06-01', machine='LoPy with ESP32', lorawan='1.0.2')
&gt;&gt;&gt;
</code></pre>
]]></description><link>https://forum.pycom.io/post/20451</link><guid isPermaLink="true">https://forum.pycom.io/post/20451</guid><dc:creator><![CDATA[jubbs]]></dc:creator><pubDate>Mon, 25 Jun 2018 15:23:37 GMT</pubDate></item><item><title><![CDATA[Reply to Deep Sleep shield stopped working on Mon, 25 Jun 2018 11:26:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/119">@jubbs</a> Can you please edit your post and add ``` before and after the code, so it gets properly formatted?</p>
]]></description><link>https://forum.pycom.io/post/20463</link><guid isPermaLink="true">https://forum.pycom.io/post/20463</guid><dc:creator><![CDATA[jcaron]]></dc:creator><pubDate>Mon, 25 Jun 2018 11:26:29 GMT</pubDate></item><item><title><![CDATA[Reply to Deep Sleep shield stopped working on Mon, 25 Jun 2018 15:24:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1538">@jcaron</a> <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/119">@jubbs</a> I used my administrative powers to update the above post adding the correct code tags.</p>
]]></description><link>https://forum.pycom.io/post/20470</link><guid isPermaLink="true">https://forum.pycom.io/post/20470</guid><dc:creator><![CDATA[Xykon]]></dc:creator><pubDate>Mon, 25 Jun 2018 15:24:42 GMT</pubDate></item></channel></rss>