Author Topic: GPIO Inputs  (Read 628 times)

Offline sorieus

  • Newbie
  • *
  • Join Date: Dec 2017
  • Location:
  • Posts: 20
  • Kudos: 0
GPIO Inputs
« on: March 15, 2018, 06:29:21 AM »
Was looking to set GPIO as inputs can I just define them in a python script or are they defined somewhere else that would cause a conflict?


I'm afraid to test because I remember reading that all the pins are set to output.

Offline dkulp

  • Moderator
  • *****
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 1,500
  • Kudos: 87
    • KulpLights.com
Re: GPIO Inputs
« Reply #1 on: March 15, 2018, 08:16:38 AM »



At boot up, we call "config-pin" on every available pin and set it to gpio out.  However, certain outputs will reset certain pins to a different state (usually pru_out).   Thus, you can reset any of them as needed.  Just make sure they don't conflict with any cape you may be using.  That said, the capes generally only use the gpio outputs that you actually data configured to output on.  Thus, you can sometime use pins that would normally be used by a cape.   


My "todo" list is to get the "Input/Ouput" -> GPIO Inputs ports from the Pi to the BBB.   It should be relatively easy, just need some time to do it and some way to test it.   

Offline dkulp

  • Moderator
  • *****
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 1,500
  • Kudos: 87
    • KulpLights.com
Re: GPIO Inputs
« Reply #2 on: April 03, 2018, 10:52:33 AM »
At boot up, we call "config-pin" on every available pin and set it to gpio out.  However, certain outputs will reset certain pins to a different state (usually pru_out).   Thus, you can reset any of them as needed.  Just make sure they don't conflict with any cape you may be using.  That said, the capes generally only use the gpio outputs that you actually data configured to output on.  Thus, you can sometime use pins that would normally be used by a cape.   


My "todo" list is to get the "Input/Ouput" -> GPIO Inputs ports from the Pi to the BBB.   It should be relatively easy, just need some time to do it and some way to test it.


FYI: the latest code has this implemented.   The raw GPIO input and outputs are enabled on the various BBB's.    For the pins that support PWM, there is also hardware PWM available for those pins.

Offline sorieus

  • Newbie
  • *
  • Join Date: Dec 2017
  • Location:
  • Posts: 20
  • Kudos: 0
Re: GPIO Inputs
« Reply #3 on: April 16, 2018, 04:58:25 AM »
At boot up, we call "config-pin" on every available pin and set it to gpio out.  However, certain outputs will reset certain pins to a different state (usually pru_out).   Thus, you can reset any of them as needed.  Just make sure they don't conflict with any cape you may be using.  That said, the capes generally only use the gpio outputs that you actually data configured to output on.  Thus, you can sometime use pins that would normally be used by a cape.   


My "todo" list is to get the "Input/Ouput" -> GPIO Inputs ports from the Pi to the BBB.   It should be relatively easy, just need some time to do it and some way to test it.
Thanks for the information I've just been using python with BBIO library and it's been working.

FYI: the latest code has this implemented.   The raw GPIO input and outputs are enabled on the various BBB's.    For the pins that support PWM, there is also hardware PWM available for those pins.

 

Back to top