Pyboard / Micropython interfaces diagram

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Neil Higgins
Posts: 6
Joined: Sun Apr 27, 2014 10:25 am

Pyboard / Micropython interfaces diagram

Post by Neil Higgins » Mon Dec 29, 2014 3:27 am

The diagram pybv10-pinout.jpg is very handy, but very physical. Can I suggest another version or extension which somehow maps Micropython classes to pins? For example, I understand that there are servo classes that support the direct connection of standard servo devices to groups of three pins (Is it X1, X2, X3 - this was mentioned in a video tutorial). In so far as multiple instances can be configured on different pins, the diagram might need to take a different form, showing what pins can be used, limitations on the number of instances, and clashes that might arise. Easy to say, maybe hard to do, but a quick reference picture like this beats the hell out of trawling documentation.

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

Re: Pyboard / Micropython interfaces diagram

Post by dhylands » Mon Dec 29, 2014 6:11 pm

There is this picture: http://docs.micropython.org/en/latest/quickref.html

which has pins grouped by SPI, I2C, UART, ADC, CAN, DAC, and Timer

For servo, it can use pins X1-X4, and the 3 pin groups are X1, power, ground, etc.

You can also control servos on any pin which has a timer, but not using the Servo API. You'd need to use the Timer PWM code.

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Pyboard / Micropython interfaces diagram

Post by Damien » Tue Dec 30, 2014 12:15 am

The quickref does map most objects to pins: eg SPI(1) on the image corresponds to pyb.SPI(1), and pin X1 corresponds to the object pyb.Pin.board.X1 or pyb.Pin.cpu.A0 equivalently. It's probably a good idea to make this mapping more explicit.

I should also provide a section about the Servo class in the text of the quickref.

Post Reply