No its all there, everything is a file. Have a look at http://elinux.org/Rpi_Low-level_periphe ... _system.29 while that is a bash command file, you can just type it in (but you knew that....), you do have to sudo though since that part of the file system is admin.timmoore46 wrote:Well the wealth of info I've read has just confused me ! Now duly terrified, Could any one point me in the right direction.
I've got a RPi with Raspbian, fully updated, and a simple IO card hung on the GPIO.
For various reasons I want to use Bash.
So do I need to install anything before I start to turn a pin on or read the voltage on an input ?
You can use the file method from the command line, but also WiringPi is set for command line control a well.
I'm very 'literal' so
Do I need to type
sudo wiringinfo bla bla
or what ?
+3V3! ! because 5V0 anywhere near a GPIO will frazzle your Pi.
To set a pin high (+5V) or it it (+3.3V), what do I type next ?
Once I've got my multimeter displaying by Bash control, I can pop it all in a script and I'll be very very happy !
Any thoughts will be very very welcome !
Google.timmoore46 wrote: Also what is the syntax of getting 'WiringPi' downloaded /installed ?
Total sense. what you type refers to the pin numbering on the Broadcom Soc chip. The GPIO header plug is not wired pin for pin, so it has different numbering. See http://elinux.org/Rpi_Low-level_peripherals for the pin numbers on the GPIO header. NOTE read the table carefully noting which board version you have, the signals moved pins with V2.timmoore46 wrote:Not entirely sure if I've got the mapping right.
GPIO 4 emereges as gpio7
GPIO 17 emerges as gpio0
As I've got marked gpio0 to 7
what starts for gpio1 to 6 ?
hope that makes sense ?
Code: Select all
cat /sys/class/gpio/gpio7/value > y cat y
Code: Select all
z=1 cat z
For future reference, you cannot do a sudo command > file because what's happening is command is elevated then that shell ends and the output is redirected as the standard user.timmoore46 wrote:wiringPi installed fine following the instructions,
I'm in the pi directory
and at the bash prompt I type
sudo echo "4" > /sys/class/gpio/export
and I get rewarded as a bash prompt with
no such file or directory
guess I'm missing something obvious ?
An thoughts ?
Users browsing this forum: Bing [Bot], Google [Bot] and 27 guests