This commit is contained in:
Ostroumov Anatolij 2015-04-06 02:00:34 +03:00
parent 205ee01d13
commit 10fedd2289

View File

@ -48,7 +48,7 @@ func main() {
pin := rpio.Pin(*pinNumber) pin := rpio.Pin(*pinNumber)
pin.Input() // Input mode pin.Input() // Input mode
res := pin.Read() res := pin.Read()
fmt.Printf("Raspberry PI GPIO status for pin #%d - %d\n", *pinNumber, pin.Read())
if *high { if *high {
if res == rpio.High { if res == rpio.High {
os.Exit(0) os.Exit(0)
@ -62,7 +62,6 @@ func main() {
os.Exit(1) os.Exit(1)
} }
} }
fmt.Printf("Raspberry PI GPIO status for pin #%d - %d\n", *pinNumber, pin.Read())
} else { } else {
switch *set { switch *set {
case 1: case 1: