mirror of
https://github.com/stianeikeland/go-rpio.git
synced 2025-01-23 10:41:03 +01:00
fix
This commit is contained in:
parent
205ee01d13
commit
10fedd2289
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user