How to change the Pin Out Voltage?
-
Hello, I am learning about lopy and I need help, how can I change the output power of a GPIO pin?, I am a little confused about the command pin.drive(), is it possible to use it in Lopy?, I need to change the output power from de maximum to 0 and vice-versa in cycles.
thank you in advance.
Jose
-
@jclo13 To change the output level of a digital pin, use pin.value(x) or simply pin(x). See the documentation https://docs.pycom.io/chapter/firmwareapi/pycom/machine/Pin.html
You cannot change the current an output pin can drive. But that might not have been your question. -
@robert-hh I think the OP probably meant to change the voltage, which would imply using the DAC: https://docs.pycom.io/chapter/firmwareapi/pycom/machine/DAC.html
-
@robert-hh thank you, I used pin.value(x) and it worked, I want to simulate an oscillation using to pins, first I will put the first pin to 1 and the second pin to 0, after a time I will interchange the values, I don´t know if this is the right way, and I don´t know which lopy pins can be better for this purpose.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login