summaryrefslogtreecommitdiff
path: root/user-code/led/scilab/led-green-blink.sce
blob: 0e905ee765a06504832f994ba05b85fd9ea36e8e (plain)
1
2
3
4
5
6
7
8
9
ok = open_serial(1, 2, 115200); // At port 2 with baudrate of 115200
if ok ~= 0 error('Check the serial port and try again'); end
for i = 1:5                    // Running for loop, 5 times
   cmd_digital_out(1, 10, 1);  // This turns on the green Led
   sleep(1000);              // Delay for 1 second
   cmd_digital_out(1, 10, 0);  // This turns off the green Led
   sleep(1000);              // Delay for 1 second
end
close_serial(1);             // To close the connection safely