Timer now supports PWM, OC, and IC

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Timer now supports PWM, OC, and IC

Post by dhylands » Thu Sep 25, 2014 3:29 pm

I've mentioned this in a couple other threads, but I thought I would make a more general announcement.

The Timer class can now be used for PWM, Output Compare (OC) and Input Capture (IC).

The docs on micropython.org are mostly up-to-date now (look at Timer and TimerChannel)

I also put together a few examples, and posted them on the wiki.

If you have any questions feel free to ask.

The pulse_width_ratio function has been replaced by a pulse_width_percent function, but the docs haven't caught up yet (I expect they'll probably be correct tomorrow).

Post Reply