Hello all!
try this code on clean esp8266 with 1.8.7
from machine import Pin
Pin(2, Pin.OUT).high() - led off
Pin(2, Pin.OUT).low() - led on
i guess isn`t right behavior.
or i do smt wrong?
thanx!
pin.out inverted?
Re: pin.out inverted?
The LED that is often there on GPIO2 is wired between the pin and the power -- so it's active low, when the pin is connected to the ground and the electricity can flow from the power to the ground.
Re: pin.out inverted?
This is exactly the problem solved by machine.Signal class: https://github.com/micropython/micropyt ... 6_esp12.py
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/
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/
Re: pin.out inverted?
this problem not only with LED pin(gpio2), but with other gpio(12,14) to.
will try inverted=True for all others pins
will try inverted=True for all others pins
Re: pin.out inverted?
It's not a problem, it's a natural situation, and machine.Signal is being introduced to deal with it in a natural way.
It's WIP though, so be ready for changes. For example, it's now invert=True in the latest master.
It's WIP though, so be ready for changes. For example, it's now invert=True in the latest master.
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/
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/