Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    How to change the Pin Out Voltage?

    Scheduled Pinned Locked Moved LoPy
    pin-outpin.drivelopylopy gpio
    4 Posts 3 Posters 1.2k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jclo13
      last edited by jclo13

      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

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @jclo13
        last edited by

        @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.

        J J 2 Replies Last reply Reply Quote 0
        • J Offline
          jcaron @robert-hh
          last edited by

          @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

          1 Reply Last reply Reply Quote 0
          • J Offline
            jclo13 @robert-hh
            last edited by

            @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.

            1 Reply Last reply Reply Quote 0

            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
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom