As a beginner I'm finding the documentation a bit overwhelming. I've never worked with digital chips before.
Where do I find (how do I determine) which pins can be used for GPIO? .... any of the X or Y pins without exception?
Where do I look to identify which pins can be configured to use an internal pull_up resistor? Will micropython give me an immediate error if I try to configure them wrong? I worry that I might burn out something by wiring it wrong.
My boards micro-USB connector seems intermittent/marginal. Is there a way to bypass it... for instance, are there pins that I could use to hardware a different connector?
Please let me know if there is a more appropriate forum for such beginner questions. I am looking at the Quick Reference/pinout jpg and the schematic. I am connecting to my board using Linux(Debian) via the Screen program with MicroPython v1.9.2-87-gda8c4c26 on 2017-09-13; PYBv1.1 with STM32F405RG.
Thanks,
Keith
A few beginner questions- pin id, pull_ups, USB connector
-
- Posts: 16
- Joined: Sun Dec 17, 2017 3:46 pm
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: A few beginner questions- pin id, pull_ups, USB connector
I use this page as a constant reference. All the GPIO pins on the long sides of the board are entirely free for use. The notes at the bottom right detail some restrictions on the pins on the short edge of the board. All GPIO lines can be specified with pullups or pull-downs, but these are fairly high value resistors - about 50KΩ if I remember correctly.
You won't zap anything merely by a failed attempt to configure a pin, but it's a bad idea to apply a low impedance voltage source to a pin configured as an output. That said, Pyboards are pretty robust.
As for the USB connector I don't recall anyone else reporting problems. Clearly some care is required using a PCB mounted connector - an option would be to leave a short USB extension cable permanently connected. But if it's genuinely intermittent you might have a rare instance of a defective unit.
You won't zap anything merely by a failed attempt to configure a pin, but it's a bad idea to apply a low impedance voltage source to a pin configured as an output. That said, Pyboards are pretty robust.
As for the USB connector I don't recall anyone else reporting problems. Clearly some care is required using a PCB mounted connector - an option would be to leave a short USB extension cable permanently connected. But if it's genuinely intermittent you might have a rare instance of a defective unit.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 16
- Joined: Sun Dec 17, 2017 3:46 pm
Re: A few beginner questions- pin id, pull_ups, USB connector
Thank you Peter, that's very helpful.
I also going to be studying the REAME.md file on your Micropython-scheduler github page - very instructive!
I also going to be studying the REAME.md file on your Micropython-scheduler github page - very instructive!
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: A few beginner questions- pin id, pull_ups, USB connector
The scheduler I wrote is now effectively obsolete, superseded by the official uasyncio module which is faster and more RAM-efficient. An unofficial tutorial may be found here.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.