Hello. I am trying to make this repeat so that it constantly reads the voltage and updates so that writedigitalpin will start or stop automatically. How can I do this?
if readVoltage(a,'A1') >= 2 writeDigitalPin(a,'D2',1); elseif readVoltage(a,'A1') < 2 writeDigitalPin(a,'D2',0);end
Best Answer