From 4aabac04457969b9288f1d49292ab758ece2448f Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Mon, 7 Sep 2015 21:27:00 +0530 Subject: Changes made for arduino support --- .../cmd_analog_in/u8cmd_analog_ins.c | 19 ++++++++++++++ .../cmd_analog_out/u8cmd_analog_outs.c | 20 +++++++++++++++ .../cmd_digital_in/u8cmd_digital_ins.c | 19 ++++++++++++++ .../cmd_digital_out/u8cmd_digital_outs.c | 20 +++++++++++++++ .../src/c/scilab-arduino/includes/cmd_analog_in.h | 29 +++++++++++++++++++++ .../src/c/scilab-arduino/includes/cmd_analog_out.h | 29 +++++++++++++++++++++ .../src/c/scilab-arduino/includes/cmd_digital_in.h | 29 +++++++++++++++++++++ .../c/scilab-arduino/includes/cmd_digital_out.h | 29 +++++++++++++++++++++ 2.3-1/src/c/scilab-arduino/includes/sleep.h | 29 +++++++++++++++++++++ .../scilab-arduino/interfaces/int_cmd_analog_in.h | 30 ++++++++++++++++++++++ .../scilab-arduino/interfaces/int_cmd_analog_out.h | 30 ++++++++++++++++++++++ .../scilab-arduino/interfaces/int_cmd_digital_in.h | 30 ++++++++++++++++++++++ .../interfaces/int_cmd_digital_out.h | 30 ++++++++++++++++++++++ 2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h | 29 +++++++++++++++++++++ 2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c | 20 +++++++++++++++ 15 files changed, 392 insertions(+) create mode 100644 2.3-1/src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c create mode 100644 2.3-1/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c create mode 100644 2.3-1/src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c create mode 100644 2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_digital_out.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/sleep.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_in.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h create mode 100644 2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c (limited to '2.3-1/src/c/scilab-arduino') 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..ebfad618 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + +#include "cmd_analog_in.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..94d51f6f --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + +#include "cmd_analog_out.h" + +uint8 u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value) +{ + analogWrite(pin,value); + return 0; +} + 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..1d0036a4 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_digital_in/u8cmd_digital_ins.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + +#include "cmd_digital_in.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..09dffd62 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + +#include "cmd_digital_out.h" + +uint8 u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value) +{ + digitalWrite(pin,value); + return 0; +} + 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..5361fe80 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h @@ -0,0 +1,29 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#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_DIGITAL_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..d7fca535 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h @@ -0,0 +1,29 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#ifndef __CMD_ANALOG_OUT_H__ +#define __CMD_ANALOG_OUT_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint8 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_digital_in.h b/2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h new file mode 100644 index 00000000..96fd24bb --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h @@ -0,0 +1,29 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#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..ee459d18 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_digital_out.h @@ -0,0 +1,29 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#ifndef __CMD_DIGITAL_OUT_H__ +#define __CMD_DIGITAL_OUT_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint8 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/sleep.h b/2.3-1/src/c/scilab-arduino/includes/sleep.h new file mode 100644 index 00000000..2e2940a3 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/sleep.h @@ -0,0 +1,29 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#ifndef __SLEEP_H__ +#define __SLEEP_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint8 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..0df8fcbf --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in.h @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#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..d6b16f81 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#ifndef __INT_CMD_ANALOG_OUT_H__ +#define __INT_CMD_ANALOG_OUT_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0d0d0cmd_digital_outu80(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_digital_in.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_in.h new file mode 100644 index 00000000..04b773c6 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_in.h @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#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..a3d1eabd --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#ifndef __INT_CMD_DIGITAL_OUT_H__ +#define __INT_CMD_DIGITAL_OUT_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0d0d0cmd_digital_outu80(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_sleep.h b/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h new file mode 100644 index 00000000..8e2d0824 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h @@ -0,0 +1,29 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#ifndef __INT_SLEEP_H__ +#define __INT_sLEEP_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0sleepu80(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..14da0ba9 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + +#include "sleep.h" + +uint8 u16sleeps(uint16 delay_ms) +{ + delay(delay_ms); + return 0; +} + -- cgit From 48097fd488521bbb915c301a313ca0a7f0b6eb17 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Thu, 10 Sep 2015 22:51:03 +0530 Subject: Arduino digital and analog out working --- 2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h | 1 + 2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h | 1 + 2.3-1/src/c/scilab-arduino/includes/cmd_digital_in.h | 1 + 2.3-1/src/c/scilab-arduino/includes/cmd_digital_out.h | 1 + 2.3-1/src/c/scilab-arduino/includes/sleep.h | 1 + 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h | 2 +- 6 files changed, 6 insertions(+), 1 deletion(-) (limited to '2.3-1/src/c/scilab-arduino') 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 index 5361fe80..4478fb09 100644 --- 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 @@ -15,6 +15,7 @@ #define __CMD_ANALOG_IN_H__ #include "types.h" +#include "Arduino.h" #ifdef __cplusplus extern "C" { 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 index d7fca535..e75c5a66 100644 --- 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 @@ -15,6 +15,7 @@ #define __CMD_ANALOG_OUT_H__ #include "types.h" +#include "Arduino.h" #ifdef __cplusplus extern "C" { 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 index 96fd24bb..9e809aa4 100644 --- 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 @@ -15,6 +15,7 @@ #define __CMD_DIGITAL_IN_H__ #include "types.h" +#include "Arduino.h" #ifdef __cplusplus extern "C" { 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 index ee459d18..49739b0c 100644 --- 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 @@ -15,6 +15,7 @@ #define __CMD_DIGITAL_OUT_H__ #include "types.h" +#include "Arduino.h" #ifdef __cplusplus extern "C" { diff --git a/2.3-1/src/c/scilab-arduino/includes/sleep.h b/2.3-1/src/c/scilab-arduino/includes/sleep.h index 2e2940a3..cde27164 100644 --- a/2.3-1/src/c/scilab-arduino/includes/sleep.h +++ b/2.3-1/src/c/scilab-arduino/includes/sleep.h @@ -15,6 +15,7 @@ #define __SLEEP_H__ #include "types.h" +#include "Arduino.h" #ifdef __cplusplus extern "C" { 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 index d6b16f81..09f5c6ea 100644 --- 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 @@ -20,7 +20,7 @@ extern "C" { #endif -#define d0d0d0cmd_digital_outu80(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ +#define d0d0d0cmd_analog_outu80(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ (uint8)in2,(uint8)in3) #ifdef __cplusplus -- cgit From ed0947602f9b92489be97219e36eb284804dab0a Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Fri, 11 Sep 2015 02:28:56 +0530 Subject: Changes made for making directory 'arduino' in output folder' --- 2.3-1/src/c/scilab-arduino/default_files/Makefile | 10 ++++++++++ 2.3-1/src/c/scilab-arduino/default_files/sci2c_arduino.ino | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 2.3-1/src/c/scilab-arduino/default_files/Makefile create mode 100644 2.3-1/src/c/scilab-arduino/default_files/sci2c_arduino.ino (limited to '2.3-1/src/c/scilab-arduino') 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..7d74195e --- /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 = atmega328 +USER_LIB_PATH = ../../ +ARDUINO_LIBS = src/c includes interfaces ../Temp +ARDUINO_PORT = /dev/ttyUSB0 +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..9e9d9b6e --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/default_files/sci2c_arduino.ino @@ -0,0 +1,12 @@ +#include "Arduino.h" +#include + +void setup() +{ + //Please write appropriate setup functions here. +} +int i = 0; +void loop() +{ + loop_arduino(); +} -- cgit From 02d130cbece220ee2dafeb8d2236a51806e5fac8 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Tue, 15 Sep 2015 14:47:02 +0530 Subject: Working arduino digital input and output --- 2.3-1/src/c/scilab-arduino/default_files/Makefile | 4 ++-- 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to '2.3-1/src/c/scilab-arduino') diff --git a/2.3-1/src/c/scilab-arduino/default_files/Makefile b/2.3-1/src/c/scilab-arduino/default_files/Makefile index 7d74195e..2b888f05 100644 --- a/2.3-1/src/c/scilab-arduino/default_files/Makefile +++ b/2.3-1/src/c/scilab-arduino/default_files/Makefile @@ -3,8 +3,8 @@ ARDUINO_DIR = /usr/share/arduino ARDMK_DIR = /usr/share/arduino AVR_TOOLS_DIR = /usr -BOARD_TAG = atmega328 +BOARD_TAG = uno USER_LIB_PATH = ../../ ARDUINO_LIBS = src/c includes interfaces ../Temp -ARDUINO_PORT = /dev/ttyUSB0 +ARDUINO_PORT = /dev/ttyACM0 include /usr/share/arduino/Arduino.mk 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 index a3d1eabd..fdc1728d 100644 --- 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 @@ -23,6 +23,11 @@ extern "C" { #define d0d0d0cmd_digital_outu80(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_outu80(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\ + (uint8)in2, in3) + + #ifdef __cplusplus } /* extern "C" */ #endif -- cgit From 128638e88ce6d8414c9e1061faa96008be9bcda5 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Sat, 28 Nov 2015 11:01:40 +0530 Subject: Intermediate commit aith support added for AVR (GPIO,ADC). Does not support other targets. --- 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '2.3-1/src/c/scilab-arduino') 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 index fdc1728d..4585f12a 100644 --- 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 @@ -25,7 +25,7 @@ extern "C" { //Required when input from one pin is directed to other output pin. #define d0d0u80cmd_digital_outu80(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\ - (uint8)in2, in3) + (uint8)in2, (uint8)in3) #ifdef __cplusplus -- cgit From eac39cdc77ad5fdaf7b245cbce5c92f105ac75bf Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Fri, 11 Dec 2015 18:28:43 +0530 Subject: AVR ADC checked after some modifications --- 2.3-1/src/c/scilab-arduino/default_files/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '2.3-1/src/c/scilab-arduino') diff --git a/2.3-1/src/c/scilab-arduino/default_files/Makefile b/2.3-1/src/c/scilab-arduino/default_files/Makefile index 2b888f05..5432fcfd 100644 --- a/2.3-1/src/c/scilab-arduino/default_files/Makefile +++ b/2.3-1/src/c/scilab-arduino/default_files/Makefile @@ -4,7 +4,7 @@ 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 ../Temp +USER_LIB_PATH = ../ +ARDUINO_LIBS = ../src/c ../includes ../interfaces ../ ARDUINO_PORT = /dev/ttyACM0 include /usr/share/arduino/Arduino.mk -- cgit From 66ae4f251032aca6b7063353beee6c387a58418e Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Thu, 17 Dec 2015 14:48:36 +0530 Subject: Code generation for Arduino changed. DC motor added to Arduino. --- .../cmd_dcmotor_run/u8cmd_dcmotor_runs.c | 59 ++++++++++++++++++++ .../cmd_dcmotor_setup/u8cmd_dcmotor_setups.c | 42 ++++++++++++++ .../scilab-arduino/default_files/sci2c_arduino.ino | 4 +- .../c/scilab-arduino/default_files/setup_arduino.h | 64 ++++++++++++++++++++++ .../c/scilab-arduino/includes/cmd_dcmotor_run.h | 32 +++++++++++ .../c/scilab-arduino/includes/cmd_dcmotor_setup.h | 33 +++++++++++ .../c/scilab-arduino/interfaces/int_cmd_dcmotor.h | 39 +++++++++++++ 7 files changed, 272 insertions(+), 1 deletion(-) create mode 100644 2.3-1/src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c create mode 100644 2.3-1/src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c create mode 100644 2.3-1/src/c/scilab-arduino/default_files/setup_arduino.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_run.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_setup.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h (limited to '2.3-1/src/c/scilab-arduino') 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..93905c94 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c @@ -0,0 +1,59 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + +#include "cmd_dcmotor_run.h" + +uint8 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); + } + } + + return 0; +} + 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..30b4b9b3 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c @@ -0,0 +1,42 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + +#include "cmd_dcmotor_setup.h" + +uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4]; + +uint8 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); + } + + return 0; +} + 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 index 9e9d9b6e..2b30456c 100644 --- 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 @@ -1,11 +1,13 @@ #include "Arduino.h" #include +#include void setup() { //Please write appropriate setup functions here. + setup_arduino(); } -int i = 0; + 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..9eb0ed4a --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/default_files/setup_arduino.h @@ -0,0 +1,64 @@ +/* +** ************************************************ +** 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 "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_dcmotor_run.h b/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_run.h new file mode 100644 index 00000000..7631761b --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_run.h @@ -0,0 +1,32 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#ifndef __CMD_DCMOTOR_RUN_H__ +#define __CMD_DCMOTOR_RUN_H__ + +#include "types.h" +#include "Arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4]; + +uint8 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..94f5a161 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_setup.h @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#ifndef __CMD_DCMOTOR_SETUP_H__ +#define __CMD_DCMOTOR_SETUP_H__ + +#include "types.h" +#include "Arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4]; + +uint8 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/interfaces/int_cmd_dcmotor.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h new file mode 100644 index 00000000..b35583d7 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#ifndef __INT_CMD_DCMOTOR_H__ +#define __INT_CMD_DCMOTOR_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0d0d0d0d0cmd_dcmotor_setupu80(in1,in2,in3,in4,in5)\ + u8cmd_dcmotor_setups((uint8)in1,(uint8)in2,(uint8)in3,\ + (uint8)in4,(uint8)in5) + +#define d0d0d0cmd_dcmotor_runu80(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\ + (uint8)in2, (int16)in3); + + +#define d0d0u160cmd_dcmotor_runu80(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\ + (uint8)in2, (int16)in3); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __INT_CMD_DCMOTOR_H__ */ -- cgit From 6294db4b43ec07171c2c3a868069b5023d8835a0 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Wed, 13 Jan 2016 11:15:17 +0530 Subject: Test commit --- 2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c | 1 + 1 file changed, 1 insertion(+) (limited to '2.3-1/src/c/scilab-arduino') 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 index 09dffd62..621afc80 100644 --- 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 @@ -12,6 +12,7 @@ #include "cmd_digital_out.h" + uint8 u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value) { digitalWrite(pin,value); -- cgit From bcb2bf1c014a1078f4306cd0111f4e596fe934ce Mon Sep 17 00:00:00 2001 From: imushir Date: Mon, 18 Jan 2016 11:47:44 +0530 Subject: added support for uin8,uint16,int8,int16 and not in GeneratedSetup.sci,u8cmd_digital_outs.c,getAllInterfaces.sci,getAllHeaders.sci --- 2.3-1/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c | 1 + 1 file changed, 1 insertion(+) (limited to '2.3-1/src/c/scilab-arduino') 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 index 09dffd62..2d9de977 100644 --- 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 @@ -11,6 +11,7 @@ */ #include "cmd_digital_out.h" +#include "Arduino.h" uint8 u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value) { -- cgit From a6efab1a42eda8c1e3902c2f2d030a9cb9cfd25e 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_analog_in/u8cmd_analog_ins.c | 1 + .../cmd_analog_out/u8cmd_analog_outs.c | 1 + .../cmd_dcmotor_run/u8cmd_dcmotor_runs.c | 1 + .../cmd_dcmotor_setup/u8cmd_dcmotor_setups.c | 3 ++- .../cmd_digital_in/u8cmd_digital_ins.c | 1 + .../cmd_servo_attach/u8cmd_servo_attach.cpp | 26 +++++++++++++++++++++ .../cmd_servo_detach/u8cmd_servo_detach.cpp | 24 +++++++++++++++++++ .../cmd_servo_move/u8cmd_servo_move.cpp | 27 ++++++++++++++++++++++ .../src/c/scilab-arduino/includes/cmd_analog_in.h | 1 - .../src/c/scilab-arduino/includes/cmd_analog_out.h | 2 -- .../c/scilab-arduino/includes/cmd_dcmotor_run.h | 1 - .../c/scilab-arduino/includes/cmd_dcmotor_setup.h | 1 - .../src/c/scilab-arduino/includes/cmd_digital_in.h | 1 - .../c/scilab-arduino/includes/cmd_digital_out.h | 1 - .../c/scilab-arduino/includes/cmd_servo_attach.h | 23 ++++++++++++++++++ .../c/scilab-arduino/includes/cmd_servo_detach.h | 24 +++++++++++++++++++ .../src/c/scilab-arduino/includes/cmd_servo_move.h | 24 +++++++++++++++++++ 2.3-1/src/c/scilab-arduino/includes/sleep.h | 2 -- .../scilab-arduino/interfaces/int_cmd_analog_out.h | 3 +++ .../c/scilab-arduino/interfaces/int_cmd_servo.h | 27 ++++++++++++++++++++++ 20 files changed, 184 insertions(+), 10 deletions(-) create mode 100644 2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp create mode 100644 2.3-1/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp create mode 100644 2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_servo_attach.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_servo_detach.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_servo_move.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_servo.h (limited to '2.3-1/src/c/scilab-arduino') 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 index ebfad618..29e6c0f7 100644 --- 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 @@ -11,6 +11,7 @@ */ #include "cmd_analog_in.h" +#include "Arduino.h" uint16 u8cmd_analog_ins(uint8 board_no, uint8 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 index 94d51f6f..aa7dac06 100644 --- 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 @@ -11,6 +11,7 @@ */ #include "cmd_analog_out.h" +#include "Arduino.h" uint8 u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 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 index 93905c94..07798aba 100644 --- 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 @@ -11,6 +11,7 @@ */ #include "cmd_dcmotor_run.h" +#include "Arduino.h" uint8 u8cmd_dcmotor_runs(uint8 board_no, uint8 motor_no, int16 duty) { 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 index 30b4b9b3..d1d0fea8 100644 --- 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 @@ -11,6 +11,7 @@ */ #include "cmd_dcmotor_setup.h" +#include "Arduino.h" uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4]; @@ -18,7 +19,7 @@ uint8 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_pin_2[motor_no] = pin_2; dcm_mode[motor_no] = driver_type; //Initialise pins 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 index 1d0036a4..129db1a9 100644 --- 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 @@ -11,6 +11,7 @@ */ #include "cmd_digital_in.h" +#include "Arduino.h" uint8 u8cmd_digital_ins(uint8 board_no, uint8 pin) { diff --git a/2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp b/2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp new file mode 100644 index 00000000..a89363ba --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp @@ -0,0 +1,26 @@ +/* + Scilab2C FOSSEE IIT BOMBAY + */ + +#include "cmd_servo_attach.h" +#include "Arduino.h" +#include +Servo servo1,servo2; +uint8 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); + } + + return 0; +} + diff --git a/2.3-1/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp b/2.3-1/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp new file mode 100644 index 00000000..95faf4cd --- /dev/null +++ b/2.3-1/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; +} + diff --git a/2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp b/2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp new file mode 100644 index 00000000..e8874766 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp @@ -0,0 +1,27 @@ +/* + Scilab2C FOSSEE IIT BOMBAY + */ + +#include "cmd_servo_move.h" +#include "Arduino.h" +#include +Servo servo1,servo2; +uint8 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); + } + } + return 0; +} + 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 index 4478fb09..5361fe80 100644 --- 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 @@ -15,7 +15,6 @@ #define __CMD_ANALOG_IN_H__ #include "types.h" -#include "Arduino.h" #ifdef __cplusplus extern "C" { 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 index e75c5a66..a0da68e1 100644 --- 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 @@ -15,8 +15,6 @@ #define __CMD_ANALOG_OUT_H__ #include "types.h" -#include "Arduino.h" - #ifdef __cplusplus extern "C" { #endif 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 index 7631761b..82df60ad 100644 --- 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 @@ -15,7 +15,6 @@ #define __CMD_DCMOTOR_RUN_H__ #include "types.h" -#include "Arduino.h" #ifdef __cplusplus extern "C" { 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 index 94f5a161..66fa04e9 100644 --- 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 @@ -15,7 +15,6 @@ #define __CMD_DCMOTOR_SETUP_H__ #include "types.h" -#include "Arduino.h" #ifdef __cplusplus extern "C" { 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 index 9e809aa4..96fd24bb 100644 --- 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 @@ -15,7 +15,6 @@ #define __CMD_DIGITAL_IN_H__ #include "types.h" -#include "Arduino.h" #ifdef __cplusplus extern "C" { 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 index 49739b0c..ee459d18 100644 --- 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 @@ -15,7 +15,6 @@ #define __CMD_DIGITAL_OUT_H__ #include "types.h" -#include "Arduino.h" #ifdef __cplusplus extern "C" { 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..5dd3ed6b --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_servo_attach.h @@ -0,0 +1,23 @@ +/* + Scilab2C FOSSEE IIT Bombay + */ + + +#ifndef __CMD_SERVO_ATTACH_H__ +#define __CMD_SERVO_ATTACH_H__ + +#include "types.h" +//#include +#ifdef __cplusplus +extern "C" { +#endif + +extern Servo servo1,servo2; + +uint8 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..ce74d62d --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_servo_detach.h @@ -0,0 +1,24 @@ +/* + Scilab2C FOSSEE IIT Bombay + */ + + +#ifndef __CMD_SERVO_DETACH_H__ +#define __CMD_SERVO_DETACH_H__ + +#include "types.h" +//#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern Servo servo1,servo2; + +uint8 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..9013d3cc --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_servo_move.h @@ -0,0 +1,24 @@ +/* + Scilab2C FOSSEE IIT Bombay + */ + + +#ifndef __CMD_SERVO_MOVE_H__ +#define __CMD_SERVO_MOVE_H__ + +#include "types.h" +//#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern Servo servo1,servo2; + +uint8 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 index cde27164..4c8cbc29 100644 --- a/2.3-1/src/c/scilab-arduino/includes/sleep.h +++ b/2.3-1/src/c/scilab-arduino/includes/sleep.h @@ -15,8 +15,6 @@ #define __SLEEP_H__ #include "types.h" -#include "Arduino.h" - #ifdef __cplusplus extern "C" { #endif 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 index 09f5c6ea..ead26acd 100644 --- 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 @@ -23,6 +23,9 @@ extern "C" { #define d0d0d0cmd_analog_outu80(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ (uint8)in2,(uint8)in3) +#define d0d0u80cmd_analog_outu80(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ + (uint8)in2,(uint8)in3) + #ifdef __cplusplus } /* extern "C" */ #endif 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..d99a0444 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_servo.h @@ -0,0 +1,27 @@ +/* + Scilab2C FOSSEE IIT BOMBAY + */ + + +#ifndef __INT_CMD_SERVO_H__ +#define __INT_CMD_SERVO_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +#define d0d0cmd_servo_attachu80(in1,in2) u8cmd_servo_attach((uint8)in1,(uint8)in2); + +#define d0d0cmd_servo_detachu80(in1,in2) u8cmd_servo_detach((uint8)in1,(uint8)in2); + +#define d0d0d0cmd_servo_moveu80(in1,in2,in3) u8cmd_servo_move((uint8)in1,(uint8)in2,(uint8)in3); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __INT_CMD_DCMOTOR_H__ */ -- cgit From 7198d73fe85d35ef63a88e3c5cc87dc9bbd24ccb Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Mon, 7 Mar 2016 20:42:23 +0530 Subject: Errors in bit***.h files fixed --- 2.3-1/src/c/scilab-arduino/default_files/setup_arduino.h | 1 + 1 file changed, 1 insertion(+) (limited to '2.3-1/src/c/scilab-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 index 9eb0ed4a..acbf8e21 100644 --- 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 @@ -24,6 +24,7 @@ ** --- SCI2C Includes. --- ** ----------------------- */ +#include "Arduino.h" #include "sci2clib.h" /* ** --------------------------- -- cgit From 7d13dc4707f5c4387acdb1946b955490629d2f98 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Tue, 10 May 2016 17:17:41 +0530 Subject: Added support for cumprod, cumsum, triu, tril functions --- 2.3-1/src/c/scilab-arduino/includes/cmd_analog_in.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '2.3-1/src/c/scilab-arduino') 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 index 5361fe80..1ab9f3ae 100644 --- 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 @@ -26,4 +26,4 @@ uint16 u8cmd_analog_ins(uint8 board_no, uint8 pin); } /* extern "C" */ #endif -#endif /* __CMD_DIGITAL_IN_H__ */ +#endif /* __CMD_ANALOG_IN_H__ */ -- cgit From cdd9bf519d594b87c07193d2770b81a07829a50c 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_analog_out/u8cmd_analog_outs.c | 4 ++-- .../cmd_dcmotor_run/u8cmd_dcmotor_runs.c | 3 +-- .../cmd_dcmotor_setup/u8cmd_dcmotor_setups.c | 3 +-- .../cmd_digital_out/u8cmd_digital_outs.c | 4 ++-- .../cmd_servo_attach/u8cmd_servo_attach.cpp | 26 --------------------- .../cmd_servo_attach/u8cmd_servo_attachs.cpp | 25 ++++++++++++++++++++ .../cmd_servo_detach/u8cmd_servo_detach.cpp | 24 ------------------- .../cmd_servo_detach/u8cmd_servo_detachs.cpp | 23 ++++++++++++++++++ .../cmd_servo_move/u8cmd_servo_move.cpp | 27 ---------------------- .../cmd_servo_move/u8cmd_servo_moves.cpp | 26 +++++++++++++++++++++ .../src/c/scilab-arduino/includes/cmd_analog_out.h | 2 +- .../c/scilab-arduino/includes/cmd_dcmotor_run.h | 2 +- .../c/scilab-arduino/includes/cmd_dcmotor_setup.h | 2 +- .../c/scilab-arduino/includes/cmd_digital_out.h | 2 +- .../c/scilab-arduino/includes/cmd_servo_attach.h | 2 +- .../c/scilab-arduino/includes/cmd_servo_detach.h | 2 +- .../src/c/scilab-arduino/includes/cmd_servo_move.h | 2 +- 2.3-1/src/c/scilab-arduino/includes/sleep.h | 2 +- .../scilab-arduino/interfaces/int_cmd_analog_out.h | 4 ++-- .../c/scilab-arduino/interfaces/int_cmd_dcmotor.h | 6 ++--- .../interfaces/int_cmd_digital_out.h | 4 ++-- .../c/scilab-arduino/interfaces/int_cmd_servo.h | 6 ++--- 2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h | 2 +- 2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c | 3 +-- 24 files changed, 100 insertions(+), 106 deletions(-) delete mode 100644 2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp create mode 100644 2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp delete mode 100644 2.3-1/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp create mode 100644 2.3-1/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp delete mode 100644 2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp create mode 100644 2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_moves.cpp (limited to '2.3-1/src/c/scilab-arduino') 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 index aa7dac06..07e1805c 100644 --- 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 @@ -13,9 +13,9 @@ #include "cmd_analog_out.h" #include "Arduino.h" -uint8 u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value) +void u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value) { analogWrite(pin,value); - return 0; + } 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 index 07798aba..ff2f6e5f 100644 --- 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 @@ -13,7 +13,7 @@ #include "cmd_dcmotor_run.h" #include "Arduino.h" -uint8 u8cmd_dcmotor_runs(uint8 board_no, uint8 motor_no, int16 duty) +void u8cmd_dcmotor_runs(uint8 board_no, uint8 motor_no, int16 duty) { uint8 direction = 1; if(duty >= 0) @@ -55,6 +55,5 @@ uint8 u8cmd_dcmotor_runs(uint8 board_no, uint8 motor_no, int16 duty) } } - return 0; } 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 index d1d0fea8..194074e1 100644 --- 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 @@ -15,7 +15,7 @@ uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4]; -uint8 u8cmd_dcmotor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\ +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; @@ -38,6 +38,5 @@ uint8 u8cmd_dcmotor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\ digitalWrite(pin_2,LOW); } - return 0; } 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 index 2e5c90d3..58e7a85d 100644 --- 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 @@ -14,9 +14,9 @@ #include "Arduino.h" -uint8 u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value) +void u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value) { digitalWrite(pin,value); - return 0; + } diff --git a/2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp b/2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp deleted file mode 100644 index a89363ba..00000000 --- a/2.3-1/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - Scilab2C FOSSEE IIT BOMBAY - */ - -#include "cmd_servo_attach.h" -#include "Arduino.h" -#include -Servo servo1,servo2; -uint8 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); - } - - return 0; -} - 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..ae2c68c5 --- /dev/null +++ b/2.3-1/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 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_detach.cpp b/2.3-1/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp deleted file mode 100644 index 95faf4cd..00000000 --- a/2.3-1/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/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..c8c5bebb --- /dev/null +++ b/2.3-1/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(); + } + +} + diff --git a/2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp b/2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp deleted file mode 100644 index e8874766..00000000 --- a/2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - Scilab2C FOSSEE IIT BOMBAY - */ - -#include "cmd_servo_move.h" -#include "Arduino.h" -#include -Servo servo1,servo2; -uint8 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); - } - } - return 0; -} - 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..94f35639 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_moves.cpp @@ -0,0 +1,26 @@ +/* + Scilab2C FOSSEE IIT BOMBAY + */ + +#include "cmd_servo_move.h" +#include "Arduino.h" +#include +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/includes/cmd_analog_out.h b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_out.h index a0da68e1..5f9e5272 100644 --- 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 @@ -19,7 +19,7 @@ extern "C" { #endif -uint8 u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value); +void u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value); #ifdef __cplusplus } /* extern "C" */ 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 index 82df60ad..4bc1ccc3 100644 --- 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 @@ -22,7 +22,7 @@ extern "C" { extern uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4]; -uint8 u8cmd_dc_motor_runs(uint8 board_no, uint8 motor_no, int16 duty); +void u8cmd_dc_motor_runs(uint8 board_no, uint8 motor_no, int16 duty); #ifdef __cplusplus } /* extern "C" */ 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 index 66fa04e9..e7de474c 100644 --- 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 @@ -22,7 +22,7 @@ extern "C" { extern uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4]; -uint8 u8cmd_dc_motor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\ +void u8cmd_dc_motor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\ uint8 pin_1, uint8 pin_2); #ifdef __cplusplus 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 index ee459d18..a0150ce5 100644 --- 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 @@ -20,7 +20,7 @@ extern "C" { #endif -uint8 u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value); +void u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value); #ifdef __cplusplus } /* extern "C" */ 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 index 5dd3ed6b..87078330 100644 --- 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 @@ -14,7 +14,7 @@ extern "C" { extern Servo servo1,servo2; -uint8 u8cmd_servo_attach(uint8 h, uint8 servo_no ); +void u8cmd_servo_attach(uint8 h, uint8 servo_no ); #ifdef __cplusplus } /* extern "C" */ 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 index ce74d62d..6ac5e2b4 100644 --- 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 @@ -15,7 +15,7 @@ extern "C" { extern Servo servo1,servo2; -uint8 u8cmd_servo_detach(uint8 h, uint8 servo_no ); +void u8cmd_servo_detach(uint8 h, uint8 servo_no ); #ifdef __cplusplus } /* extern "C" */ 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 index 9013d3cc..7f9bc0d4 100644 --- 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 @@ -15,7 +15,7 @@ extern "C" { extern Servo servo1,servo2; -uint8 u8cmd_servo_move(uint8 h, uint8 servo_no,uint8 val); +void u8cmd_servo_move(uint8 h, uint8 servo_no,uint8 val); #ifdef __cplusplus } /* extern "C" */ diff --git a/2.3-1/src/c/scilab-arduino/includes/sleep.h b/2.3-1/src/c/scilab-arduino/includes/sleep.h index 4c8cbc29..8daab69a 100644 --- a/2.3-1/src/c/scilab-arduino/includes/sleep.h +++ b/2.3-1/src/c/scilab-arduino/includes/sleep.h @@ -19,7 +19,7 @@ extern "C" { #endif -uint8 u16sleeps(uint16 delay_ms); +void u16sleeps(uint16 delay_ms); #ifdef __cplusplus } /* extern "C" */ 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 index ead26acd..24105232 100644 --- 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 @@ -20,10 +20,10 @@ extern "C" { #endif -#define d0d0d0cmd_analog_outu80(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ +#define d0d0d0cmd_analog_out(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ (uint8)in2,(uint8)in3) -#define d0d0u80cmd_analog_outu80(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ +#define d0d0u80cmd_analog_out(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ (uint8)in2,(uint8)in3) #ifdef __cplusplus 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 index b35583d7..7f8db414 100644 --- 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 @@ -20,15 +20,15 @@ extern "C" { #endif -#define d0d0d0d0d0cmd_dcmotor_setupu80(in1,in2,in3,in4,in5)\ +#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_runu80(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\ +#define d0d0d0cmd_dcmotor_run(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\ (uint8)in2, (int16)in3); -#define d0d0u160cmd_dcmotor_runu80(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\ +#define d0d0u160cmd_dcmotor_run(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\ (uint8)in2, (int16)in3); 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 index 4585f12a..009ff7d4 100644 --- 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 @@ -20,11 +20,11 @@ extern "C" { #endif -#define d0d0d0cmd_digital_outu80(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\ +#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_outu80(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\ +#define d0d0u80cmd_digital_out(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\ (uint8)in2, (uint8)in3) 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 index d99a0444..3b482733 100644 --- 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 @@ -13,11 +13,11 @@ extern "C" { #endif -#define d0d0cmd_servo_attachu80(in1,in2) u8cmd_servo_attach((uint8)in1,(uint8)in2); +#define d0d0cmd_servo_attach(in1,in2) u8cmd_servo_attach((uint8)in1,(uint8)in2); -#define d0d0cmd_servo_detachu80(in1,in2) u8cmd_servo_detach((uint8)in1,(uint8)in2); +#define d0d0cmd_servo_detach(in1,in2) u8cmd_servo_detach((uint8)in1,(uint8)in2); -#define d0d0d0cmd_servo_moveu80(in1,in2,in3) u8cmd_servo_move((uint8)in1,(uint8)in2,(uint8)in3); +#define d0d0d0cmd_servo_move(in1,in2,in3) u8cmd_servo_move((uint8)in1,(uint8)in2,(uint8)in3); #ifdef __cplusplus 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 index 8e2d0824..a0d3545d 100644 --- a/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h @@ -20,7 +20,7 @@ extern "C" { #endif -#define d0sleepu80(in1) u16sleeps((uint16)in1) +#define d0sleep(in1) u16sleeps((uint16)in1) #ifdef __cplusplus } /* extern "C" */ diff --git a/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c b/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c index 14da0ba9..fc59ca8c 100644 --- a/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c +++ b/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c @@ -12,9 +12,8 @@ #include "sleep.h" -uint8 u16sleeps(uint16 delay_ms) +void u16sleeps(uint16 delay_ms) { delay(delay_ms); - return 0; } -- cgit From 645c51daadc9a5c9374b0465ded05f84bca65183 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_analog_in/u8cmd_analog_ins.c | 22 +++++++++++----------- .../cmd_analog_out/u8cmd_analog_outs.c | 22 +++++++++++----------- .../cmd_dcmotor_run/u8cmd_dcmotor_runs.c | 22 +++++++++++----------- .../cmd_dcmotor_setup/u8cmd_dcmotor_setups.c | 22 +++++++++++----------- .../cmd_digital_in/u8cmd_digital_ins.c | 22 +++++++++++----------- .../cmd_digital_out/u8cmd_digital_outs.c | 22 +++++++++++----------- .../cmd_servo_attach/u8cmd_servo_attachs.cpp | 13 ++++++++++--- .../cmd_servo_detach/u8cmd_servo_detachs.cpp | 15 ++++++++++++--- .../cmd_servo_move/u8cmd_servo_moves.cpp | 14 +++++++++++--- .../scilab-arduino/default_files/sci2c_arduino.ino | 12 ++++++++++++ .../src/c/scilab-arduino/includes/cmd_analog_in.h | 22 +++++++++++----------- .../src/c/scilab-arduino/includes/cmd_analog_out.h | 22 +++++++++++----------- .../c/scilab-arduino/includes/cmd_dcmotor_run.h | 22 +++++++++++----------- .../c/scilab-arduino/includes/cmd_dcmotor_setup.h | 22 +++++++++++----------- .../src/c/scilab-arduino/includes/cmd_digital_in.h | 22 +++++++++++----------- .../c/scilab-arduino/includes/cmd_digital_out.h | 22 +++++++++++----------- .../c/scilab-arduino/includes/cmd_servo_attach.h | 14 +++++++++++--- .../c/scilab-arduino/includes/cmd_servo_detach.h | 14 +++++++++++--- .../src/c/scilab-arduino/includes/cmd_servo_move.h | 14 +++++++++++--- 2.3-1/src/c/scilab-arduino/includes/sleep.h | 22 +++++++++++----------- .../scilab-arduino/interfaces/int_cmd_analog_in.h | 22 +++++++++++----------- .../scilab-arduino/interfaces/int_cmd_analog_out.h | 22 +++++++++++----------- .../c/scilab-arduino/interfaces/int_cmd_dcmotor.h | 22 +++++++++++----------- .../scilab-arduino/interfaces/int_cmd_digital_in.h | 22 +++++++++++----------- .../interfaces/int_cmd_digital_out.h | 22 +++++++++++----------- .../c/scilab-arduino/interfaces/int_cmd_servo.h | 14 +++++++++++--- 2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h | 22 +++++++++++----------- 2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c | 22 +++++++++++----------- 28 files changed, 309 insertions(+), 241 deletions(-) (limited to '2.3-1/src/c/scilab-arduino') 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 index 29e6c0f7..42005d1c 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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" 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 index 07e1805c..a5b8513e 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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" 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 index ff2f6e5f..6e1c2caa 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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" 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 index 194074e1..389f9111 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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" 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 index 129db1a9..da5ca78d 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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" 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 index 58e7a85d..64af7b5c 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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" 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 index ae2c68c5..b4322c7f 100644 --- 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 @@ -1,7 +1,14 @@ -/* - 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_attach.h" #include "Arduino.h" #include 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 index c8c5bebb..08ea03f4 100644 --- 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 @@ -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 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 index 94f35639..c7c6fa7d 100644 --- 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 @@ -1,6 +1,14 @@ -/* - 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_move.h" #include "Arduino.h" 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 index 2b30456c..df28950c 100644 --- 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 @@ -1,3 +1,15 @@ +/* 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 #include 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 index 1ab9f3ae..0c186569 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index 5f9e5272..54e51f59 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index 4bc1ccc3..2b69c99b 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index e7de474c..cecd4659 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index 96fd24bb..51226a6f 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index a0150ce5..1e837e53 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index 87078330..12c2c013 100644 --- 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 @@ -1,6 +1,14 @@ -/* - 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 +*/ #ifndef __CMD_SERVO_ATTACH_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 index 6ac5e2b4..daa5fd2b 100644 --- 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 @@ -1,6 +1,14 @@ -/* - 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 +*/ #ifndef __CMD_SERVO_DETACH_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 index 7f9bc0d4..79c16b46 100644 --- 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 @@ -1,6 +1,14 @@ -/* - 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: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ #ifndef __CMD_SERVO_MOVE_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 index 8daab69a..8763f5f4 100644 --- a/2.3-1/src/c/scilab-arduino/includes/sleep.h +++ b/2.3-1/src/c/scilab-arduino/includes/sleep.h @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index 0df8fcbf..7358509b 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index 24105232..80ed7ab9 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index 7f8db414..61e0d2e3 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index 04b773c6..4e5e575d 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index 009ff7d4..92a92c68 100644 --- 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 @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ 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 index 3b482733..a431fe14 100644 --- 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 @@ -1,6 +1,14 @@ -/* - 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 +*/ #ifndef __INT_CMD_SERVO_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 index a0d3545d..f3a697f4 100644 --- a/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_sleep.h @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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__ diff --git a/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c b/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c index fc59ca8c..88f8a66d 100644 --- a/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c +++ b/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c @@ -1,14 +1,14 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Arnaud TORSET - * - * 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 - * - */ +/* 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" -- cgit From 3121a1f5a8203bfd14d46f71930ac5cd22afdf7d Mon Sep 17 00:00:00 2001 From: yash1112 Date: Mon, 19 Jun 2017 05:40:46 +0530 Subject: 1.3 new scilab-arduino functions added2. all functions have been tested on hardware 3. 5 i2c library functions added 4. Now generates code for 27 Boards(arduino and lilypad). 5. New GUI --- .../cmd_analog_in_volt/u8cmd_analog_in_volts.c | 22 ++++++++++++++++ .../cmd_analog_out_volt/u8cmd_analog_out_volts.c | 22 ++++++++++++++++ .../cmd_dcmotor_release/u8cmd_dcmotor_releases.c | 29 +++++++++++++++++++++ .../cmd_dcmotor_run/u8cmd_dcmotor_runs.c | 1 + .../cmd_dcmotor_setup/u8cmd_dcmotor_setups.c | 1 + .../scilab-arduino/cmd_i2c_dev/u8cmd_i2c_devs.cpp | 10 ++++++++ .../cmd_i2c_read/u8cmd_i2c_reads.cpp | 18 +++++++++++++ .../u8cmd_i2c_read_registers.cpp | 26 +++++++++++++++++++ .../cmd_i2c_write/u8cmd_i2c_writes.cpp | 13 ++++++++++ .../u8cmd_i2c_write_registers.cpp | 16 ++++++++++++ .../c/scilab-arduino/includes/cmd_analog_in_volt.h | 28 ++++++++++++++++++++ .../scilab-arduino/includes/cmd_analog_out_volt.h | 27 +++++++++++++++++++ .../scilab-arduino/includes/cmd_dcmotor_release.h | 30 ++++++++++++++++++++++ .../c/scilab-arduino/includes/cmd_dcmotor_run.h | 2 +- .../c/scilab-arduino/includes/cmd_dcmotor_setup.h | 2 +- 2.3-1/src/c/scilab-arduino/includes/cmd_i2c_dev.h | 16 ++++++++++++ 2.3-1/src/c/scilab-arduino/includes/cmd_i2c_read.h | 16 ++++++++++++ .../includes/cmd_i2c_read_register.h | 16 ++++++++++++ .../src/c/scilab-arduino/includes/cmd_i2c_write.h | 16 ++++++++++++ .../includes/cmd_i2c_write_register.h | 16 ++++++++++++ .../interfaces/int_cmd_analog_in_volt.h | 30 ++++++++++++++++++++++ .../interfaces/int_cmd_analog_out_volt.h | 30 ++++++++++++++++++++++ .../c/scilab-arduino/interfaces/int_cmd_dcmotor.h | 9 ++++--- .../c/scilab-arduino/interfaces/int_cmd_i2c_dev.h | 17 ++++++++++++ .../c/scilab-arduino/interfaces/int_cmd_i2c_read.h | 19 ++++++++++++++ .../interfaces/int_cmd_i2c_read_register.h | 18 +++++++++++++ .../scilab-arduino/interfaces/int_cmd_i2c_write.h | 20 +++++++++++++++ .../interfaces/int_cmd_i2c_write_register.h | 19 ++++++++++++++ 2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c | 2 ++ 29 files changed, 485 insertions(+), 6 deletions(-) create mode 100644 2.3-1/src/c/scilab-arduino/cmd_analog_in_volt/u8cmd_analog_in_volts.c create mode 100644 2.3-1/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c create mode 100644 2.3-1/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c create mode 100644 2.3-1/src/c/scilab-arduino/cmd_i2c_dev/u8cmd_i2c_devs.cpp create mode 100644 2.3-1/src/c/scilab-arduino/cmd_i2c_read/u8cmd_i2c_reads.cpp create mode 100644 2.3-1/src/c/scilab-arduino/cmd_i2c_read_register/u8cmd_i2c_read_registers.cpp create mode 100644 2.3-1/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp create mode 100644 2.3-1/src/c/scilab-arduino/cmd_i2c_write_register/u8cmd_i2c_write_registers.cpp create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_analog_in_volt.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_analog_out_volt.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_release.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_i2c_dev.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_i2c_read.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_i2c_read_register.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_i2c_write.h create mode 100644 2.3-1/src/c/scilab-arduino/includes/cmd_i2c_write_register.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in_volt.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out_volt.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_dev.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_read.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_read_register.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_write.h create mode 100644 2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_write_register.h (limited to '2.3-1/src/c/scilab-arduino') diff --git a/2.3-1/src/c/scilab-arduino/cmd_analog_in_volt/u8cmd_analog_in_volts.c b/2.3-1/src/c/scilab-arduino/cmd_analog_in_volt/u8cmd_analog_in_volts.c new file mode 100644 index 00000000..7018df2c --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_analog_in_volt/u8cmd_analog_in_volts.c @@ -0,0 +1,22 @@ +/* Copyright (C) 2017 - 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: Yash Pratap Singh Tomar + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "cmd_analog_in_volt.h" +#include "Arduino.h" + +float u8cmd_analog_in_volts(uint8 board_no, uint8 pin) +{ + float a; + a = ((5*(float)analogRead(pin))/1023); + return(a); +} + diff --git a/2.3-1/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c b/2.3-1/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c new file mode 100644 index 00000000..2dd82e41 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c @@ -0,0 +1,22 @@ +/* Copyright (C) 2017 - 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: Yash Pratap Singh Tomar + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "cmd_analog_out_volt.h" +#include "Arduino.h" + +void u8cmd_analog_out_volts(uint8 board_no, uint8 pin, float value) +{ + int a; + a = ((value*255)/5); + analogWrite(pin,a); + +} diff --git a/2.3-1/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c b/2.3-1/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c new file mode 100644 index 00000000..349bcb17 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c @@ -0,0 +1,29 @@ +/* Copyright (C) 2017 - 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: Yash Pratap Singh Tomar + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "cmd_dcmotor_release.h" +#include "Arduino.h" + +void u8cmd_dcmotor_releases(uint8 board_no, uint8 motor_no) +{ + if (dcm_mode[motor_no] == 3) + { + analogWrite(dcm_pin_1[motor_no],0); + analogWrite(dcm_pin_2[motor_no],0); + } + + else + { + digitalWrite(dcm_pin_1[motor_no],LOW); + digitalWrite(dcm_pin_2[motor_no],LOW); + } +} 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 index 6e1c2caa..e8fa8b3c 100644 --- 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 @@ -6,6 +6,7 @@ are also available at http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt Author: Siddhesh Wani + Revised by: Yash Pratap Singh Tomar Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ 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 index 389f9111..0d04e748 100644 --- 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 @@ -6,6 +6,7 @@ are also available at http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt Author: Siddhesh Wani + Revised by: Yash Pratap Singh Tomar Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ diff --git a/2.3-1/src/c/scilab-arduino/cmd_i2c_dev/u8cmd_i2c_devs.cpp b/2.3-1/src/c/scilab-arduino/cmd_i2c_dev/u8cmd_i2c_devs.cpp new file mode 100644 index 00000000..adc1a6e5 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_i2c_dev/u8cmd_i2c_devs.cpp @@ -0,0 +1,10 @@ +#include "cmd_i2c_dev.h" +#include "Arduino.h" +#include "Wire.h" + + +uint8 u8cmd_i2c_devs(uint8 address) +{ + Wire.begin(); + return((uint8)address); +} diff --git a/2.3-1/src/c/scilab-arduino/cmd_i2c_read/u8cmd_i2c_reads.cpp b/2.3-1/src/c/scilab-arduino/cmd_i2c_read/u8cmd_i2c_reads.cpp new file mode 100644 index 00000000..8f02a87e --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_i2c_read/u8cmd_i2c_reads.cpp @@ -0,0 +1,18 @@ +#include "cmd_i2c_read.h" +#include "Arduino.h" +#include "Wire.h" + +float u8cmd_i2c_reads(uint8 address, uint8 bytes) +{ + + float c; //variable declaration to save received data + + // request reading from sensor + Wire.requestFrom(address, bytes); // request no. of bytes(given) from slave device with address + + // receive reading from sensor + while (Wire.available()) //If data is received + c = Wire.read(); //Save received data in variable + return(c); + +} diff --git a/2.3-1/src/c/scilab-arduino/cmd_i2c_read_register/u8cmd_i2c_read_registers.cpp b/2.3-1/src/c/scilab-arduino/cmd_i2c_read_register/u8cmd_i2c_read_registers.cpp new file mode 100644 index 00000000..0a2ec2ed --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_i2c_read_register/u8cmd_i2c_read_registers.cpp @@ -0,0 +1,26 @@ +#include "cmd_i2c_read_register.h" +#include "Arduino.h" +#include "Wire.h" + +uint16 u8cmd_i2c_read_registers(uint8 address, uint8 reg_adrs) +{ + long int reading; + + Wire.beginTransmission(address); // transmit to device address + Wire.write(reg_adrs); // sets register pointer to reg_adrs position + Wire.endTransmission(); // stop transmitting + + // request reading from sensor + Wire.requestFrom(address, 2); // request 2 bytes from slave device with address + + // receive reading from sensor + if (2 <= Wire.available()) // if two bytes were received + { + reading = Wire.read(); // receive high byte (overwrites previous reading) + reading = reading << 8; // shift high byte to be high 8 bits + reading |= Wire.read(); // receive low byte as lower 8 bits + } + + return(reading); + +} diff --git a/2.3-1/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp b/2.3-1/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp new file mode 100644 index 00000000..0239097a --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp @@ -0,0 +1,13 @@ +#include "cmd_i2c_write.h" +#include "Arduino.h" +#include "Wire.h" + +void u8cmd_i2c_writes(uint8 address, uint8 data) +{ + + Wire.beginTransmission(address); //Begins transmission to the device connected to given address + Wire.write(data); //sends data to slave device + Wire.endTransmission(); //Transmission ends + +} + diff --git a/2.3-1/src/c/scilab-arduino/cmd_i2c_write_register/u8cmd_i2c_write_registers.cpp b/2.3-1/src/c/scilab-arduino/cmd_i2c_write_register/u8cmd_i2c_write_registers.cpp new file mode 100644 index 00000000..63cc7c7a --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/cmd_i2c_write_register/u8cmd_i2c_write_registers.cpp @@ -0,0 +1,16 @@ +#include "cmd_i2c_write_register.h" +#include "Arduino.h" +#include "Wire.h" + +void u8cmd_i2c_write_registers(uint8 address, uint8 reg_adrs, uint8 data) +{ + + + Wire.beginTransmission(address); //Begins transmission to the device connected to given address + Wire.write(reg_adrs); //sets register pointer to reg_adrs position + Wire.write(data); //writes given data on reg_adrs position + Wire.endTransmission(); //Transmission ends + + +} + diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_analog_in_volt.h b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_in_volt.h new file mode 100644 index 00000000..ec471426 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_in_volt.h @@ -0,0 +1,28 @@ +/* Copyright (C) 2017 - 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: Yash Pratap Singh Tomar + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifndef __CMD_ANALOG_IN_VOLT_H__ +#define __CMD_ANALOG_IN_VOLT_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +float u8cmd_analog_in_volts(uint8 board_no, uint8 pin); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CMD_ANALOG_IN_VOLT_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_analog_out_volt.h b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_out_volt.h new file mode 100644 index 00000000..51580fbb --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_analog_out_volt.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2017 - 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: Yash Pratap Singh Tomar + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifndef __CMD_ANALOG_OUT_VOLT_H__ +#define __CMD_ANALOG_OUT_VOLT_H__ + +#include "types.h" +#ifdef __cplusplus +extern "C" { +#endif + +void u8cmd_analog_out_volts(uint8 board_no, uint8 pin, float value); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CMD_ANALOG_OUT_VOLT_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_release.h b/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_release.h new file mode 100644 index 00000000..d185fb5e --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_dcmotor_release.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2017 - 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: Yash Pratap Singh Tomar + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifndef __CMD_DCMOTOR_RELEASE_H__ +#define __CMD_DCMOTOR_RELEASE_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4]; + +void u8cmd_dcmotor_releases(uint8 board_no, uint8 motor_no); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CMD_DCMOTOR_RELEASE_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 index 2b69c99b..1b5d41c1 100644 --- 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 @@ -22,7 +22,7 @@ extern "C" { 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); +void u8cmd_dcmotor_runs(uint8 board_no, uint8 motor_no, int16 duty); #ifdef __cplusplus } /* extern "C" */ 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 index cecd4659..45854ffb 100644 --- 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 @@ -22,7 +22,7 @@ extern "C" { 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,\ +void u8cmd_dcmotor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\ uint8 pin_1, uint8 pin_2); #ifdef __cplusplus diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_dev.h b/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_dev.h new file mode 100644 index 00000000..861a8e7b --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_dev.h @@ -0,0 +1,16 @@ +#ifndef __CMD_I2C_DEV_H__ +#define __CMD_I2C_DEV_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint8 u8cmd_i2c_devs(uint8 address); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CMD_I2C_DEV_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_read.h b/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_read.h new file mode 100644 index 00000000..791bdd38 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_read.h @@ -0,0 +1,16 @@ +#ifndef __CMD_I2C_READ_H__ +#define __CMD_I2C_READ_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +float u8cmd_i2c_reads(uint8 address, uint8 bytes); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CMD_I2C_READ_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_read_register.h b/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_read_register.h new file mode 100644 index 00000000..ea203adf --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_read_register.h @@ -0,0 +1,16 @@ +#ifndef __CMD_I2C_READ_REGISTER_H__ +#define __CMD_I2C_READ_REGISTER_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint16 u8cmd_i2c_read_registers(uint8 address, uint8 reg_adrs); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CMD_I2C_READ_REGISTER_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_write.h b/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_write.h new file mode 100644 index 00000000..6a57222b --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_write.h @@ -0,0 +1,16 @@ +#ifndef __CMD_I2C_WRITE_H__ +#define __CMD_I2C_WRITE_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void u8cmd_i2c_writes(uint8 address, uint8 data); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CMD_I2C_WRITE_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_write_register.h b/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_write_register.h new file mode 100644 index 00000000..ff1b9ec0 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/includes/cmd_i2c_write_register.h @@ -0,0 +1,16 @@ +#ifndef __CMD_I2C_WRITE_REGISTER_H__ +#define __CMD_I2C_WRITE_REGISTER_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void u8cmd_i2c_write_registers(uint8 address, uint8 reg_adrs, uint8 data); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CMD_I2C_WRITE_REGISTER_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in_volt.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in_volt.h new file mode 100644 index 00000000..e8fe65d7 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_in_volt.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2017 - 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: Yash Pratap Singh Tomar + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + + +#ifndef __INT_CMD_ANALOG_IN_VOLT_H__ +#define __INT_CMD_ANALOG_IN_VOLT_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0d0cmd_analog_in_volts0(in1,in2) u8cmd_analog_in_volts((uint8)in1,(uint8)in2) + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __INT_CMD_ANALOG_IN_VOLT_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out_volt.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out_volt.h new file mode 100644 index 00000000..283f8fa0 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_analog_out_volt.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2017 - 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: Yash Pratap Singh Tomar + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifndef __INT_CMD_ANALOG_OUT_VOLT_H__ +#define __INT_CMD_ANALOG_OUT_VOLT_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0d0d0cmd_analog_out_volt(in1,in2,in3) u8cmd_analog_out_volts((uint8)in1,(uint8)in2,(float)in3) + +#define d0d0s0cmd_analog_out_volt(in1,in2,in3) u8cmd_analog_out_volts((uint8)in1,(uint8)in2,(float)in3) + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __INT_CMD_ANALOG_OUT_VOLT_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 index 61e0d2e3..d465ff6f 100644 --- 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 @@ -6,6 +6,7 @@ are also available at http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt Author: Siddhesh Wani + Revised by: Yash Pratap Singh Tomar Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ @@ -20,16 +21,16 @@ 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 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); + (uint8)in2, (int16)in3); + +#define d0d0cmd_dcmotor_release(in1,in2) u8cmd_dcmotor_releases((uint8)in1,(uint8)in2) #ifdef __cplusplus diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_dev.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_dev.h new file mode 100644 index 00000000..c4d93d74 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_dev.h @@ -0,0 +1,17 @@ +#ifndef __INT_CMD_I2C_DEV_H__ +#define __INT_CMD_I2C_DEV_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0cmd_i2c_devu80(in1) u8cmd_i2c_devs((uint8)in1) + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __INT_CMD_I2C_DEV_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_read.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_read.h new file mode 100644 index 00000000..b0633a07 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_read.h @@ -0,0 +1,19 @@ +#ifndef __INT_CMD_I2C_READ_H__ +#define __INT_CMD_I2C_READ_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0d0cmd_i2c_reads0(in1, in2) u8cmd_i2c_reads((uint8)in1, (uint8)in2) + +#define u80d0cmd_i2c_reads0(in1, in2) u8cmd_i2c_reads((uint8)in1, (uint8)in2) + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __INT_CMD_I2C_READ_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_read_register.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_read_register.h new file mode 100644 index 00000000..5f4c5298 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_read_register.h @@ -0,0 +1,18 @@ +#ifndef __INT_CMD_I2C_READ_REGISTER_H__ +#define __INT_CMD_I2C_READ_REGISTER_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0d0cmd_i2c_read_registeru160(in1, in2) u8cmd_i2c_read_registers((uint8)in1, (uint8)in2) + +#define u80d0cmd_i2c_read_registeru160(in1, in2) u8cmd_i2c_read_registers((uint8)in1, (uint8)in2) + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __INT_CMD_I2C_READ_REGISTER_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_write.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_write.h new file mode 100644 index 00000000..a7705a89 --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_write.h @@ -0,0 +1,20 @@ +#ifndef __INT_CMD_I2C_WRITE_H__ +#define __INT_CMD_I2C_WRITE_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0d0cmd_i2c_write(in1, in2) u8cmd_i2c_writes((uint8)in1, (uint8)in2) + +#define u80d0cmd_i2c_write(in1, in2) u8cmd_i2c_writes((uint8)in1, (uint8)in2) + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __INT_CMD_I2C_WRITE_H__ */ diff --git a/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_write_register.h b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_write_register.h new file mode 100644 index 00000000..35c0527e --- /dev/null +++ b/2.3-1/src/c/scilab-arduino/interfaces/int_cmd_i2c_write_register.h @@ -0,0 +1,19 @@ +#ifndef __INT_CMD_I2C_WRITE_REGISTER_H__ +#define __INT_CMD_I2C_WRITE_REGISTER_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0d0d0cmd_i2c_write_register(in1, in2, in3) u8cmd_i2c_write_registers((uint8)in1, (uint8)in2, (uint8)in3) + +#define u80d0d0cmd_i2c_write_register(in1, in2, in3) u8cmd_i2c_write_registers((uint8)in1, (uint8)in2, (uint8)in3) + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __INT_CMD_I2C_WRITE_REGISTER_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 index 88f8a66d..30459782 100644 --- a/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c +++ b/2.3-1/src/c/scilab-arduino/sleep/u16sleeps.c @@ -6,11 +6,13 @@ are also available at http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt Author: Siddhesh Wani + Revised by: Yash Pratap Singh Tomar Organization: FOSSEE, IIT Bombay Email: toolbox@scilab.in */ #include "sleep.h" +#include "Arduino.h" void u16sleeps(uint16 delay_ms) { -- cgit