<?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[&#x27;Timer&#x27; has no attribute &#x27;PERIODIC&#x27;]]></title><description><![CDATA[<p dir="auto">Hi everyone,<br />
I'm just getting started with timers and irq and I was trying the example code.<br />
However I have an issue with the initialisation of the timer.<br />
Here is my code:</p>
<pre><code>tim1 = Timer(1, mode=Timer.PERIODIC)
tim1_ch = tim1.channel(Timer.A, freq=100)
tim1_ch.irq(priority=7, trigger=Timer.TIMEOUT, handler=acquireData_cb)
</code></pre>
<p dir="auto">And the return</p>
<pre><code>PYB: soft reboot
Traceback (most recent call last):
  File &quot;main.py&quot;, line 42, in &lt;module&gt;
AttributeError: type object 'Timer' has no attribute 'PERIODIC'
MicroPython v1.8.6-607-g9c8a0e9e on 2017-05-01; WiPy with ESP32
Type &quot;help()&quot; for more information.
</code></pre>
<p dir="auto">I was basically running with a custom firmware so I reflashed the last one but still gets the error</p>
<pre><code>&gt;&gt;&gt; import os
&gt;&gt;&gt; os.uname()
(sysname='WiPy', nodename='WiPy', release='1.6.13.b1', version='v1.8.6-607-g9c8a0e9e on 2017-05-01', machine='WiPy with ESP32')
</code></pre>
<p dir="auto">I already had a similar issue on pyBoard with the time module where ticks_ms was not available.</p>
<p dir="auto">Did someone already had the same problem?</p>
]]></description><link>https://forum.pycom.io/topic/1193/timer-has-no-attribute-periodic</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Mar 2026 03:05:38 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/1193.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 May 2017 15:30:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &#x27;Timer&#x27; has no attribute &#x27;PERIODIC&#x27; on Thu, 11 May 2017 15:30:25 GMT]]></title><description><![CDATA[<p dir="auto">Hi everyone,<br />
I'm just getting started with timers and irq and I was trying the example code.<br />
However I have an issue with the initialisation of the timer.<br />
Here is my code:</p>
<pre><code>tim1 = Timer(1, mode=Timer.PERIODIC)
tim1_ch = tim1.channel(Timer.A, freq=100)
tim1_ch.irq(priority=7, trigger=Timer.TIMEOUT, handler=acquireData_cb)
</code></pre>
<p dir="auto">And the return</p>
<pre><code>PYB: soft reboot
Traceback (most recent call last):
  File &quot;main.py&quot;, line 42, in &lt;module&gt;
AttributeError: type object 'Timer' has no attribute 'PERIODIC'
MicroPython v1.8.6-607-g9c8a0e9e on 2017-05-01; WiPy with ESP32
Type &quot;help()&quot; for more information.
</code></pre>
<p dir="auto">I was basically running with a custom firmware so I reflashed the last one but still gets the error</p>
<pre><code>&gt;&gt;&gt; import os
&gt;&gt;&gt; os.uname()
(sysname='WiPy', nodename='WiPy', release='1.6.13.b1', version='v1.8.6-607-g9c8a0e9e on 2017-05-01', machine='WiPy with ESP32')
</code></pre>
<p dir="auto">I already had a similar issue on pyBoard with the time module where ticks_ms was not available.</p>
<p dir="auto">Did someone already had the same problem?</p>
]]></description><link>https://forum.pycom.io/post/7348</link><guid isPermaLink="true">https://forum.pycom.io/post/7348</guid><dc:creator><![CDATA[Arkaik]]></dc:creator><pubDate>Thu, 11 May 2017 15:30:25 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;Timer&#x27; has no attribute &#x27;PERIODIC&#x27; on Thu, 11 May 2017 16:39:35 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1291">@Arkaik</a>,</p>
<p dir="auto">Where are you getting your example code from? Please see <a href="https://docs.pycom.io/pycom_esp32/pycom_esp32/tutorial/includes/timers.html" target="_blank" rel="noopener noreferrer nofollow">https://docs.pycom.io/pycom_esp32/pycom_esp32/tutorial/includes/timers.html</a> for our example code within our documentation.</p>
<p dir="auto">It's important to note that our timers do not work the same as on the Pyboard.</p>
<p dir="auto">Thanks!</p>
<p dir="auto">Alex</p>
]]></description><link>https://forum.pycom.io/post/7355</link><guid isPermaLink="true">https://forum.pycom.io/post/7355</guid><dc:creator><![CDATA[bucknall]]></dc:creator><pubDate>Thu, 11 May 2017 16:39:35 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;Timer&#x27; has no attribute &#x27;PERIODIC&#x27; on Fri, 12 May 2017 08:11:50 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/823">@bucknall</a>,</p>
<p dir="auto">I was using this documentation : <a href="https://docs.pycom.io/wipy/library/machine.Timer.html" target="_blank" rel="noopener noreferrer nofollow">https://docs.pycom.io/wipy/library/machine.Timer.html</a></p>
<p dir="auto">I had not realized yet that wipy documentation and wipy 2.0 was not the same...</p>
<p dir="auto">Thank you very much, everything is working fine now.</p>
]]></description><link>https://forum.pycom.io/post/7367</link><guid isPermaLink="true">https://forum.pycom.io/post/7367</guid><dc:creator><![CDATA[Arkaik]]></dc:creator><pubDate>Fri, 12 May 2017 08:11:50 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;Timer&#x27; has no attribute &#x27;PERIODIC&#x27; on Fri, 12 May 2017 08:51:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/823">@bucknall</a></p>
<p dir="auto">As there is not so much documentation about multithreading and interrupts, how could two threads communicate?<br />
I'm looking for a queue-like mecanism but I can't find anything about it neither in Threading or Timers.</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.pycom.io/post/7370</link><guid isPermaLink="true">https://forum.pycom.io/post/7370</guid><dc:creator><![CDATA[Arkaik]]></dc:creator><pubDate>Fri, 12 May 2017 08:51:16 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;Timer&#x27; has no attribute &#x27;PERIODIC&#x27; on Fri, 12 May 2017 15:34:23 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/823">@bucknall</a>, I finally found this <a href="https://pypi.python.org/pypi/micropython-uasyncio.queues/0.1.2" target="_blank" rel="noopener noreferrer nofollow">library</a> for using queues on micropython.</p>
<p dir="auto">However, this library need collections.deque and uasynio.core.</p>
<pre><code>1 from collections.deque import deque
2 from uasyncio.core import sleep
</code></pre>
<p dir="auto">I went to the github repository, I downloaded collection.deque but I couldn't find uasynio.core anywhere.</p>
<p dir="auto">I think I'm not importing libraries correctly because I need to modify the line <code>from collections.deque import deque</code> to <code>from collections import deque</code></p>
<p dir="auto">So now I would like to find the uasyncio.core module to be able to use the queue library ^^</p>
<p dir="auto">I hope I do not need to open a new thread for this question.<br />
If so, I'm sorry ;)</p>
]]></description><link>https://forum.pycom.io/post/7382</link><guid isPermaLink="true">https://forum.pycom.io/post/7382</guid><dc:creator><![CDATA[Arkaik]]></dc:creator><pubDate>Fri, 12 May 2017 15:34:23 GMT</pubDate></item></channel></rss>