summaryrefslogtreecommitdiff
path: root/2.3-1/macros/Scilab-Arduino
diff options
context:
space:
mode:
authorsiddhu89902017-06-20 15:34:06 +0530
committersiddhu89902017-06-20 15:34:06 +0530
commit0051253bc224286c118c080c79eaed5bf611bd35 (patch)
treeb8198628efac2024ac0592b4a1a14ad1b0233f5c /2.3-1/macros/Scilab-Arduino
parent633deb856914bd374d62b3fb3b63447bd81bc03c (diff)
parent2859e00d3f1da2d4b5b47514161bf0c63fcef83f (diff)
downloadScilab2C-0051253bc224286c118c080c79eaed5bf611bd35.tar.gz
Scilab2C-0051253bc224286c118c080c79eaed5bf611bd35.tar.bz2
Scilab2C-0051253bc224286c118c080c79eaed5bf611bd35.zip
Merged with Yash's work. Gui modified for Arduino board selection. Arduino I2C functions added
Diffstat (limited to '2.3-1/macros/Scilab-Arduino')
-rw-r--r--2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci3
-rw-r--r--2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci4
-rw-r--r--2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci2
-rw-r--r--2.3-1/macros/Scilab-Arduino/i2c_dev.sci3
-rw-r--r--2.3-1/macros/Scilab-Arduino/i2c_read.sci2
-rw-r--r--2.3-1/macros/Scilab-Arduino/i2c_read_register.sci3
-rw-r--r--2.3-1/macros/Scilab-Arduino/i2c_write.sci2
-rw-r--r--2.3-1/macros/Scilab-Arduino/i2c_write_register.sci2
-rw-r--r--2.3-1/macros/Scilab-Arduino/libbin759 -> 728 bytes
-rw-r--r--2.3-1/macros/Scilab-Arduino/names5
10 files changed, 24 insertions, 2 deletions
diff --git a/2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci b/2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci
index a112fe6a..eff61fe6 100644
--- a/2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci
+++ b/2.3-1/macros/Scilab-Arduino/GetArduinoFunctions.sci
@@ -30,6 +30,7 @@ ArduinoFunctions = [
"cmd_dcmotor_run"
"cmd_servo_attach"
"cmd_servo_detach"
- "cmd_servo_move"];
+ "cmd_servo_move"
+ "i2c_dev"];
endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci b/2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci
index d2cd0c74..d310648e 100644
--- a/2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci
+++ b/2.3-1/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci
@@ -24,6 +24,8 @@ function ArduinoSetupFunctions = GetArduinoSetupFunctions()
ArduinoSetupFunctions = [
"cmd_dcmotor_setup"
"cmd_servo_attach"
- "cmd_servo_detach"];
+ "cmd_servo_detach"
+ "i2c_dev"];
+
endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci b/2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci
index 3e1c18fb..4afceca8 100644
--- a/2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci
+++ b/2.3-1/macros/Scilab-Arduino/IsArduinoSetupFunction.sci
@@ -9,6 +9,7 @@
// Email: toolbox@scilab.in
function Output = IsArduinoSetupFunction(FunName)
+disp(FunName)
// -----------------------------------------------------------------
// Check whether input function name is an Arduino setup function or not.
//
@@ -25,6 +26,7 @@ function Output = IsArduinoSetupFunction(FunName)
//Get list of supported functions for Arduino
ArduinoSetupFunctions = GetArduinoSetupFunctions();
+
//Check whether input function is present in above list or not
FunNameInArduinoSetup = members(FunName,ArduinoSetupFunctions);
Output = bool2s(FunNameInArduinoSetup~=0);
diff --git a/2.3-1/macros/Scilab-Arduino/i2c_dev.sci b/2.3-1/macros/Scilab-Arduino/i2c_dev.sci
new file mode 100644
index 00000000..f86e588a
--- /dev/null
+++ b/2.3-1/macros/Scilab-Arduino/i2c_dev.sci
@@ -0,0 +1,3 @@
+function z = i2c_dev(address)
+ z = 0
+endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/i2c_read.sci b/2.3-1/macros/Scilab-Arduino/i2c_read.sci
new file mode 100644
index 00000000..6916b9c1
--- /dev/null
+++ b/2.3-1/macros/Scilab-Arduino/i2c_read.sci
@@ -0,0 +1,2 @@
+function y = i2c_read(address,bytes)
+endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/i2c_read_register.sci b/2.3-1/macros/Scilab-Arduino/i2c_read_register.sci
new file mode 100644
index 00000000..51a88eeb
--- /dev/null
+++ b/2.3-1/macros/Scilab-Arduino/i2c_read_register.sci
@@ -0,0 +1,3 @@
+function x = i2c_read_register(address,reg_adrs)
+ x = 0;
+endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/i2c_write.sci b/2.3-1/macros/Scilab-Arduino/i2c_write.sci
new file mode 100644
index 00000000..8dfd070a
--- /dev/null
+++ b/2.3-1/macros/Scilab-Arduino/i2c_write.sci
@@ -0,0 +1,2 @@
+function i2c_write(address,data)
+endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/i2c_write_register.sci b/2.3-1/macros/Scilab-Arduino/i2c_write_register.sci
new file mode 100644
index 00000000..a9b55530
--- /dev/null
+++ b/2.3-1/macros/Scilab-Arduino/i2c_write_register.sci
@@ -0,0 +1,2 @@
+function i2c_write_register(address, reg_adrs, data)
+endfunction
diff --git a/2.3-1/macros/Scilab-Arduino/lib b/2.3-1/macros/Scilab-Arduino/lib
index 0304cade..83baacde 100644
--- a/2.3-1/macros/Scilab-Arduino/lib
+++ b/2.3-1/macros/Scilab-Arduino/lib
Binary files differ
diff --git a/2.3-1/macros/Scilab-Arduino/names b/2.3-1/macros/Scilab-Arduino/names
index 55eb6fef..c1386c3b 100644
--- a/2.3-1/macros/Scilab-Arduino/names
+++ b/2.3-1/macros/Scilab-Arduino/names
@@ -4,3 +4,8 @@ GetArduinoSetupFunctions
InsertSetupInList
IsArduinoFunction
IsArduinoSetupFunction
+i2c_dev
+i2c_read
+i2c_read_register
+i2c_write
+i2c_write_register