machine.Pin methods?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
torwag
Posts: 220
Joined: Fri Dec 13, 2013 9:25 am

Re: machine.Pin methods?

Post by torwag » Mon May 29, 2017 10:42 pm

Hi,
for the on off vs high low I would need to check in detail.
However for the inverted function, that is pretty much normal and depends how the LED is connected to the ESP. The ESP could basically apply 3.3V to the LED circuit via its GPIO pin. Then on really means on. However often, 3.3 V are applied externally to the LED circuit and the GPIO is used to define Ground. In this case the LED is on if the GPIO is set to low resp. off.

The ESP is still a port with work in progress, but many use it since it comes so dirt cheap.
Don't be afraid... the forum is helpfull ;)

SpotlightKid
Posts: 463
Joined: Wed Apr 08, 2015 5:19 am

Re: machine.Pin methods?

Post by SpotlightKid » Mon May 29, 2017 10:46 pm

The Pin methods have been renamed in the latest release. Read the changelog here:

https://github.com/micropython/micropyt ... s/tag/v1.9

User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

Re: machine.Pin methods?

Post by mcauser » Tue May 30, 2017 2:12 am

More info about v1.9s Machine.Pin high, low, on, off in PR 3025: https://github.com/micropython/micropython/pull/3025

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: machine.Pin methods?

Post by pfalcon » Tue May 30, 2017 7:47 pm

All documentation at http://docs.micropython.org/en/latest/esp8266/ was updated to contain actual 1.9 information. Sorry for the usual docs-lags-behind-release delay.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

Post Reply