summaryrefslogtreecommitdiff
path: root/user-code/dcmotor/scilab/dcmotor-clock.sce
blob: d50bbee393a6a74b650448a349d02f8fa1bb36ea (plain)
1
2
3
4
5
6
ok = open_serial(1, 2, 115200)   //COM port is 2 and baud rate is 115200
cmd_dcmotor_setup(1, 3, 1, 9, 10)  // Setup DC motor of type 3 (L293D), motor 1, pin 9 and 10
cmd_dcmotor_run(1, 1, 100) // Motor 1 runs at PWM 100
sleep(3000)              // This is allowed to continue for 3 seconds
cmd_dcmotor_release(1, 1) // Motor 1 is released
close_serial(1);