Code: Select all
while True:
input_state = GPIO.input(GPIO_but)
if (input_state == True):
print('Button Pressed')
if (ways==1):
ways=2
w1.stop()//python hasn't this function
w2.start()
else:
ways=1
w2.stop()//python hasn't this function
w1.start()
time.sleep(1)