# Turning a solenoid on and off from machine import Pin from time import sleep GP19 = Pin(19,Pin.OUT) while(1): print('Solenoid On') GP19.value(1) sleep(1) print('Solenoid Off') GP19.value(0) sleep(1)