From ee5bf4d90f78673d1e4d5a9dd304ee53c503c085 Mon Sep 17 00:00:00 2001 From: imushir Date: Tue, 9 Feb 2016 16:38:27 +0530 Subject: Support for Servo motor for Arduino. Support for'diag' in c --- .../cmd_servo_detach/u8cmd_servo_detach.cpp | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp (limited to 'src/c/scilab-arduino/cmd_servo_detach') diff --git a/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp b/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp new file mode 100644 index 00000000..95faf4cd --- /dev/null +++ b/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp @@ -0,0 +1,24 @@ +/* + Scilab2C FOSSEE IIT BOMBAY + */ +#include "cmd_servo_detach.h" +#include "Arduino.h" +#include +Servo servo1,servo2; +uint8 u8cmd_servo_detach(uint8 h,uint8 servo_no) +{ + // h -> Board no. reserve for future use + // servo_no -> pin no.(9 and 10). + if(servo_no == 1) + { + servo1.detach(); + } + + else + { + servo2.detach(); + } + + return 0; +} + -- cgit From 52de97290366abe6cfb0576ca19d9c1732c1f0ea Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Tue, 18 Oct 2016 10:31:23 +0530 Subject: Suppressed declaration of not required variables and functions --- .../cmd_servo_detach/u8cmd_servo_detach.cpp | 24 ---------------------- .../cmd_servo_detach/u8cmd_servo_detachs.cpp | 23 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 24 deletions(-) delete mode 100644 src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp create mode 100644 src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp (limited to 'src/c/scilab-arduino/cmd_servo_detach') diff --git a/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp b/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp deleted file mode 100644 index 95faf4cd..00000000 --- a/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - Scilab2C FOSSEE IIT BOMBAY - */ -#include "cmd_servo_detach.h" -#include "Arduino.h" -#include -Servo servo1,servo2; -uint8 u8cmd_servo_detach(uint8 h,uint8 servo_no) -{ - // h -> Board no. reserve for future use - // servo_no -> pin no.(9 and 10). - if(servo_no == 1) - { - servo1.detach(); - } - - else - { - servo2.detach(); - } - - return 0; -} - diff --git a/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp b/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp new file mode 100644 index 00000000..c8c5bebb --- /dev/null +++ b/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp @@ -0,0 +1,23 @@ +/* + Scilab2C FOSSEE IIT BOMBAY + */ +#include "cmd_servo_detach.h" +#include "Arduino.h" +#include +Servo servo1,servo2; +void u8cmd_servo_detach(uint8 h,uint8 servo_no) +{ + // h -> Board no. reserve for future use + // servo_no -> pin no.(9 and 10). + if(servo_no == 1) + { + servo1.detach(); + } + + else + { + servo2.detach(); + } + +} + -- cgit From 453598b49cb3d4a62b1797dbc90f0e3dd4521329 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Wed, 19 Apr 2017 11:56:09 +0530 Subject: Copyright message updated in added files and libraries separated in 'thirdparty' folder --- .../cmd_servo_detach/u8cmd_servo_detachs.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/c/scilab-arduino/cmd_servo_detach') diff --git a/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp b/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp index c8c5bebb..08ea03f4 100644 --- a/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp +++ b/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp @@ -1,6 +1,15 @@ -/* - Scilab2C FOSSEE IIT BOMBAY - */ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + #include "cmd_servo_detach.h" #include "Arduino.h" #include -- cgit