Sipeed MAIX BiT - machine.time_pulse_us

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
darkglove
Posts: 9
Joined: Wed Jul 22, 2020 11:12 am

Sipeed MAIX BiT - machine.time_pulse_us

Post by darkglove » Thu Jul 23, 2020 3:14 pm

I wanted to use "machine.time_pulse_us" on a Sipeed MAIX BiT

It seems to newb me that "machine" on these boards have their own set of functions, not the standard micropython ones I've been using on an ESP32.

I think the information I am looking for to recreate "pulseSensor = machine.time_pulse_us(pwPin, HIGH)" is somewhere in

https://maixpy.sipeed.com/en/libs/machine/timer.html

But I'm not really sure

Help appreciated

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Sipeed MAIX BiT - machine.time_pulse_us

Post by jimmo » Fri Jul 24, 2020 3:04 am

darkglove wrote:
Thu Jul 23, 2020 3:14 pm
It seems to newb me that "machine" on these boards have their own set of functions, not the standard micropython ones I've been using on an ESP32.
Sipeed have their own fork of MicroPython and sadly they have implemented their own libraries, which means they have different functionality to the "official" MicroPython. I would imagine that you might be able to use a timer in input capture mode to achieve this, but I don't see input capture in their timer API either.

darkglove
Posts: 9
Joined: Wed Jul 22, 2020 11:12 am

Re: Sipeed MAIX BiT - machine.time_pulse_us

Post by darkglove » Fri Jul 24, 2020 6:39 am

Thanks again, jimmo

I was going to ask them directly but apart from the online docs and a few posts on here from a couple of years back they don't seem to have much in the way of support.


darkglove
Posts: 9
Joined: Wed Jul 22, 2020 11:12 am

Re: Sipeed MAIX BiT - machine.time_pulse_us

Post by darkglove » Fri Jul 24, 2020 12:19 pm


Post Reply