summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/scilab-arduino
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/src/c/scilab-arduino')
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c20
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c21
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c59
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c42
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c20
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c22
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp32
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp32
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_moves.cpp34
-rw-r--r--2.3-1/src/c/scilab-arduino/default_files/Makefile10
-rw-r--r--2.3-1/src/c/scilab-arduino/default_files/sci2c_arduino.ino26
-rw-r--r--2.3-1/src/c/scilab-arduino/default_files/setup_arduino.h65
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h29
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h28
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_run.h31
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_setup.h32
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h29
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_digital_out.h29
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_servo_attach.h31
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_servo_detach.h32
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/cmd_servo_move.h32
-rw-r--r--2.3-1/src/c/scilab-arduino/includes/sleep.h28
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in.h30
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h33
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h39
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_in.h30
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h35
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_cmd_servo.h35
-rw-r--r--2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h29
-rw-r--r--2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c19
30 files changed, 934 insertions, 0 deletions
diff --git a/2.3-1/src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c b/2.3-1/src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c
new file mode 100644
index 00000000..42005d1c
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c
@@ -0,0 +1,20 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "cmd_analog_in.h"
+#include "Arduino.h"
+
+uint16 u8cmd_analog_ins(uint8 board_no, uint8 pin)
+{
+ return((uint16)analogRead(pin));
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c b/2.3-1/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c
new file mode 100644
index 00000000..a5b8513e
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c
@@ -0,0 +1,21 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "cmd_analog_out.h"
+#include "Arduino.h"
+
+void u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value)
+{
+ analogWrite(pin,value);
+
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c b/2.3-1/src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c
new file mode 100644
index 00000000..6e1c2caa
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c
@@ -0,0 +1,59 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "cmd_dcmotor_run.h"
+#include "Arduino.h"
+
+void u8cmd_dcmotor_runs(uint8 board_no, uint8 motor_no, int16 duty)
+{
+ uint8 direction = 1;
+ if(duty >= 0)
+ {
+ direction = 1;
+ }
+ else
+ {
+ direction = 0;
+ duty = -duty;
+ }
+
+ if(duty > 255) duty = 255;
+
+ if (dcm_mode[motor_no] == 3) //L293
+ {
+ if(direction == 1)
+ {
+ analogWrite(dcm_pin_1[motor_no],duty);
+ analogWrite(dcm_pin_2[motor_no],0);
+ }
+ else
+ {
+ analogWrite(dcm_pin_2[motor_no],duty);
+ analogWrite(dcm_pin_1[motor_no],0);
+ }
+ }
+ else
+ {
+ if(direction == 1)
+ {
+ digitalWrite(dcm_pin_1[motor_no],HIGH);
+ digitalWrite(dcm_pin_2[motor_no],LOW);
+ }
+ else
+ {
+ digitalWrite(dcm_pin_2[motor_no],HIGH);
+ digitalWrite(dcm_pin_1[motor_no],LOW);
+ }
+ }
+
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c b/2.3-1/src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c
new file mode 100644
index 00000000..389f9111
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c
@@ -0,0 +1,42 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "cmd_dcmotor_setup.h"
+#include "Arduino.h"
+
+uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4];
+
+void u8cmd_dcmotor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\
+ uint8 pin_1, uint8 pin_2)
+{
+ dcm_pin_1[motor_no] = pin_1;
+ dcm_pin_2[motor_no] = pin_2;
+ dcm_mode[motor_no] = driver_type;
+
+ //Initialise pins
+ pinMode(pin_1,OUTPUT);
+ pinMode(pin_2,OUTPUT);
+
+ //Set output to low.
+ if(driver_type == 3)
+ {
+ analogWrite(pin_1,0);
+ analogWrite(pin_2,0);
+ }
+ else
+ {
+ digitalWrite(pin_1,LOW);
+ digitalWrite(pin_2,LOW);
+ }
+
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c b/2.3-1/src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c
new file mode 100644
index 00000000..da5ca78d
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c
@@ -0,0 +1,20 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "cmd_digital_in.h"
+#include "Arduino.h"
+
+uint8 u8cmd_digital_ins(uint8 board_no, uint8 pin)
+{
+ return((uint8)digitalRead(pin));
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c b/2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c
new file mode 100644
index 00000000..64af7b5c
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c
@@ -0,0 +1,22 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "cmd_digital_out.h"
+#include "Arduino.h"
+
+
+void u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value)
+{
+ digitalWrite(pin,value);
+
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp b/2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp
new file mode 100644
index 00000000..b4322c7f
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp
@@ -0,0 +1,32 @@
+/* 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_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);
+ }
+
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp b/2.3-1/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp
new file mode 100644
index 00000000..08ea03f4
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp
@@ -0,0 +1,32 @@
+/* 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<Servo.h>
+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();
+ }
+
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_moves.cpp b/2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_moves.cpp
new file mode 100644
index 00000000..c7c6fa7d
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_moves.cpp
@@ -0,0 +1,34 @@
+/* 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_move.h"
+#include "Arduino.h"
+#include<Servo.h>
+Servo servo1,servo2;
+void u8cmd_servo_move(uint8 h,uint8 servo_no,uint8 val)
+{
+ // h -> Board no. reserve for future use
+ // servo_no -> pin no.(9 and 10).
+ //val -> 0 to 180 angle of rotation
+ if (val>=0 && val<=180)
+ {
+ if (servo_no==1)
+ {
+ servo1.write(val);
+ }
+ else if (servo_no==2)
+ {
+ servo2.write(val);
+ }
+ }
+}
+
diff --git a/2.3-1/src/c/scilab-arduino/default_files/Makefile b/2.3-1/src/c/scilab-arduino/default_files/Makefile
new file mode 100644
index 00000000..5432fcfd
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/default_files/Makefile
@@ -0,0 +1,10 @@
+# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
+
+ARDUINO_DIR = /usr/share/arduino
+ARDMK_DIR = /usr/share/arduino
+AVR_TOOLS_DIR = /usr
+BOARD_TAG = uno
+USER_LIB_PATH = ../
+ARDUINO_LIBS = ../src/c ../includes ../interfaces ../
+ARDUINO_PORT = /dev/ttyACM0
+include /usr/share/arduino/Arduino.mk
diff --git a/2.3-1/src/c/scilab-arduino/default_files/sci2c_arduino.ino b/2.3-1/src/c/scilab-arduino/default_files/sci2c_arduino.ino
new file mode 100644
index 00000000..df28950c
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/default_files/sci2c_arduino.ino
@@ -0,0 +1,26 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "Arduino.h"
+#include <loop_arduino.h>
+#include <setup_arduino.h>
+
+void setup()
+{
+ //Please write appropriate setup functions here.
+ setup_arduino();
+}
+
+void loop()
+{
+ loop_arduino();
+}
diff --git a/2.3-1/src/c/scilab-arduino/default_files/setup_arduino.h b/2.3-1/src/c/scilab-arduino/default_files/setup_arduino.h
new file mode 100644
index 00000000..acbf8e21
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/default_files/setup_arduino.h
@@ -0,0 +1,65 @@
+/*
+** ************************************************
+** This file has been generated using
+** Scilab2C (Version 2.3)
+**
+** Please visit following links for more informations:
+** Atoms Module: http://atoms.scilab.org/toolboxes/scilab2c
+** Scilab2C Forge: http://forge.scilab.org/index.php/p/scilab2c/
+** Scilab2C ML: http://forge.scilab.org/index.php/p/scilab2c/
+** ************************************************
+*/
+
+
+#ifndef setup_arduino_h
+#define setup_arduino_h
+/*
+** -------------------
+** ----- Target ------
+** -------------------
+*/
+# define Arduino1 1
+/*
+** -----------------------
+** --- SCI2C Includes. ---
+** -----------------------
+*/
+#include "Arduino.h"
+#include "sci2clib.h"
+/*
+** ---------------------------
+** --- End SCI2C Includes. ---
+** ---------------------------
+*/
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+** -------------------
+** --- Prototypes. ---
+** -------------------
+*/
+int setup_arduino();
+/*
+** -----------------------
+** --- End Prototypes. ---
+** -----------------------
+*/
+
+
+/*
+** ------------------------
+** --- USER2C Includes. ---
+** ------------------------
+*/
+/*
+** ----------------------------
+** --- End USER2C Includes. ---
+** ----------------------------
+*/
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+#endif
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h
new file mode 100644
index 00000000..0c186569
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h
@@ -0,0 +1,29 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __CMD_ANALOG_IN_H__
+#define __CMD_ANALOG_IN_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint16 u8cmd_analog_ins(uint8 board_no, uint8 pin);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_ANALOG_IN_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h
new file mode 100644
index 00000000..54e51f59
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h
@@ -0,0 +1,28 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __CMD_ANALOG_OUT_H__
+#define __CMD_ANALOG_OUT_H__
+
+#include "types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_ANALOG_OUT_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_run.h b/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_run.h
new file mode 100644
index 00000000..2b69c99b
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_run.h
@@ -0,0 +1,31 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __CMD_DCMOTOR_RUN_H__
+#define __CMD_DCMOTOR_RUN_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4];
+
+void u8cmd_dc_motor_runs(uint8 board_no, uint8 motor_no, int16 duty);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DCMOTOR_SETUP_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_setup.h b/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_setup.h
new file mode 100644
index 00000000..cecd4659
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_setup.h
@@ -0,0 +1,32 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __CMD_DCMOTOR_SETUP_H__
+#define __CMD_DCMOTOR_SETUP_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4];
+
+void u8cmd_dc_motor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\
+ uint8 pin_1, uint8 pin_2);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DCMOTOR_SETUP_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h b/2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h
new file mode 100644
index 00000000..51226a6f
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h
@@ -0,0 +1,29 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __CMD_DIGITAL_IN_H__
+#define __CMD_DIGITAL_IN_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint8 u8cmd_digital_ins(uint8 board_no, uint8 pin);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DIGITAL_IN_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_digital_out.h b/2.3-1/src/c/scilab-arduino/includes/cmd_digital_out.h
new file mode 100644
index 00000000..1e837e53
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_digital_out.h
@@ -0,0 +1,29 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __CMD_DIGITAL_OUT_H__
+#define __CMD_DIGITAL_OUT_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DIGITAL_OUT_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_servo_attach.h b/2.3-1/src/c/scilab-arduino/includes/cmd_servo_attach.h
new file mode 100644
index 00000000..12c2c013
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_servo_attach.h
@@ -0,0 +1,31 @@
+/* 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
+*/
+
+
+#ifndef __CMD_SERVO_ATTACH_H__
+#define __CMD_SERVO_ATTACH_H__
+
+#include "types.h"
+//#include <Servo.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern Servo servo1,servo2;
+
+void u8cmd_servo_attach(uint8 h, uint8 servo_no );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DCMOTOR_SETUP_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_servo_detach.h b/2.3-1/src/c/scilab-arduino/includes/cmd_servo_detach.h
new file mode 100644
index 00000000..daa5fd2b
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_servo_detach.h
@@ -0,0 +1,32 @@
+/* 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
+*/
+
+
+#ifndef __CMD_SERVO_DETACH_H__
+#define __CMD_SERVO_DETACH_H__
+
+#include "types.h"
+//#include<Servo.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern Servo servo1,servo2;
+
+void u8cmd_servo_detach(uint8 h, uint8 servo_no );
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DCMOTOR_SETUP_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_servo_move.h b/2.3-1/src/c/scilab-arduino/includes/cmd_servo_move.h
new file mode 100644
index 00000000..79c16b46
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/cmd_servo_move.h
@@ -0,0 +1,32 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __CMD_SERVO_MOVE_H__
+#define __CMD_SERVO_MOVE_H__
+
+#include "types.h"
+//#include<Servo.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern Servo servo1,servo2;
+
+void u8cmd_servo_move(uint8 h, uint8 servo_no,uint8 val);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DCMOTOR_SETUP_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/includes/sleep.h b/2.3-1/src/c/scilab-arduino/includes/sleep.h
new file mode 100644
index 00000000..8763f5f4
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/includes/sleep.h
@@ -0,0 +1,28 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __SLEEP_H__
+#define __SLEEP_H__
+
+#include "types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void u16sleeps(uint16 delay_ms);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __CMD_DIGITAL_OUT_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in.h
new file mode 100644
index 00000000..7358509b
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in.h
@@ -0,0 +1,30 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __INT_CMD_ANALOG_IN_H__
+#define __INT_CMD_ANALOG_IN_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0d0cmd_analog_inu160(in1,in2) u8cmd_analog_ins((uint8)in1,\
+ (uint8)in2)
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_CMD_ANALOG_IN_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h
new file mode 100644
index 00000000..80ed7ab9
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h
@@ -0,0 +1,33 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __INT_CMD_ANALOG_OUT_H__
+#define __INT_CMD_ANALOG_OUT_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0d0d0cmd_analog_out(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\
+ (uint8)in2,(uint8)in3)
+
+#define d0d0u80cmd_analog_out(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\
+ (uint8)in2,(uint8)in3)
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_CMD_DIGITAL_OUT_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h
new file mode 100644
index 00000000..61e0d2e3
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h
@@ -0,0 +1,39 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __INT_CMD_DCMOTOR_H__
+#define __INT_CMD_DCMOTOR_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0d0d0d0d0cmd_dcmotor_setup(in1,in2,in3,in4,in5)\
+ u8cmd_dcmotor_setups((uint8)in1,(uint8)in2,(uint8)in3,\
+ (uint8)in4,(uint8)in5)
+
+#define d0d0d0cmd_dcmotor_run(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\
+ (uint8)in2, (int16)in3);
+
+
+#define d0d0u160cmd_dcmotor_run(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\
+ (uint8)in2, (int16)in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_CMD_DCMOTOR_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_in.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_in.h
new file mode 100644
index 00000000..4e5e575d
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_in.h
@@ -0,0 +1,30 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __INT_CMD_DIGITAL_IN_H__
+#define __INT_CMD_DIGITAL_IN_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0d0cmd_digital_inu80(in1,in2) u8cmd_digital_ins((uint8)in1,\
+ (uint8)in2)
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_CMD_DIGITAL_IN_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h
new file mode 100644
index 00000000..92a92c68
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h
@@ -0,0 +1,35 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __INT_CMD_DIGITAL_OUT_H__
+#define __INT_CMD_DIGITAL_OUT_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0d0d0cmd_digital_out(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\
+ (uint8)in2,(uint8)in3)
+
+//Required when input from one pin is directed to other output pin.
+#define d0d0u80cmd_digital_out(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\
+ (uint8)in2, (uint8)in3)
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_CMD_DIGITAL_OUT_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_servo.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_servo.h
new file mode 100644
index 00000000..a431fe14
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_servo.h
@@ -0,0 +1,35 @@
+/* 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
+*/
+
+
+#ifndef __INT_CMD_SERVO_H__
+#define __INT_CMD_SERVO_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define d0d0cmd_servo_attach(in1,in2) u8cmd_servo_attach((uint8)in1,(uint8)in2);
+
+#define d0d0cmd_servo_detach(in1,in2) u8cmd_servo_detach((uint8)in1,(uint8)in2);
+
+#define d0d0d0cmd_servo_move(in1,in2,in3) u8cmd_servo_move((uint8)in1,(uint8)in2,(uint8)in3);
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_CMD_DCMOTOR_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h b/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h
new file mode 100644
index 00000000..f3a697f4
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h
@@ -0,0 +1,29 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+
+#ifndef __INT_SLEEP_H__
+#define __INT_sLEEP_H__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define d0sleep(in1) u16sleeps((uint16)in1)
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __INT_SLEEP_H__ */
diff --git a/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c b/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c
new file mode 100644
index 00000000..88f8a66d
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c
@@ -0,0 +1,19 @@
+/* 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: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
+#include "sleep.h"
+
+void u16sleeps(uint16 delay_ms)
+{
+ delay(delay_ms);
+}
+