Timer objects
-
Im working with a LoPy and Im trying to control an ultrasonic distance sensor. Distance measurement is done be measuring time difference in the ultrasonic echo signal. To implement this propery some kind of timer facility would be very handy. Where is the right place to put feature requests?
Nice to have:
- Timer objects like those done by the guys over at pyboard https://docs.micropython.org/en/latest/pyboard/library/pyb.Timer.html
- Currently there is only a ticks_ms() method in the time module. Are there any plans to fully fullfill the https://docs.micropython.org/en/latest/pyboard/library/time.html interface for the time module. Particularly the ticks_us() and the ticks_diff() functions would be very handy.
- To take full advante of the deepsleep mode, an RTC irq/wakeup would be very nice. The spec of the board says, that there is an RTC built-in.
Thanks & Cheers
Chris
-
@ekpegleg said in Timer objects:
Which friday? Im still waiting for the ticks_us() function. Can everyone show a hack to get the hc-sr04 to get working?
This Friday I believe.
-
@Xykon said in Timer objects:
@cfaessler Timer support should be added soon... hopefully by next Friday as originally announced.
Which friday? Im still waiting for the ticks_us() function. Can everyone show a hack to get the hc-sr04 to get working?
-
@MrPy Jep, lets hope for the best :) btw, this: https://github.com/mithru/MicroPython-Examples/blob/master/08.Sensors/HC-SR04/ultrasonic.py is a pretty good starting point.
-
@cfaessler said in Timer objects:
@MrPy thanks for asking. Im still waiting for the ticks_us() function. Currently the precison with ticks_ms() is not enough. I got it working, but only with rough accuracy.
Same situation as me then, I'm sure there is a hack to get it working but I might wait until the timer class is supported in the next f/w release.
-
@MrPy thanks for asking. Im still waiting for the ticks_us() function. Currently the precison with ticks_ms() is not enough. I got it working, but only with rough accuracy.
-
Hi @microman7k,
We are still updating our documentation to reflect which features are already implemented and which aren't. Please check: https://docs.pycom.io/pycom_esp32/library/machine.html
There's no
RTC
there so that means that it's not implemented yet.
-
@Ralph Does RTC work on Lopy with latest firmware or not?
Example:
rtc = machine.RTC()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'RTC'Thanks,..
-
I don't think the Timer class is supported by the Espressif IDF.... yet..
-
Hi Chris,
The forum is a good place to do feature requests. We do post 'weekly updates' that show our short term plans. Actual issues can go to github.
The RTC was a bit hidden in the docs, but you can find it here.
-
Hi Chris,
How did you get on with your ultrasonic sensor? I'm just starting out.
Cheers,
-
@cfaessler Timer support should be added soon... hopefully by next Friday as originally announced.