diff options
author | yash1112 | 2017-07-10 17:08:48 +0530 |
---|---|---|
committer | yash1112 | 2017-07-10 17:08:48 +0530 |
commit | 49d8281d2da2f4c6bf0e62d148a8a7328d3bf970 (patch) | |
tree | 8b555b3797807de0db3849f0d91664c12d785c9b /tests/unit_tests | |
parent | bd03b38be0918837e147e969c6bb2014900009db (diff) | |
download | Scilab2C_fossee_old-49d8281d2da2f4c6bf0e62d148a8a7328d3bf970.tar.gz Scilab2C_fossee_old-49d8281d2da2f4c6bf0e62d148a8a7328d3bf970.tar.bz2 Scilab2C_fossee_old-49d8281d2da2f4c6bf0e62d148a8a7328d3bf970.zip |
Arduino toolbox error Resolved
Diffstat (limited to 'tests/unit_tests')
-rw-r--r-- | tests/unit_tests/testArduino/analog_check.sci | 7 | ||||
-rw-r--r-- | tests/unit_tests/testArduino/analog_in_check_volt.sci | 4 | ||||
-rw-r--r-- | tests/unit_tests/testArduino/blink_13.sci | 6 | ||||
-rw-r--r-- | tests/unit_tests/testArduino/board_test_release2.sci | 11 | ||||
-rw-r--r-- | tests/unit_tests/testArduino/digital_in_check.sci | 10 | ||||
-rw-r--r-- | tests/unit_tests/testArduino/i2c_master.sci | 9 |
6 files changed, 47 insertions, 0 deletions
diff --git a/tests/unit_tests/testArduino/analog_check.sci b/tests/unit_tests/testArduino/analog_check.sci new file mode 100644 index 0000000..779f5b7 --- /dev/null +++ b/tests/unit_tests/testArduino/analog_check.sci @@ -0,0 +1,7 @@ +function analog_check() + cmd_analog_out(1,3,50) + cmd_analog_out(1,5,100) + cmd_analog_out(1,6,175) + cmd_analog_out(1,9,255) + +endfunction diff --git a/tests/unit_tests/testArduino/analog_in_check_volt.sci b/tests/unit_tests/testArduino/analog_in_check_volt.sci new file mode 100644 index 0000000..16e7905 --- /dev/null +++ b/tests/unit_tests/testArduino/analog_in_check_volt.sci @@ -0,0 +1,4 @@ +function analog_in_check_volt() + val = cmd_analog_in_volt(1,0) + cmd_analog_out_volt(1,6,val) +endfunction diff --git a/tests/unit_tests/testArduino/blink_13.sci b/tests/unit_tests/testArduino/blink_13.sci new file mode 100644 index 0000000..37dc93f --- /dev/null +++ b/tests/unit_tests/testArduino/blink_13.sci @@ -0,0 +1,6 @@ +function blink_13() + cmd_digital_out(1,13,1) //--To turn on the LED on pin no. 13 + sleep(1000) //---delay of 1 second + cmd_digital_out(1,13,0) //--To turn on the LED off pin no. 13 + sleep(1000) //---delay of 1 second +endfunction diff --git a/tests/unit_tests/testArduino/board_test_release2.sci b/tests/unit_tests/testArduino/board_test_release2.sci new file mode 100644 index 0000000..fd21cff --- /dev/null +++ b/tests/unit_tests/testArduino/board_test_release2.sci @@ -0,0 +1,11 @@ +function board_test_release2() + cmd_dcmotor_setup(1,3,1,9,10) + cmd_dcmotor_run(1,1,255) + sleep(3000) + cmd_dcmotor_release(1,1) + sleep(3000) + cmd_dcmotor_run(1,1,-255) + sleep(3000) + cmd_dcmotor_release(1,1) + sleep(3000) +endfunction diff --git a/tests/unit_tests/testArduino/digital_in_check.sci b/tests/unit_tests/testArduino/digital_in_check.sci new file mode 100644 index 0000000..4dfbeb6 --- /dev/null +++ b/tests/unit_tests/testArduino/digital_in_check.sci @@ -0,0 +1,10 @@ +function digital_in_check() + a=cmd_digital_in(1,7) + if a==1 then + cmd_digital_out(1,13,1) + cmd_digital_out(1,9,0) + else + cmd_digital_out(1,9,1) + cmd_digital_out(1,13,0) + end +endfunction diff --git a/tests/unit_tests/testArduino/i2c_master.sci b/tests/unit_tests/testArduino/i2c_master.sci new file mode 100644 index 0000000..2636185 --- /dev/null +++ b/tests/unit_tests/testArduino/i2c_master.sci @@ -0,0 +1,9 @@ +function i2c_master()
+
+ dev1 = cmd_i2c_dev(1);
+ cmd_i2c_write(dev1,10);
+ sleep(1000);
+ cmd_i2c_write(dev1,9);
+ sleep(1000);
+
+endfunction
|