I monitor the change of GPIO1. If it from low level to high level, I will set GPIO0 high I do it
for ; ; { if gpio.Watch(0) { gpio.High(1) } }
But build error.Could you provide sample code? thanks
https://documentation.vincross.com/mindkit/APIReference/drivers/gpio.html
func Watch(pin int) (high bool, err error)
Watch returns whether output voltage is high(true) or low(false) on pin within range 0-3, it’ll be blocked until the voltage of specified pin changed after being called.
You can’t use if gpio.Watch(0) because Watch returns two values.
if gpio.Watch(0)
Watch