diff options
author | siddhu8990 | 2016-10-18 10:31:23 +0530 |
---|---|---|
committer | siddhu8990 | 2016-10-18 10:31:23 +0530 |
commit | 52de97290366abe6cfb0576ca19d9c1732c1f0ea (patch) | |
tree | c2effe8b6e60c112b126f1d39ddb0d82253dc4e9 /src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp | |
parent | 9a30882032e80661fe6c69d7c50da0154e4e431f (diff) | |
download | scilab2c-52de97290366abe6cfb0576ca19d9c1732c1f0ea.tar.gz scilab2c-52de97290366abe6cfb0576ca19d9c1732c1f0ea.tar.bz2 scilab2c-52de97290366abe6cfb0576ca19d9c1732c1f0ea.zip |
Suppressed declaration of not required variables and functions
Diffstat (limited to 'src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp')
-rw-r--r-- | src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp b/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp new file mode 100644 index 00000000..ae2c68c5 --- /dev/null +++ b/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp @@ -0,0 +1,25 @@ +/* + Scilab2C FOSSEE IIT BOMBAY + */ + +#include "cmd_servo_attach.h" +#include "Arduino.h" +#include<Servo.h> +Servo servo1,servo2; +void u8cmd_servo_attach(uint8 h,uint8 servo_no) +{ + // h -> Board no. reserve for future use + // servo_no -> pin no.(9 and 10). + if(servo_no == 1) + { + servo1.attach(9); + servo1.write(0); + } + else + { + servo2.attach(10); + servo2.write(0); + } + +} + |