How to run continuously
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Image display and manipulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!