Counting mode of pyb1.1 Timer

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
jk007
Posts: 9
Joined: Tue Nov 12, 2019 1:34 am

Counting mode of pyb1.1 Timer

Post by jk007 » Fri Mar 27, 2020 2:06 am

I want to use the counting function of pyb1.1 timer. Unfortunately, I didn't use it in the experiment. I browsed the chapter about timer on the official website, but I didn't understand how to use timer.IC, timer.enc_A, timer.enc_B. who has used or can provide an example? Where can I read the value of the counter? :?:

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Counting mode of pyb1.1 Timer

Post by dhylands » Fri Mar 27, 2020 4:36 am

Are you looking to do quadrature decoding?
If so you can find an example here:

https://github.com/dhylands/upy-example ... ncoder3.py

jk007
Posts: 9
Joined: Tue Nov 12, 2019 1:34 am

Re: Counting mode of pyb1.1 Timer

Post by jk007 » Sat Mar 28, 2020 1:08 am

That's what I need.
thank you!

Post Reply