OnionIoT / Onion-Docs

Documentation for all things Onion
https://docs.onion.io
GNU General Public License v3.0
112 stars 65 forks source link

Using-GPIOs.md Inaccurate #25

Closed pjobson closed 7 years ago

pjobson commented 7 years ago

Using-GPIOs.md shows that you can use gpioctl to control say a LED.

"You can configure your GPIO pin to supply power to a load with your Omega, for example, if you were powering an LED."

root@Omega-ADBD:~# gpioctl dirout 6
Using gpio pin 6.
root@Omega-ADBD:~# gpioctl dirout-high 6
Using gpio pin 6.
root@Omega-ADBD:~# gpioctl get 6
Using gpio pin 6.
Pin 6 is HIGH
root@Omega-ADBD:~# gpioctl dirout-low 6
Using gpio pin 6.
root@Omega-ADBD:~# gpioctl get 6
Using gpio pin 6.
Pin 6 is LOW

Nothing happens, I was expecting the LED to do something... though the documentation isn't clear as to what it is supposed to do. I'm guessing turn on and off.

greenbreakfast commented 7 years ago

As mentioned in the section on Multiplexed GPIOs, GPIO6 is set to SPI_CS1 by default. Try using GPIO0 or GPIO1

I'll make a note to update the article to make that more clear

pjobson commented 7 years ago

gpio pin 1 works.