diff options
author | SudhakarKuma | 2021-04-26 08:26:53 +0530 |
---|---|---|
committer | SudhakarKuma | 2021-04-26 08:26:53 +0530 |
commit | 6d839351e833ba404bdb18a02120a86471d25be9 (patch) | |
tree | b1c563da9bd03120b849a3e19acffe247611353d | |
parent | d9915b85a59e887299f4245da4c50e1a6a47b631 (diff) | |
download | FLOSS-Arduino-Book-6d839351e833ba404bdb18a02120a86471d25be9.tar.gz FLOSS-Arduino-Book-6d839351e833ba404bdb18a02120a86471d25be9.tar.bz2 FLOSS-Arduino-Book-6d839351e833ba404bdb18a02120a86471d25be9.zip |
Update the code
-rw-r--r-- | floss-arduino.OpenModelicad | 12 | ||||
-rw-r--r-- | floss-arduino.ard | 12 | ||||
-rw-r--r-- | floss-arduino.aux | 770 | ||||
-rw-r--r-- | floss-arduino.cod | 12 | ||||
-rw-r--r-- | floss-arduino.fdb_latexmk | 164 | ||||
-rw-r--r-- | floss-arduino.fls | 192 | ||||
-rw-r--r-- | floss-arduino.idx | 10 | ||||
-rw-r--r-- | floss-arduino.ind | 10 | ||||
-rw-r--r-- | floss-arduino.juliad | 12 | ||||
-rw-r--r-- | floss-arduino.lof | 46 | ||||
-rw-r--r-- | floss-arduino.log | 2358 | ||||
-rw-r--r-- | floss-arduino.lot | 16 | ||||
-rw-r--r-- | floss-arduino.pdf | bin | 26605982 -> 26607709 bytes | |||
-rw-r--r-- | floss-arduino.pyd | 12 | ||||
-rw-r--r-- | floss-arduino.synctex.gz | bin | 2594277 -> 0 bytes | |||
-rw-r--r-- | floss-arduino.tex | 8 | ||||
-rw-r--r-- | floss-arduino.thm | 70 | ||||
-rw-r--r-- | floss-arduino.toc | 116 | ||||
-rw-r--r-- | tools/julia/ArduinoTools.jl | 189 | ||||
-rw-r--r-- | tools/julia/test_firmware.jl | 12 | ||||
-rw-r--r-- | tools/linux/help/en_US/master_help.xml | 75 | ||||
-rw-r--r-- | tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS | bin | 2988 -> 0 bytes | |||
-rw-r--r-- | tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB | 1 | ||||
-rw-r--r-- | tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS | bin | 135 -> 0 bytes | |||
-rw-r--r-- | tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA | 2 | ||||
-rw-r--r-- | tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP | bin | 10240 -> 0 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Arduino.mo | 1775 | ||||
-rw-r--r-- | tools/openmodelica/linux/Instructions.txt | 14 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both | bin | 0 -> 24150 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both.hex | 121 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both_main.c | 217 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock | bin | 0 -> 22099 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock.hex | 101 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock_main.c | 213 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop | bin | 0 -> 25914 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop.hex | 135 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop_main.c | 217 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_both.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_clock.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_loop.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/ldr/ldr_led | bin | 0 -> 23828 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/ldr/ldr_led.hex | 120 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/ldr/ldr_led.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/ldr/ldr_led.sh~ | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/ldr/ldr_led_main.c | 243 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/ldr/ldr_read.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/ldr/ldr_read.sh~ | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_led.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_led.mos~ | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_read.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_read.mos~ | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/MDD_led_blink.hex | 114 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/MDD_led_blue.hex | 93 | ||||
-rwxr-xr-x | tools/openmodelica/linux/MDD_build/led/MDD_traffic_light | bin | 0 -> 4744 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/MDD_traffic_light.hex | 95 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blink | bin | 0 -> 23721 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blink.hex | 114 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blink.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blink_main.c | 212 | ||||
-rwxr-xr-x | tools/openmodelica/linux/MDD_build/led/led_blue | bin | 0 -> 4700 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue.hex | 91 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue_delay | bin | 0 -> 22109 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue_delay.hex | 100 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue_delay.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue_delay_main.c | 212 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue_main.c | 212 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue_new.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue_new.sh~ | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue_red | bin | 0 -> 22185 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue_red.hex | 106 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue_red.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_blue_red_main.c | 215 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_green_blink | bin | 0 -> 25497 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_green_blink.hex | 127 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_green_blink.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/led_green_blink_main.c | 212 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/runMDD_led_blink.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/runMDD_led_blink.mos~ | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/runMDD_led_blue.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/runMDD_led_blue.mos~ | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/runMDD_led_blue_delay.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/runMDD_led_blue_red.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/runMDD_led_green_blink.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/runMDD_traffic_light.mos | 13 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/runMDD_traffic_light.mos~ | 13 | ||||
-rwxr-xr-x | tools/openmodelica/linux/MDD_build/led/traffic_light | bin | 0 -> 4720 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/led/traffic_light_main.c | 212 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/pot/pot_threshold | bin | 0 -> 24823 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/pot/pot_threshold.hex | 157 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/pot/pot_threshold.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/pot/pot_threshold.sh~ | 63 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/pot/pot_threshold_main.c | 274 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/pot/runMDD_pot_threshold.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/pot/runMDD_pot_threshold.mos~ | 14 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/led_push_button | bin | 0 -> 21155 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/led_push_button.hex | 94 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/led_push_button.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/led_push_button.sh~ | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/led_push_button_main.c | 235 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/led_push_test.hex | 64 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/led_push_test_main.c | 198 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/led_test | bin | 0 -> 20465 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/output.txt | 0 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/pushTest1.mo | 26 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/pushTest1.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/pushTest1.sh~ | 0 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/push_button_status | bin | 0 -> 21092 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/push_button_status.hex | 91 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/push_button_status.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/push_button_status_main.c | 219 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/runMDD_led_push_button.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/runMDD_led_push_button.mos~ | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/runMDD_push_button_status.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/push/runMDD_push_button_status.mos~ | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/runMDD_servo_init.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/runMDD_servo_loop.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/runMDD_servo_pot.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/runMDD_servo_reverse.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_init | bin | 0 -> 21112 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_init.hex | 94 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_init.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_init_main.c | 213 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_loop.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_loop_main.c | 235 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_pot.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_pot_main.c | 244 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_reverse | bin | 0 -> 22099 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_reverse.hex | 101 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_reverse.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/servo/servo_reverse_main.c | 213 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/thermistor/runMDD_therm_buzzer.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/thermistor/runMDD_therm_read.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer | bin | 0 -> 23856 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer.hex | 121 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer_main.c | 253 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/thermistor/therm_read | bin | 0 -> 22935 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/thermistor/therm_read.hex | 110 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/thermistor/therm_read.sh | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/MDD_build/thermistor/therm_read_main.c | 226 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/Images/Icons/tqfp32.png | bin | 0 -> 11905 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Include/analog.h | 2 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/Include/analogv.h | 2 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/Include/dcmotor.h | 3 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/Include/digital.h | 2 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/Include/encoder.h | 1 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/Include/ieeesingle2num.h | 3 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/Include/modbus.h | 4 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/Include/serial.h | 28 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/Include/servomotor.h | 3 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/cmd_analog.o | bin | 0 -> 3112 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/cmd_analog_volt.o | bin | 0 -> 3576 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/cmd_digital.o | bin | 0 -> 3144 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/dcmotor.o | bin | 0 -> 5104 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/delay.o | bin | 0 -> 1424 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/ieeesingle2num.o | bin | 0 -> 3080 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/libAnalog.so | bin | 0 -> 13306 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/libAnalogv.so | bin | 0 -> 13373 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/libDCMotor.so | bin | 0 -> 13300 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/libDigital.so | bin | 0 -> 13222 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/libModbus.so | bin | 0 -> 17600 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/libSerialComm.so | bin | 0 -> 12924 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/libServoMotor.so | bin | 0 -> 13297 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/libdelay.so | bin | 0 -> 7909 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/libfloor.so | bin | 0 -> 7897 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/mfloor.o | bin | 0 -> 1432 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/modbus.o | bin | 0 -> 10152 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/serialComm.o | bin | 0 -> 4664 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/Library/servomotor.o | bin | 0 -> 3432 bytes | |||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/cmd_analog.c | 61 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/cmd_analog_volt.c | 63 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/cmd_digital.c | 63 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/cmd_encoder_init.c | 39 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/dcmotor.c | 117 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/delay.c | 10 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/ieeesingle2num.c | 87 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/mfloor.c | 6 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/modbus.c | 449 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/serialComm.c | 156 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/serialComm.c~ | 156 | ||||
-rw-r--r-- | tools/openmodelica/linux/Resources/src/servomotor.c | 87 | ||||
-rw-r--r-- | tools/openmodelica/linux/_gitignore | 37 | ||||
-rw-r--r-- | tools/openmodelica/linux/test_firmware.mo | 20 | ||||
-rw-r--r-- | tools/openmodelica/test_firmware.mo | 20 | ||||
-rw-r--r-- | tools/openmodelica/windows/Arduino.mo | 1783 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both | bin | 0 -> 10112 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both.hex | 121 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both_main.c | 217 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock | bin | 0 -> 9328 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock.hex | 94 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock_main.c | 213 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_loop_main.c | 235 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_both.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_clock.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_loop.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/ldr/MDD_ldr | bin | 0 -> 9368 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led | bin | 0 -> 9900 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led.hex | 120 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led_main.c | 243 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read | bin | 0 -> 9676 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read.hex | 110 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read_main.c | 226 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/ldr/run_ldr_led.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/ldr/run_ldr_read.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blink | bin | 0 -> 9876 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blink.hex | 114 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blink_main.c | 253 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blue | bin | 0 -> 9280 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blue.hex | 91 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay | bin | 0 -> 9608 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay.hex | 100 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay_main.c | 212 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blue_main.c | 212 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red | bin | 0 -> 9688 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red.hex | 106 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red_main.c | 215 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_green_bink | bin | 0 -> 10188 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink | bin | 0 -> 10188 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink.hex | 127 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink_main.c | 212 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/run_led_blink.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/run_led_blue.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/run_led_blue_delay.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/run_led_blue_red.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/led/run_led_green_blink.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold | bin | 0 -> 10348 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold.hex | 147 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold_main.c | 264 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/pot/run_pot_threshold.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/push/MDD_led_push_button | bin | 0 -> 9360 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/push/MDD_led_push_button.hex | 94 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/push/MDD_led_push_button_main.c | 234 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/push/run_led_push_button.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/push/run_led_push_button_status.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/runMDDAvr.mos | 8 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer | bin | 0 -> 9936 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer.hex | 121 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer_main.c | 253 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/thermistor/run_therm_buzzer.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/MDD_build/thermistor/run_therm_read.mos | 11 | ||||
-rw-r--r-- | tools/openmodelica/windows/Resources/Images/Icons/tqfp32.png | bin | 0 -> 11905 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/Resources/Library/SerialComm.dll | bin | 0 -> 270139 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/Resources/Library/SerialComm.o | bin | 0 -> 16527 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/Resources/include/serial.h | 34 | ||||
-rw-r--r-- | tools/openmodelica/windows/Resources/src/SerialComm.c | 1021 | ||||
-rw-r--r-- | tools/openmodelica/windows/SerialComm.dll | bin | 0 -> 270139 bytes | |||
-rw-r--r-- | tools/openmodelica/windows/test_firmware.mo | 20 | ||||
-rw-r--r-- | tools/openmodelica/windows/tools/arduino-firmware/arduino-firmware.ino | 795 | ||||
-rw-r--r-- | tools/python/Arduino/Arduino.py | 331 | ||||
-rw-r--r-- | tools/python/Arduino/__init__.py | 0 | ||||
-rw-r--r-- | tools/python/Arduino/__pycache__/Arduino.cpython-36.pyc | bin | 0 -> 10056 bytes | |||
-rw-r--r-- | tools/python/Arduino/__pycache__/Arduino.cpython-38.pyc | bin | 0 -> 9946 bytes | |||
-rw-r--r-- | tools/python/Arduino/__pycache__/__init__.cpython-36.pyc | bin | 0 -> 153 bytes | |||
-rw-r--r-- | tools/python/Arduino/__pycache__/__init__.cpython-38.pyc | bin | 0 -> 160 bytes | |||
-rw-r--r-- | tools/python/test_firmware.py (renamed from user-code/led/python/test_firmware.py) | 0 | ||||
-rw-r--r-- | tools/scilab/arduino-firmware/arduino-firmware.ino | 794 | ||||
-rw-r--r-- | tools/scilab/linux/DESCRIPTION (renamed from tools/linux/DESCRIPTION) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/VERSION (renamed from tools/linux/VERSION) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/builder.sce (renamed from tools/linux/builder.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/cleaner.sce (renamed from tools/linux/cleaner.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/analog_read.dem.sce (renamed from tools/linux/demos/analog_read.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/analog_write.dem.sce (renamed from tools/linux/demos/analog_write.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/arduino.dem.gateway.sce (renamed from tools/linux/demos/arduino.dem.gateway.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/arduino2.dem.sce (renamed from tools/linux/demos/arduino2.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/arduino3.dem.sce (renamed from tools/linux/demos/arduino3.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/arduino4.dem.sce (renamed from tools/linux/demos/arduino4.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/arduino5.dem.sce (renamed from tools/linux/demos/arduino5.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/arduino7.dem.sce (renamed from tools/linux/demos/arduino7.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/arduino8.dem.sce (renamed from tools/linux/demos/arduino8.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/arduino9.dem.sce (renamed from tools/linux/demos/arduino9.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/asserv.dem.sce (renamed from tools/linux/demos/asserv.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/clignotement_led.dem.sce (renamed from tools/linux/demos/clignotement_led.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/digital_read_write.dem.sce (renamed from tools/linux/demos/digital_read_write.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/encodeur.dem.sce (renamed from tools/linux/demos/encodeur.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/exemples_livret.dem.gateway.sce (renamed from tools/linux/demos/exemples_livret.dem.gateway.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/interrupt_compteur.dem.sce (renamed from tools/linux/demos/interrupt_compteur.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/motor.dem.sce (renamed from tools/linux/demos/motor.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/demos/servomotor.dem.sce (renamed from tools/linux/demos/servomotor.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/etc/arduino.quit (renamed from tools/linux/etc/arduino.quit) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/etc/arduino.start (renamed from tools/linux/etc/arduino.start) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/examples/Arduino1.zcos (renamed from tools/linux/examples/Arduino1.zcos) | bin | 4903 -> 4903 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/Arduino2.zcos (renamed from tools/linux/examples/Arduino2.zcos) | bin | 4300 -> 4300 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/Arduino3.zcos (renamed from tools/linux/examples/Arduino3.zcos) | bin | 5122 -> 5122 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/Arduino4.zcos (renamed from tools/linux/examples/Arduino4.zcos) | bin | 3705 -> 3705 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/Arduino5.zcos (renamed from tools/linux/examples/Arduino5.zcos) | bin | 4381 -> 4381 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/Arduino6.zcos (renamed from tools/linux/examples/Arduino6.zcos) | bin | 5665 -> 5665 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/Arduino7.zcos (renamed from tools/linux/examples/Arduino7.zcos) | bin | 6263 -> 6263 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/Arduino8.zcos (renamed from tools/linux/examples/Arduino8.zcos) | bin | 6573 -> 6573 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/Arduino9.zcos (renamed from tools/linux/examples/Arduino9.zcos) | bin | 8653 -> 8653 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/asservissement.zcos (renamed from tools/linux/examples/asservissement.zcos) | bin | 8271 -> 8271 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/asservpos.zcos (renamed from tools/linux/examples/asservpos.zcos) | bin | 8452 -> 8452 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/boutonpoussoir.zcos (renamed from tools/linux/examples/boutonpoussoir.zcos) | bin | 3928 -> 3928 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/encodeur.zcos (renamed from tools/linux/examples/encodeur.zcos) | bin | 6293 -> 6293 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/interrupt_compteur.zcos (renamed from tools/linux/examples/interrupt_compteur.zcos) | bin | 3735 -> 3735 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/moteurBO.zcos (renamed from tools/linux/examples/moteurBO.zcos) | bin | 5788 -> 5788 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/potentiometre.zcos (renamed from tools/linux/examples/potentiometre.zcos) | bin | 4383 -> 4383 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/servomoteur.zcos (renamed from tools/linux/examples/servomoteur.zcos) | bin | 4384 -> 4384 bytes | |||
-rw-r--r-- | tools/scilab/linux/examples/variateurLED.zcos (renamed from tools/linux/examples/variateurLED.zcos) | bin | 4422 -> 4422 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/builder_help.sce (renamed from tools/linux/help/builder_help.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/ANALOG_READ_SB.xml (renamed from tools/linux/help/en_US/ANALOG_READ_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/ANALOG_READ_SB_dialogbox.png (renamed from tools/linux/help/en_US/ANALOG_READ_SB_dialogbox.png) | bin | 3735 -> 3735 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/ANALOG_READ_SB_help.tst (renamed from tools/linux/help/en_US/ANALOG_READ_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/ANALOG_READ_example.png (renamed from tools/linux/help/en_US/ANALOG_READ_example.png) | bin | 8842 -> 8842 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/ANALOG_WRITE_SB.xml (renamed from tools/linux/help/en_US/ANALOG_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/ANALOG_WRITE_SB_dialogbox.png (renamed from tools/linux/help/en_US/ANALOG_WRITE_SB_dialogbox.png) | bin | 3996 -> 3996 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/ANALOG_WRITE_SB_help.tst (renamed from tools/linux/help/en_US/ANALOG_WRITE_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/ANALOG_WRITE_exemple.png (renamed from tools/linux/help/en_US/ANALOG_WRITE_exemple.png) | bin | 16337 -> 16337 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/ARDUINO_SETUP.xml (renamed from tools/linux/help/en_US/ARDUINO_SETUP.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/ARDUINO_SETUP_dialogbox.png (renamed from tools/linux/help/en_US/ARDUINO_SETUP_dialogbox.png) | bin | 6352 -> 6352 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/ARDUINO_SETUP_example.png (renamed from tools/linux/help/en_US/ARDUINO_SETUP_example.png) | bin | 37200 -> 37200 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/ARDUINO_SETUP_help.tst (renamed from tools/linux/help/en_US/ARDUINO_SETUP_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/ASSERV_POS_exemple.png (renamed from tools/linux/help/en_US/ASSERV_POS_exemple.png) | bin | 14663 -> 14663 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/DCMOTOR_SB.tst (renamed from tools/linux/help/en_US/DCMOTOR_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/DCMOTOR_SB.xml (renamed from tools/linux/help/en_US/DCMOTOR_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox1.png (renamed from tools/linux/help/en_US/DCMOTOR_SB_dialogbox1.png) | bin | 8011 -> 8011 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox2.png (renamed from tools/linux/help/en_US/DCMOTOR_SB_dialogbox2.png) | bin | 4745 -> 4745 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox3.png (renamed from tools/linux/help/en_US/DCMOTOR_SB_dialogbox3.png) | bin | 6841 -> 6841 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox4.png (renamed from tools/linux/help/en_US/DCMOTOR_SB_dialogbox4.png) | bin | 6955 -> 6955 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/DCMOTOR_exemple.png (renamed from tools/linux/help/en_US/DCMOTOR_exemple.png) | bin | 28033 -> 28033 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/DIGITAL_READ_SB.xml (renamed from tools/linux/help/en_US/DIGITAL_READ_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/DIGITAL_READ_SB_dialogbox.png (renamed from tools/linux/help/en_US/DIGITAL_READ_SB_dialogbox.png) | bin | 3787 -> 3787 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/DIGITAL_READ_SB_help.tst (renamed from tools/linux/help/en_US/DIGITAL_READ_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/DIGITAL_WRITE_SB.xml (renamed from tools/linux/help/en_US/DIGITAL_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/DIGITAL_WRITE_SB_dialogbox.png (renamed from tools/linux/help/en_US/DIGITAL_WRITE_SB_dialogbox.png) | bin | 3827 -> 3827 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/DIGITAL_WRITE_SB_help.tst (renamed from tools/linux/help/en_US/DIGITAL_WRITE_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/DIGITAL_exemple.png (renamed from tools/linux/help/en_US/DIGITAL_exemple.png) | bin | 12382 -> 12382 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/ENCODER_SB.tst (renamed from tools/linux/help/en_US/ENCODER_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/ENCODER_SB.xml (renamed from tools/linux/help/en_US/ENCODER_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/ENCODER_SB_dialogbox1.png (renamed from tools/linux/help/en_US/ENCODER_SB_dialogbox1.png) | bin | 3947 -> 3947 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/ENCODER_SB_dialogbox2.png (renamed from tools/linux/help/en_US/ENCODER_SB_dialogbox2.png) | bin | 4425 -> 4425 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/ENCODER_exemple.png (renamed from tools/linux/help/en_US/ENCODER_exemple.png) | bin | 26523 -> 26523 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/INTERRUPT_SB.tst (renamed from tools/linux/help/en_US/INTERRUPT_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/INTERRUPT_SB.xml (renamed from tools/linux/help/en_US/INTERRUPT_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/INTERRUPT_SB_dialogbox.png (renamed from tools/linux/help/en_US/INTERRUPT_SB_dialogbox.png) | bin | 3915 -> 3915 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/INTERRUPT_exemple.png (renamed from tools/linux/help/en_US/INTERRUPT_exemple.png) | bin | 8993 -> 8993 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/SERVO_SB.tst (renamed from tools/linux/help/en_US/SERVO_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/SERVO_SB_dialogbox.png (renamed from tools/linux/help/en_US/SERVO_SB_dialogbox.png) | bin | 5293 -> 5293 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/SERVO_SB_exemple.png (renamed from tools/linux/help/en_US/SERVO_SB_exemple.png) | bin | 17128 -> 17128 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/SERVO_WRITE_SB.xml (renamed from tools/linux/help/en_US/SERVO_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/TIME_SAMPLE.xml (renamed from tools/linux/help/en_US/TIME_SAMPLE.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/TIME_SAMPLE_dialogbox.png (renamed from tools/linux/help/en_US/TIME_SAMPLE_dialogbox.png) | bin | 6481 -> 6481 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/TIME_SAMPLE_help.tst (renamed from tools/linux/help/en_US/TIME_SAMPLE_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/build_help.sce (renamed from tools/linux/help/en_US/build_help.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/close_serial.xml (renamed from tools/linux/help/en_US/close_serial.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_analog_in.tst (renamed from tools/linux/help/en_US/cmd_analog_in.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_analog_in.xml (renamed from tools/linux/help/en_US/cmd_analog_in.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_analog_in_volt.xml (renamed from tools/linux/help/en_US/cmd_analog_in_volt.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_analog_out.xml (renamed from tools/linux/help/en_US/cmd_analog_out.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_analog_out_volt.xml (renamed from tools/linux/help/en_US/cmd_analog_out_volt.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_arduino_a_control.xml (renamed from tools/linux/help/en_US/cmd_arduino_a_control.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_arduino_d_control.xml (renamed from tools/linux/help/en_US/cmd_arduino_d_control.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_arduino_meter.xml (renamed from tools/linux/help/en_US/cmd_arduino_meter.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_dcmotor_release.xml (renamed from tools/linux/help/en_US/cmd_dcmotor_release.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_dcmotor_run.xml (renamed from tools/linux/help/en_US/cmd_dcmotor_run.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_dcmotor_setup.xml (renamed from tools/linux/help/en_US/cmd_dcmotor_setup.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_digital_in.xml (renamed from tools/linux/help/en_US/cmd_digital_in.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_digital_out.xml (renamed from tools/linux/help/en_US/cmd_digital_out.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_servo_attach.xml (renamed from tools/linux/help/en_US/cmd_servo_attach.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_servo_detach.xml (renamed from tools/linux/help/en_US/cmd_servo_detach.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/cmd_servo_move.xml (renamed from tools/linux/help/en_US/cmd_servo_move.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/master_help.xml | 75 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/open_serial.xml (renamed from tools/linux/help/en_US/open_serial.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/read_file_doc.sci (renamed from tools/linux/help/en_US/read_file_doc.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/read_file_doc2.sci (renamed from tools/linux/help/en_US/read_file_doc2.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif (renamed from tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif) | bin | 2782 -> 2782 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html (renamed from tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html) | 10 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png) | bin | 3735 -> 3735 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_example.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_example.png) | bin | 8842 -> 8842 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif (renamed from tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif) | bin | 2800 -> 2800 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html (renamed from tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png) | bin | 3996 -> 3996 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png) | bin | 16337 -> 16337 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif (renamed from tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif) | bin | 2370 -> 2370 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html (renamed from tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png) | bin | 6352 -> 6352 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png) | bin | 37200 -> 37200 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png) | bin | 14663 -> 14663 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif (renamed from tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif) | bin | 2469 -> 2469 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.html (renamed from tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png (renamed from tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png) | bin | 8011 -> 8011 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png (renamed from tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png) | bin | 4745 -> 4745 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png (renamed from tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png) | bin | 6841 -> 6841 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png (renamed from tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png) | bin | 6955 -> 6955 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png (renamed from tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png) | bin | 28033 -> 28033 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif (renamed from tools/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif) | bin | 2654 -> 2654 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html (renamed from tools/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png (renamed from tools/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png) | bin | 3787 -> 3787 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif (renamed from tools/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif) | bin | 2705 -> 2705 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html (renamed from tools/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png (renamed from tools/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png) | bin | 3827 -> 3827 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_exemple.png (renamed from tools/linux/help/en_US/scilab_en_US_help/DIGITAL_exemple.png) | bin | 12382 -> 12382 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB.gif (renamed from tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB.gif) | bin | 2329 -> 2329 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB.html (renamed from tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png) | bin | 3947 -> 3947 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png) | bin | 4425 -> 4425 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_exemple.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ENCODER_exemple.png) | bin | 26523 -> 26523 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif (renamed from tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif) | bin | 2432 -> 2432 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.html (renamed from tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png (renamed from tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png) | bin | 3915 -> 3915 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png (renamed from tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png) | bin | 8993 -> 8993 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS | bin | 0 -> 3038 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB | 3 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS | bin | 0 -> 139 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS (renamed from tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS) | bin | 16344 -> 16903 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA | 2 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP | bin | 0 -> 10240 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png (renamed from tools/linux/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png) | bin | 5293 -> 5293 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png (renamed from tools/linux/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png) | bin | 17128 -> 17128 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif (renamed from tools/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif) | bin | 2438 -> 2438 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html (renamed from tools/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabCaution.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ScilabCaution.png) | bin | 603 -> 603 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabEdit.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ScilabEdit.png) | bin | 574 -> 574 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabExecute.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ScilabExecute.png) | bin | 660 -> 660 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabImportant.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ScilabImportant.png) | bin | 717 -> 717 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabNote.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ScilabNote.png) | bin | 863 -> 863 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabTip.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ScilabTip.png) | bin | 863 -> 863 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabWarning.png (renamed from tools/linux/help/en_US/scilab_en_US_help/ScilabWarning.png) | bin | 603 -> 603 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif (renamed from tools/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif) | bin | 1603 -> 1603 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.html (renamed from tools/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png (renamed from tools/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png) | bin | 6481 -> 6481 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/c_code.css (renamed from tools/linux/help/en_US/scilab_en_US_help/c_code.css) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/close_serial.html (renamed from tools/linux/help/en_US/scilab_en_US_help/close_serial.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_in.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_analog_in.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_out.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_analog_out.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_arduino_meter.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_arduino_meter.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_digital_in.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_digital_in.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_digital_out.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_digital_out.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_servo_attach.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_servo_attach.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_servo_detach.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_servo_detach.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_servo_move.html (renamed from tools/linux/help/en_US/scilab_en_US_help/cmd_servo_move.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/index.html (renamed from tools/linux/help/en_US/scilab_en_US_help/index.html) | 2 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/jhelpidx.xml (renamed from tools/linux/help/en_US/scilab_en_US_help/jhelpidx.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/jhelpmap.jhm (renamed from tools/linux/help/en_US/scilab_en_US_help/jhelpmap.jhm) | 2 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/jhelpset.hs (renamed from tools/linux/help/en_US/scilab_en_US_help/jhelpset.hs) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/jhelptoc.xml (renamed from tools/linux/help/en_US/scilab_en_US_help/jhelptoc.xml) | 2 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/open_serial.html (renamed from tools/linux/help/en_US/scilab_en_US_help/open_serial.html) | 6 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/scilab_code.css (renamed from tools/linux/help/en_US/scilab_en_US_help/scilab_code.css) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/section_0065f243e2d913ab014332454f9a0ca0.html (renamed from tools/linux/help/en_US/scilab_en_US_help/section_14b1867c218d6510dbcc5160f5def719.html) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/section_14b1867c218d6510dbcc5160f5def719.html (renamed from tools/linux/help/en_US/scilab_en_US_help/section_281a422ce6f3febcfc8c21e8aa6841e5.html) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/section_281a422ce6f3febcfc8c21e8aa6841e5.html (renamed from tools/linux/help/en_US/scilab_en_US_help/section_31b851c5cd4247a8b1d03294fc8872b1.html) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/section_31b851c5cd4247a8b1d03294fc8872b1.html (renamed from tools/linux/help/en_US/scilab_en_US_help/section_32282c1b5ec2ec16458d86fa5a7a4571.html) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/section_32282c1b5ec2ec16458d86fa5a7a4571.html (renamed from tools/linux/help/en_US/scilab_en_US_help/section_50fcf9fc9c8fb380e36d21e077a34f37.html) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/section_50fcf9fc9c8fb380e36d21e077a34f37.html (renamed from tools/linux/help/en_US/scilab_en_US_help/section_b8a7072c46d32c1ee288fe3b9d921bcb.html) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/section_b8a7072c46d32c1ee288fe3b9d921bcb.html (renamed from tools/linux/help/en_US/scilab_en_US_help/section_c81b4a57f4486e50a533732328fcb8e9.html) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/section_c81b4a57f4486e50a533732328fcb8e9.html (renamed from tools/linux/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html (renamed from tools/windows/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html (renamed from tools/linux/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/style.css (renamed from tools/linux/help/en_US/scilab_en_US_help/style.css) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/en_US/scilab_en_US_help/xml_code.css (renamed from tools/linux/help/en_US/scilab_en_US_help/xml_code.css) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ANALOG_READ_SB.xml (renamed from tools/linux/help/fr_En/ANALOG_READ_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ANALOG_READ_SB_dialogbox.png (renamed from tools/linux/help/fr_En/ANALOG_READ_SB_dialogbox.png) | bin | 3735 -> 3735 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ANALOG_READ_SB_help.tst (renamed from tools/linux/help/fr_En/ANALOG_READ_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ANALOG_READ_example.png (renamed from tools/linux/help/fr_En/ANALOG_READ_example.png) | bin | 8842 -> 8842 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ANALOG_WRITE_SB.xml (renamed from tools/linux/help/fr_En/ANALOG_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ANALOG_WRITE_SB_dialogbox.png (renamed from tools/linux/help/fr_En/ANALOG_WRITE_SB_dialogbox.png) | bin | 3996 -> 3996 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ANALOG_WRITE_SB_help.tst (renamed from tools/linux/help/fr_En/ANALOG_WRITE_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ANALOG_WRITE_exemple.png (renamed from tools/linux/help/fr_En/ANALOG_WRITE_exemple.png) | bin | 16337 -> 16337 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ARDUINO_SETUP.xml (renamed from tools/linux/help/fr_En/ARDUINO_SETUP.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ARDUINO_SETUP_dialogbox.png (renamed from tools/linux/help/fr_En/ARDUINO_SETUP_dialogbox.png) | bin | 6352 -> 6352 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ARDUINO_SETUP_example.png (renamed from tools/linux/help/fr_En/ARDUINO_SETUP_example.png) | bin | 37200 -> 37200 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ARDUINO_SETUP_help.tst (renamed from tools/linux/help/fr_En/ARDUINO_SETUP_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ASSERV_POS_exemple.png (renamed from tools/linux/help/fr_En/ASSERV_POS_exemple.png) | bin | 14663 -> 14663 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DCMOTOR_SB.tst (renamed from tools/linux/help/fr_En/DCMOTOR_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DCMOTOR_SB.xml (renamed from tools/linux/help/fr_En/DCMOTOR_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox1.png (renamed from tools/linux/help/fr_En/DCMOTOR_SB_dialogbox1.png) | bin | 8011 -> 8011 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox2.png (renamed from tools/linux/help/fr_En/DCMOTOR_SB_dialogbox2.png) | bin | 4745 -> 4745 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox3.png (renamed from tools/linux/help/fr_En/DCMOTOR_SB_dialogbox3.png) | bin | 6841 -> 6841 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox4.png (renamed from tools/linux/help/fr_En/DCMOTOR_SB_dialogbox4.png) | bin | 6955 -> 6955 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DCMOTOR_exemple.png (renamed from tools/linux/help/fr_En/DCMOTOR_exemple.png) | bin | 28033 -> 28033 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DIGITAL_READ_SB.xml (renamed from tools/linux/help/fr_En/DIGITAL_READ_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DIGITAL_READ_SB_dialogbox.png (renamed from tools/linux/help/fr_En/DIGITAL_READ_SB_dialogbox.png) | bin | 3787 -> 3787 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DIGITAL_READ_SB_help.tst (renamed from tools/linux/help/fr_En/DIGITAL_READ_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DIGITAL_WRITE_SB.xml (renamed from tools/linux/help/fr_En/DIGITAL_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png (renamed from tools/linux/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png) | bin | 3827 -> 3827 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DIGITAL_WRITE_SB_help.tst (renamed from tools/linux/help/fr_En/DIGITAL_WRITE_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/DIGITAL_exemple.png (renamed from tools/linux/help/fr_En/DIGITAL_exemple.png) | bin | 12382 -> 12382 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ENCODER_SB.tst (renamed from tools/linux/help/fr_En/ENCODER_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ENCODER_SB.xml (renamed from tools/linux/help/fr_En/ENCODER_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ENCODER_SB_dialogbox1.png (renamed from tools/linux/help/fr_En/ENCODER_SB_dialogbox1.png) | bin | 3947 -> 3947 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ENCODER_SB_dialogbox2.png (renamed from tools/linux/help/fr_En/ENCODER_SB_dialogbox2.png) | bin | 4425 -> 4425 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/ENCODER_exemple.png (renamed from tools/linux/help/fr_En/ENCODER_exemple.png) | bin | 26523 -> 26523 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/INTERRUPT_SB.tst (renamed from tools/linux/help/fr_En/INTERRUPT_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/INTERRUPT_SB.xml (renamed from tools/linux/help/fr_En/INTERRUPT_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/INTERRUPT_SB_dialogbox.png (renamed from tools/linux/help/fr_En/INTERRUPT_SB_dialogbox.png) | bin | 3915 -> 3915 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/INTERRUPT_exemple.png (renamed from tools/linux/help/fr_En/INTERRUPT_exemple.png) | bin | 8993 -> 8993 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/SERVO_SB.tst (renamed from tools/linux/help/fr_En/SERVO_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/SERVO_SB_dialogbox.png (renamed from tools/linux/help/fr_En/SERVO_SB_dialogbox.png) | bin | 5293 -> 5293 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/SERVO_SB_exemple.png (renamed from tools/linux/help/fr_En/SERVO_SB_exemple.png) | bin | 9439 -> 9439 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/SERVO_WRITE_SB.xml (renamed from tools/linux/help/fr_En/SERVO_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/TIME_SAMPLE.xml (renamed from tools/linux/help/fr_En/TIME_SAMPLE.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/TIME_SAMPLE_dialogbox.png (renamed from tools/linux/help/fr_En/TIME_SAMPLE_dialogbox.png) | bin | 6481 -> 6481 bytes | |||
-rw-r--r-- | tools/scilab/linux/help/fr_En/TIME_SAMPLE_help.tst (renamed from tools/linux/help/fr_En/TIME_SAMPLE_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/build_help.sce (renamed from tools/linux/help/fr_En/build_help.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/help/fr_En/read_file_doc.sci (renamed from tools/linux/help/fr_En/read_file_doc.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/gif/ANALOG_READ_SB.gif (renamed from tools/linux/images/gif/ANALOG_READ_SB.gif) | bin | 2782 -> 2782 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ANALOG_WRITE_SB.gif (renamed from tools/linux/images/gif/ANALOG_WRITE_SB.gif) | bin | 2800 -> 2800 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_ANALOG_READ.gif (renamed from tools/linux/images/gif/ARDUINO_ANALOG_READ.gif) | bin | 2118 -> 2118 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_ANALOG_WRITE.gif (renamed from tools/linux/images/gif/ARDUINO_ANALOG_WRITE.gif) | bin | 2142 -> 2142 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_DCMOTOR.gif (renamed from tools/linux/images/gif/ARDUINO_DCMOTOR.gif) | bin | 1917 -> 1917 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_DIGITAL_READ.gif (renamed from tools/linux/images/gif/ARDUINO_DIGITAL_READ.gif) | bin | 2026 -> 2026 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_DIGITAL_WRITE.gif (renamed from tools/linux/images/gif/ARDUINO_DIGITAL_WRITE.gif) | bin | 2048 -> 2048 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_ENCODER.gif (renamed from tools/linux/images/gif/ARDUINO_ENCODER.gif) | bin | 3967 -> 3967 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_INTERRUPT.gif (renamed from tools/linux/images/gif/ARDUINO_INTERRUPT.gif) | bin | 943 -> 943 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_SCOPE.gif (renamed from tools/linux/images/gif/ARDUINO_SCOPE.gif) | bin | 1866 -> 1866 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_SERVO_READ.gif (renamed from tools/linux/images/gif/ARDUINO_SERVO_READ.gif) | bin | 2064 -> 2064 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_SERVO_WRITE.gif (renamed from tools/linux/images/gif/ARDUINO_SERVO_WRITE.gif) | bin | 2517 -> 2517 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_SETUP.gif (renamed from tools/linux/images/gif/ARDUINO_SETUP.gif) | bin | 2370 -> 2370 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_STEPPER.gif (renamed from tools/linux/images/gif/ARDUINO_STEPPER.gif) | bin | 1991 -> 1991 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ARDUINO_WRITE.gif (renamed from tools/linux/images/gif/ARDUINO_WRITE.gif) | bin | 943 -> 943 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/DCMOTOR_SB.gif (renamed from tools/linux/images/gif/DCMOTOR_SB.gif) | bin | 2469 -> 2469 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/DIGITAL_READ_SB.gif (renamed from tools/linux/images/gif/DIGITAL_READ_SB.gif) | bin | 2654 -> 2654 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/DIGITAL_WRITE_SB.gif (renamed from tools/linux/images/gif/DIGITAL_WRITE_SB.gif) | bin | 2705 -> 2705 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/ENCODER_SB.gif (renamed from tools/linux/images/gif/ENCODER_SB.gif) | bin | 2329 -> 2329 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/INTERRUPT_SB.gif (renamed from tools/linux/images/gif/INTERRUPT_SB.gif) | bin | 2432 -> 2432 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/SERVO_READ_SB.gif (renamed from tools/linux/images/gif/SERVO_READ_SB.gif) | bin | 943 -> 943 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/SERVO_WRITE_SB.gif (renamed from tools/linux/images/gif/SERVO_WRITE_SB.gif) | bin | 2438 -> 2438 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/STEPPER_SB.gif (renamed from tools/linux/images/gif/STEPPER_SB.gif) | bin | 2446 -> 2446 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/gif/TIME_SAMPLE.gif (renamed from tools/linux/images/gif/TIME_SAMPLE.gif) | bin | 1603 -> 1603 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ANALOG_READ_SB.sod (renamed from tools/linux/images/h5/ANALOG_READ_SB.sod) | bin | 113296 -> 113296 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ANALOG_WRITE_SB.sod (renamed from tools/linux/images/h5/ANALOG_WRITE_SB.sod) | bin | 113296 -> 113296 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_ANALOG_READ.sod (renamed from tools/linux/images/h5/ARDUINO_ANALOG_READ.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_ANALOG_WRITE.sod (renamed from tools/linux/images/h5/ARDUINO_ANALOG_WRITE.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_DCMOTOR.sod (renamed from tools/linux/images/h5/ARDUINO_DCMOTOR.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_DIGITAL_READ.sod (renamed from tools/linux/images/h5/ARDUINO_DIGITAL_READ.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_DIGITAL_WRITE.sod (renamed from tools/linux/images/h5/ARDUINO_DIGITAL_WRITE.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_ENCODER.sod (renamed from tools/linux/images/h5/ARDUINO_ENCODER.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_INTERRUPT.sod (renamed from tools/linux/images/h5/ARDUINO_INTERRUPT.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_SCOPE.sod (renamed from tools/linux/images/h5/ARDUINO_SCOPE.sod) | bin | 141568 -> 141568 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_SERVO_READ.sod (renamed from tools/linux/images/h5/ARDUINO_SERVO_READ.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_SERVO_WRITE.sod (renamed from tools/linux/images/h5/ARDUINO_SERVO_WRITE.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_SETUP.sod (renamed from tools/linux/images/h5/ARDUINO_SETUP.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ARDUINO_STEPPER.sod (renamed from tools/linux/images/h5/ARDUINO_STEPPER.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/DCMOTOR_SB.sod (renamed from tools/linux/images/h5/DCMOTOR_SB.sod) | bin | 113392 -> 113392 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/DIGITAL_READ_SB.sod (renamed from tools/linux/images/h5/DIGITAL_READ_SB.sod) | bin | 113296 -> 113296 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/DIGITAL_WRITE_SB.sod (renamed from tools/linux/images/h5/DIGITAL_WRITE_SB.sod) | bin | 113296 -> 113296 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/ENCODER_SB.sod (renamed from tools/linux/images/h5/ENCODER_SB.sod) | bin | 113392 -> 113392 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/INTERRUPT_SB.sod (renamed from tools/linux/images/h5/INTERRUPT_SB.sod) | bin | 113296 -> 113296 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/SERVO_READ_SB.sod (renamed from tools/linux/images/h5/SERVO_READ_SB.sod) | bin | 113296 -> 113296 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/SERVO_WRITE_SB.sod (renamed from tools/linux/images/h5/SERVO_WRITE_SB.sod) | bin | 113296 -> 113296 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/STEPPER_SB.sod (renamed from tools/linux/images/h5/STEPPER_SB.sod) | bin | 113296 -> 113296 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/h5/TIME_SAMPLE.sod (renamed from tools/linux/images/h5/TIME_SAMPLE.sod) | bin | 33480 -> 33480 bytes | |||
-rw-r--r-- | tools/scilab/linux/images/svg/ANALOG_READ_SB.svg (renamed from tools/linux/images/svg/ANALOG_READ_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ANALOG_WRITE_SB.svg (renamed from tools/linux/images/svg/ANALOG_WRITE_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_ANALOG_READ.svg (renamed from tools/linux/images/svg/ARDUINO_ANALOG_READ.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_ANALOG_WRITE.svg (renamed from tools/linux/images/svg/ARDUINO_ANALOG_WRITE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_DCMOTOR.svg (renamed from tools/linux/images/svg/ARDUINO_DCMOTOR.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_DIGITAL_READ.svg (renamed from tools/linux/images/svg/ARDUINO_DIGITAL_READ.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_DIGITAL_WRITE.svg (renamed from tools/linux/images/svg/ARDUINO_DIGITAL_WRITE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_ENCODER.svg (renamed from tools/linux/images/svg/ARDUINO_ENCODER.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_INTERRUPT.svg (renamed from tools/linux/images/svg/ARDUINO_INTERRUPT.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_SCOPE.svg (renamed from tools/linux/images/svg/ARDUINO_SCOPE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_SERVO_READ.svg (renamed from tools/linux/images/svg/ARDUINO_SERVO_READ.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_SERVO_WRITE.svg (renamed from tools/linux/images/svg/ARDUINO_SERVO_WRITE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_SETUP.svg (renamed from tools/linux/images/svg/ARDUINO_SETUP.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_STEPPER.svg (renamed from tools/linux/images/svg/ARDUINO_STEPPER.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ARDUINO_WRITE.svg (renamed from tools/linux/images/svg/ARDUINO_WRITE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/DCMOTOR_SB.svg (renamed from tools/linux/images/svg/DCMOTOR_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/DIGITAL_READ_SB.svg (renamed from tools/linux/images/svg/DIGITAL_READ_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/DIGITAL_WRITE_SB.svg (renamed from tools/linux/images/svg/DIGITAL_WRITE_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/ENCODER_SB.svg (renamed from tools/linux/images/svg/ENCODER_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/INTERRUPT_SB.svg (renamed from tools/linux/images/svg/INTERRUPT_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/SERVO_READ_SB.svg (renamed from tools/linux/images/svg/SERVO_READ_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/SERVO_WRITE_SB.svg (renamed from tools/linux/images/svg/SERVO_WRITE_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/STEPPER_SB.svg (renamed from tools/linux/images/svg/STEPPER_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/images/svg/TIME_SAMPLE.svg (renamed from tools/linux/images/svg/TIME_SAMPLE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/jar/scilab_en_US_help.jar (renamed from tools/linux/jar/scilab_en_US_help.jar) | bin | 356952 -> 358615 bytes | |||
-rw-r--r-- | tools/scilab/linux/loader.sce (renamed from tools/linux/loader.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ANALOG_READ_SB.bin (renamed from tools/linux/macros/ANALOG_READ_SB.bin) | bin | 9808 -> 9808 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ANALOG_READ_SB.sci (renamed from tools/linux/macros/ANALOG_READ_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ANALOG_WRITE_SB.bin (renamed from tools/linux/macros/ANALOG_WRITE_SB.bin) | bin | 10164 -> 10164 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ANALOG_WRITE_SB.sci (renamed from tools/linux/macros/ANALOG_WRITE_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ANALOG_READ.bin (renamed from tools/linux/macros/ARDUINO_ANALOG_READ.bin) | bin | 7428 -> 7428 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ANALOG_READ.sci (renamed from tools/linux/macros/ARDUINO_ANALOG_READ.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ANALOG_READ_sim.bin (renamed from tools/linux/macros/ARDUINO_ANALOG_READ_sim.bin) | bin | 6248 -> 6248 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ANALOG_READ_sim.sci (renamed from tools/linux/macros/ARDUINO_ANALOG_READ_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE.bin (renamed from tools/linux/macros/ARDUINO_ANALOG_WRITE.bin) | bin | 7756 -> 7756 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE.sci (renamed from tools/linux/macros/ARDUINO_ANALOG_WRITE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE_sim.bin (renamed from tools/linux/macros/ARDUINO_ANALOG_WRITE_sim.bin) | bin | 6100 -> 6100 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE_sim.sci (renamed from tools/linux/macros/ARDUINO_ANALOG_WRITE_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DCMOTOR.bin (renamed from tools/linux/macros/ARDUINO_DCMOTOR.bin) | bin | 15220 -> 15220 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DCMOTOR.sci (renamed from tools/linux/macros/ARDUINO_DCMOTOR.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DCMOTOR_sim.bin (renamed from tools/linux/macros/ARDUINO_DCMOTOR_sim.bin) | bin | 15060 -> 15060 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DCMOTOR_sim.sci (renamed from tools/linux/macros/ARDUINO_DCMOTOR_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DIGITAL_READ.bin (renamed from tools/linux/macros/ARDUINO_DIGITAL_READ.bin) | bin | 7464 -> 7464 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DIGITAL_READ.sci (renamed from tools/linux/macros/ARDUINO_DIGITAL_READ.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DIGITAL_READ_sim.bin (renamed from tools/linux/macros/ARDUINO_DIGITAL_READ_sim.bin) | bin | 6424 -> 6424 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DIGITAL_READ_sim.sci (renamed from tools/linux/macros/ARDUINO_DIGITAL_READ_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DIGITAL_WRITE.bin (renamed from tools/linux/macros/ARDUINO_DIGITAL_WRITE.bin) | bin | 7460 -> 7460 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DIGITAL_WRITE.sci (renamed from tools/linux/macros/ARDUINO_DIGITAL_WRITE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DIG_WRITE_sim.bin (renamed from tools/linux/macros/ARDUINO_DIG_WRITE_sim.bin) | bin | 6088 -> 6088 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_DIG_WRITE_sim.sci (renamed from tools/linux/macros/ARDUINO_DIG_WRITE_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ENCODER.bin (renamed from tools/linux/macros/ARDUINO_ENCODER.bin) | bin | 13680 -> 13680 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ENCODER.sci (renamed from tools/linux/macros/ARDUINO_ENCODER.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ENCODER_sim.bin (renamed from tools/linux/macros/ARDUINO_ENCODER_sim.bin) | bin | 11392 -> 11392 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_ENCODER_sim.sci (renamed from tools/linux/macros/ARDUINO_ENCODER_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_INTERRUPT.bin (renamed from tools/linux/macros/ARDUINO_INTERRUPT.bin) | bin | 7196 -> 7196 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_INTERRUPT.sci (renamed from tools/linux/macros/ARDUINO_INTERRUPT.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_INTERRUPT_sim.bin (renamed from tools/linux/macros/ARDUINO_INTERRUPT_sim.bin) | bin | 6712 -> 6712 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_INTERRUPT_sim.sci (renamed from tools/linux/macros/ARDUINO_INTERRUPT_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_PMODHB5.bin (renamed from tools/linux/macros/ARDUINO_PMODHB5.bin) | bin | 9636 -> 9636 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_PMODHB5.sci (renamed from tools/linux/macros/ARDUINO_PMODHB5.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_PMODHB5_WRITE_sim.bin (renamed from tools/linux/macros/ARDUINO_PMODHB5_WRITE_sim.bin) | bin | 7140 -> 7140 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_PMODHB5_WRITE_sim.sci (renamed from tools/linux/macros/ARDUINO_PMODHB5_WRITE_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SCOPE.bin (renamed from tools/linux/macros/ARDUINO_SCOPE.bin) | bin | 17560 -> 17560 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SCOPE.sci (renamed from tools/linux/macros/ARDUINO_SCOPE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SERVO_READ.bin (renamed from tools/linux/macros/ARDUINO_SERVO_READ.bin) | bin | 7224 -> 7224 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SERVO_READ.sci (renamed from tools/linux/macros/ARDUINO_SERVO_READ.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SERVO_READ_sim.bin (renamed from tools/linux/macros/ARDUINO_SERVO_READ_sim.bin) | bin | 7064 -> 7064 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SERVO_READ_sim.sci (renamed from tools/linux/macros/ARDUINO_SERVO_READ_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SERVO_WRITE.bin (renamed from tools/linux/macros/ARDUINO_SERVO_WRITE.bin) | bin | 7196 -> 7196 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SERVO_WRITE.sci (renamed from tools/linux/macros/ARDUINO_SERVO_WRITE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SERVO_WRITE_sim.bin (renamed from tools/linux/macros/ARDUINO_SERVO_WRITE_sim.bin) | bin | 9088 -> 9088 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SERVO_WRITE_sim.sci (renamed from tools/linux/macros/ARDUINO_SERVO_WRITE_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SETUP.bin (renamed from tools/linux/macros/ARDUINO_SETUP.bin) | bin | 6856 -> 6856 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_SETUP.sci (renamed from tools/linux/macros/ARDUINO_SETUP.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_STEPPER.bin (renamed from tools/linux/macros/ARDUINO_STEPPER.bin) | bin | 7128 -> 7128 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_STEPPER.sci (renamed from tools/linux/macros/ARDUINO_STEPPER.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_STEPPER_sim.bin (renamed from tools/linux/macros/ARDUINO_STEPPER_sim.bin) | bin | 4380 -> 4380 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_STEPPER_sim.sci (renamed from tools/linux/macros/ARDUINO_STEPPER_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_WRITE.bin (renamed from tools/linux/macros/ARDUINO_WRITE.bin) | bin | 5584 -> 5584 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_WRITE.sci (renamed from tools/linux/macros/ARDUINO_WRITE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_WRITE_sim.bin (renamed from tools/linux/macros/ARDUINO_WRITE_sim.bin) | bin | 3956 -> 3956 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_WRITE_sim.sci (renamed from tools/linux/macros/ARDUINO_WRITE_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_post_simulate.bin (renamed from tools/linux/macros/ARDUINO_post_simulate.bin) | bin | 17268 -> 17268 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_post_simulate.sci (renamed from tools/linux/macros/ARDUINO_post_simulate.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_pre_simulate.bin (renamed from tools/linux/macros/ARDUINO_pre_simulate.bin) | bin | 20512 -> 20512 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ARDUINO_pre_simulate.sci (renamed from tools/linux/macros/ARDUINO_pre_simulate.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ArduinoUnoR3.png (renamed from tools/linux/macros/ArduinoUnoR3.png) | bin | 38607 -> 38607 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/Arduino_GUI.sce (renamed from tools/linux/macros/Arduino_GUI.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/DCMOTOR_SB.bin (renamed from tools/linux/macros/DCMOTOR_SB.bin) | bin | 16812 -> 16812 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/DCMOTOR_SB.sci (renamed from tools/linux/macros/DCMOTOR_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/DIGITAL_READ_SB.bin (renamed from tools/linux/macros/DIGITAL_READ_SB.bin) | bin | 10068 -> 10068 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/DIGITAL_READ_SB.sci (renamed from tools/linux/macros/DIGITAL_READ_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/DIGITAL_WRITE_SB.bin (renamed from tools/linux/macros/DIGITAL_WRITE_SB.bin) | bin | 10072 -> 10072 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/DIGITAL_WRITE_SB.sci (renamed from tools/linux/macros/DIGITAL_WRITE_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/ENCODER_SB.bin (renamed from tools/linux/macros/ENCODER_SB.bin) | bin | 16628 -> 16628 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/ENCODER_SB.sci (renamed from tools/linux/macros/ENCODER_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/INTERRUPT_SB.bin (renamed from tools/linux/macros/INTERRUPT_SB.bin) | bin | 9620 -> 9620 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/INTERRUPT_SB.sci (renamed from tools/linux/macros/INTERRUPT_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/SERVO_READ_SB.bin (renamed from tools/linux/macros/SERVO_READ_SB.bin) | bin | 9832 -> 9832 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/SERVO_READ_SB.sci (renamed from tools/linux/macros/SERVO_READ_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/SERVO_WRITE_SB.bin (renamed from tools/linux/macros/SERVO_WRITE_SB.bin) | bin | 9800 -> 9800 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/SERVO_WRITE_SB.sci (renamed from tools/linux/macros/SERVO_WRITE_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/STEPPER_SB.bin (renamed from tools/linux/macros/STEPPER_SB.bin) | bin | 9748 -> 9748 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/STEPPER_SB.sci (renamed from tools/linux/macros/STEPPER_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/TIME_SAMPLE.bin (renamed from tools/linux/macros/TIME_SAMPLE.bin) | bin | 7128 -> 7128 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/TIME_SAMPLE.sci (renamed from tools/linux/macros/TIME_SAMPLE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/buildmacros.sce (renamed from tools/linux/macros/buildmacros.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/close_serial.bin (renamed from tools/linux/macros/close_serial.bin) | bin | 2860 -> 2860 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/close_serial.sci (renamed from tools/linux/macros/close_serial.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_analog_in.bin (renamed from tools/linux/macros/cmd_analog_in.bin) | bin | 4908 -> 4908 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_analog_in.sci (renamed from tools/linux/macros/cmd_analog_in.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_analog_in_volt.bin (renamed from tools/linux/macros/cmd_analog_in_volt.bin) | bin | 5340 -> 5340 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_analog_in_volt.sci (renamed from tools/linux/macros/cmd_analog_in_volt.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_analog_out.bin (renamed from tools/linux/macros/cmd_analog_out.bin) | bin | 6872 -> 6872 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_analog_out.sci (renamed from tools/linux/macros/cmd_analog_out.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_analog_out_volt.bin (renamed from tools/linux/macros/cmd_analog_out_volt.bin) | bin | 5732 -> 5732 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_analog_out_volt.sci (renamed from tools/linux/macros/cmd_analog_out_volt.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_arduino_a_control.bin (renamed from tools/linux/macros/cmd_arduino_a_control.bin) | bin | 9756 -> 9756 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_arduino_a_control.sci (renamed from tools/linux/macros/cmd_arduino_a_control.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_arduino_d_control.bin (renamed from tools/linux/macros/cmd_arduino_d_control.bin) | bin | 11096 -> 11096 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_arduino_d_control.sci (renamed from tools/linux/macros/cmd_arduino_d_control.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_arduino_meter.bin (renamed from tools/linux/macros/cmd_arduino_meter.bin) | bin | 9348 -> 9348 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_arduino_meter.sci (renamed from tools/linux/macros/cmd_arduino_meter.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_dcmotor_release.bin (renamed from tools/linux/macros/cmd_dcmotor_release.bin) | bin | 5908 -> 5908 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_dcmotor_release.sci (renamed from tools/linux/macros/cmd_dcmotor_release.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_dcmotor_run.bin (renamed from tools/linux/macros/cmd_dcmotor_run.bin) | bin | 6884 -> 6884 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_dcmotor_run.sci (renamed from tools/linux/macros/cmd_dcmotor_run.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_dcmotor_setup.bin (renamed from tools/linux/macros/cmd_dcmotor_setup.bin) | bin | 10144 -> 10144 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_dcmotor_setup.sci (renamed from tools/linux/macros/cmd_dcmotor_setup.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_digital_in.bin (renamed from tools/linux/macros/cmd_digital_in.bin) | bin | 7160 -> 7160 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_digital_in.sci (renamed from tools/linux/macros/cmd_digital_in.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_digital_out.bin (renamed from tools/linux/macros/cmd_digital_out.bin) | bin | 8624 -> 8624 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_digital_out.sci (renamed from tools/linux/macros/cmd_digital_out.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_encoder_init.bin (renamed from tools/linux/macros/cmd_encoder_init.bin) | bin | 4508 -> 4508 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_encoder_init.sci (renamed from tools/linux/macros/cmd_encoder_init.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_servo_attach.bin (renamed from tools/linux/macros/cmd_servo_attach.bin) | bin | 8188 -> 8188 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_servo_attach.sci (renamed from tools/linux/macros/cmd_servo_attach.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_servo_detach.bin (renamed from tools/linux/macros/cmd_servo_detach.bin) | bin | 8104 -> 8104 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_servo_detach.sci (renamed from tools/linux/macros/cmd_servo_detach.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/cmd_servo_move.bin (renamed from tools/linux/macros/cmd_servo_move.bin) | bin | 8492 -> 8492 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/cmd_servo_move.sci (renamed from tools/linux/macros/cmd_servo_move.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/genhelpscript.sce (renamed from tools/linux/macros/genhelpscript.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/getArduinoVersion.bin (renamed from tools/linux/macros/getArduinoVersion.bin) | bin | 144 -> 144 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/getArduinoVersion.sci (renamed from tools/linux/macros/getArduinoVersion.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/init_arduino.bin (renamed from tools/linux/macros/init_arduino.bin) | bin | 20688 -> 20688 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/init_arduino.sci (renamed from tools/linux/macros/init_arduino.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/lib (renamed from tools/linux/macros/lib) | bin | 2080 -> 2080 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/names (renamed from tools/linux/macros/names) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/nicescope.bin (renamed from tools/linux/macros/nicescope.bin) | bin | 12292 -> 12292 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/nicescope.sci (renamed from tools/linux/macros/nicescope.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/open_serial.bin (renamed from tools/linux/macros/open_serial.bin) | bin | 3492 -> 3492 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/open_serial.sci (renamed from tools/linux/macros/open_serial.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/post_xcos_simulate.bin (renamed from tools/linux/macros/post_xcos_simulate.bin) | bin | 11168 -> 11168 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/post_xcos_simulate.sci (renamed from tools/linux/macros/post_xcos_simulate.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/pre_xcos_simulate.bin (renamed from tools/linux/macros/pre_xcos_simulate.bin) | bin | 13600 -> 13600 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/pre_xcos_simulate.sci (renamed from tools/linux/macros/pre_xcos_simulate.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/read_serial.bin (renamed from tools/linux/macros/read_serial.bin) | bin | 508 -> 508 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/read_serial.sci (renamed from tools/linux/macros/read_serial.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/status_serial.bin (renamed from tools/linux/macros/status_serial.bin) | bin | 640 -> 640 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/status_serial.sci (renamed from tools/linux/macros/status_serial.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/tkscaleblk.bin (renamed from tools/linux/macros/tkscaleblk.bin) | bin | 9328 -> 9328 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/tkscaleblk.sci (renamed from tools/linux/macros/tkscaleblk.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/macros/write_serial.bin (renamed from tools/linux/macros/write_serial.bin) | bin | 572 -> 572 bytes | |||
-rw-r--r-- | tools/scilab/linux/macros/write_serial.sci (renamed from tools/linux/macros/write_serial.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/linux/unloader.sce (renamed from tools/linux/unloader.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/test_firmware.sce (renamed from tools/test_firmware.sce) | 4 | ||||
-rw-r--r-- | tools/scilab/windows/DESCRIPTION (renamed from tools/windows/DESCRIPTION) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/VERSION (renamed from tools/windows/VERSION) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/builder.sce (renamed from tools/windows/builder.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/cleaner.sce (renamed from tools/windows/cleaner.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/analog_read.dem.sce (renamed from tools/windows/demos/analog_read.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/analog_write.dem.sce (renamed from tools/windows/demos/analog_write.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/arduino.dem.gateway.sce (renamed from tools/windows/demos/arduino.dem.gateway.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/arduino2.dem.sce (renamed from tools/windows/demos/arduino2.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/arduino3.dem.sce (renamed from tools/windows/demos/arduino3.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/arduino4.dem.sce (renamed from tools/windows/demos/arduino4.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/arduino5.dem.sce (renamed from tools/windows/demos/arduino5.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/arduino7.dem.sce (renamed from tools/windows/demos/arduino7.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/arduino8.dem.sce (renamed from tools/windows/demos/arduino8.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/arduino9.dem.sce (renamed from tools/windows/demos/arduino9.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/asserv.dem.sce (renamed from tools/windows/demos/asserv.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/clignotement_led.dem.sce (renamed from tools/windows/demos/clignotement_led.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/digital_read_write.dem.sce (renamed from tools/windows/demos/digital_read_write.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/encodeur.dem.sce (renamed from tools/windows/demos/encodeur.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/exemples_livret.dem.gateway.sce (renamed from tools/windows/demos/exemples_livret.dem.gateway.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/interrupt_compteur.dem.sce (renamed from tools/windows/demos/interrupt_compteur.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/motor.dem.sce (renamed from tools/windows/demos/motor.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/demos/servomotor.dem.sce (renamed from tools/windows/demos/servomotor.dem.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/etc/arduino.quit (renamed from tools/windows/etc/arduino.quit) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/etc/arduino.start (renamed from tools/windows/etc/arduino.start) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/examples/Arduino1.zcos (renamed from tools/windows/examples/Arduino1.zcos) | bin | 4903 -> 4903 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/Arduino2.zcos (renamed from tools/windows/examples/Arduino2.zcos) | bin | 4300 -> 4300 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/Arduino3.zcos (renamed from tools/windows/examples/Arduino3.zcos) | bin | 5122 -> 5122 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/Arduino4.zcos (renamed from tools/windows/examples/Arduino4.zcos) | bin | 3705 -> 3705 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/Arduino5.zcos (renamed from tools/windows/examples/Arduino5.zcos) | bin | 4381 -> 4381 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/Arduino6.zcos (renamed from tools/windows/examples/Arduino6.zcos) | bin | 5665 -> 5665 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/Arduino7.zcos (renamed from tools/windows/examples/Arduino7.zcos) | bin | 6263 -> 6263 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/Arduino8.zcos (renamed from tools/windows/examples/Arduino8.zcos) | bin | 6573 -> 6573 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/Arduino9.zcos (renamed from tools/windows/examples/Arduino9.zcos) | bin | 8653 -> 8653 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/asservissement.zcos (renamed from tools/windows/examples/asservissement.zcos) | bin | 8271 -> 8271 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/asservpos.zcos (renamed from tools/windows/examples/asservpos.zcos) | bin | 8452 -> 8452 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/boutonpoussoir.zcos (renamed from tools/windows/examples/boutonpoussoir.zcos) | bin | 3928 -> 3928 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/encodeur.zcos (renamed from tools/windows/examples/encodeur.zcos) | bin | 6293 -> 6293 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/interrupt_compteur.zcos (renamed from tools/windows/examples/interrupt_compteur.zcos) | bin | 3735 -> 3735 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/moteurBO.zcos (renamed from tools/windows/examples/moteurBO.zcos) | bin | 5788 -> 5788 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/potentiometre.zcos (renamed from tools/windows/examples/potentiometre.zcos) | bin | 4383 -> 4383 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/servomoteur.zcos (renamed from tools/windows/examples/servomoteur.zcos) | bin | 4384 -> 4384 bytes | |||
-rw-r--r-- | tools/scilab/windows/examples/variateurLED.zcos (renamed from tools/windows/examples/variateurLED.zcos) | bin | 4422 -> 4422 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/builder_help.sce (renamed from tools/windows/help/builder_help.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/ANALOG_READ_SB.xml (renamed from tools/windows/help/en_US/ANALOG_READ_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/ANALOG_READ_SB_dialogbox.png (renamed from tools/windows/help/en_US/ANALOG_READ_SB_dialogbox.png) | bin | 3735 -> 3735 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/ANALOG_READ_SB_help.tst (renamed from tools/windows/help/en_US/ANALOG_READ_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/ANALOG_READ_example.png (renamed from tools/windows/help/en_US/ANALOG_READ_example.png) | bin | 8842 -> 8842 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/ANALOG_WRITE_SB.xml (renamed from tools/windows/help/en_US/ANALOG_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/ANALOG_WRITE_SB_dialogbox.png (renamed from tools/windows/help/en_US/ANALOG_WRITE_SB_dialogbox.png) | bin | 3996 -> 3996 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/ANALOG_WRITE_SB_help.tst (renamed from tools/windows/help/en_US/ANALOG_WRITE_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/ANALOG_WRITE_exemple.png (renamed from tools/windows/help/en_US/ANALOG_WRITE_exemple.png) | bin | 16337 -> 16337 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/ARDUINO_SETUP.xml (renamed from tools/windows/help/en_US/ARDUINO_SETUP.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/ARDUINO_SETUP_dialogbox.png (renamed from tools/windows/help/en_US/ARDUINO_SETUP_dialogbox.png) | bin | 6352 -> 6352 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/ARDUINO_SETUP_example.png (renamed from tools/windows/help/en_US/ARDUINO_SETUP_example.png) | bin | 37200 -> 37200 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/ARDUINO_SETUP_help.tst (renamed from tools/windows/help/en_US/ARDUINO_SETUP_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/ASSERV_POS_exemple.png (renamed from tools/windows/help/en_US/ASSERV_POS_exemple.png) | bin | 14663 -> 14663 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/DCMOTOR_SB.tst (renamed from tools/windows/help/en_US/DCMOTOR_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/DCMOTOR_SB.xml (renamed from tools/windows/help/en_US/DCMOTOR_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox1.png (renamed from tools/windows/help/en_US/DCMOTOR_SB_dialogbox1.png) | bin | 8011 -> 8011 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox2.png (renamed from tools/windows/help/en_US/DCMOTOR_SB_dialogbox2.png) | bin | 4745 -> 4745 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox3.png (renamed from tools/windows/help/en_US/DCMOTOR_SB_dialogbox3.png) | bin | 6841 -> 6841 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox4.png (renamed from tools/windows/help/en_US/DCMOTOR_SB_dialogbox4.png) | bin | 6955 -> 6955 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/DCMOTOR_exemple.png (renamed from tools/windows/help/en_US/DCMOTOR_exemple.png) | bin | 28033 -> 28033 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/DIGITAL_READ_SB.xml (renamed from tools/windows/help/en_US/DIGITAL_READ_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/DIGITAL_READ_SB_dialogbox.png (renamed from tools/windows/help/en_US/DIGITAL_READ_SB_dialogbox.png) | bin | 3787 -> 3787 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/DIGITAL_READ_SB_help.tst (renamed from tools/windows/help/en_US/DIGITAL_READ_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/DIGITAL_WRITE_SB.xml (renamed from tools/windows/help/en_US/DIGITAL_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/DIGITAL_WRITE_SB_dialogbox.png (renamed from tools/windows/help/en_US/DIGITAL_WRITE_SB_dialogbox.png) | bin | 3827 -> 3827 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/DIGITAL_WRITE_SB_help.tst (renamed from tools/windows/help/en_US/DIGITAL_WRITE_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/DIGITAL_exemple.png (renamed from tools/windows/help/en_US/DIGITAL_exemple.png) | bin | 12382 -> 12382 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/ENCODER_SB.tst (renamed from tools/windows/help/en_US/ENCODER_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/ENCODER_SB.xml (renamed from tools/windows/help/en_US/ENCODER_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/ENCODER_SB_dialogbox1.png (renamed from tools/windows/help/en_US/ENCODER_SB_dialogbox1.png) | bin | 3947 -> 3947 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/ENCODER_SB_dialogbox2.png (renamed from tools/windows/help/en_US/ENCODER_SB_dialogbox2.png) | bin | 4425 -> 4425 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/ENCODER_exemple.png (renamed from tools/windows/help/en_US/ENCODER_exemple.png) | bin | 26523 -> 26523 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/INTERRUPT_SB.tst (renamed from tools/windows/help/en_US/INTERRUPT_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/INTERRUPT_SB.xml (renamed from tools/windows/help/en_US/INTERRUPT_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/INTERRUPT_SB_dialogbox.png (renamed from tools/windows/help/en_US/INTERRUPT_SB_dialogbox.png) | bin | 3915 -> 3915 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/INTERRUPT_exemple.png (renamed from tools/windows/help/en_US/INTERRUPT_exemple.png) | bin | 8993 -> 8993 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/SERVO_SB.tst (renamed from tools/windows/help/en_US/SERVO_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/SERVO_SB_dialogbox.png (renamed from tools/windows/help/en_US/SERVO_SB_dialogbox.png) | bin | 5293 -> 5293 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/SERVO_SB_exemple.png (renamed from tools/windows/help/en_US/SERVO_SB_exemple.png) | bin | 17128 -> 17128 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/SERVO_WRITE_SB.xml (renamed from tools/windows/help/en_US/SERVO_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/TIME_SAMPLE.xml (renamed from tools/windows/help/en_US/TIME_SAMPLE.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/TIME_SAMPLE_dialogbox.png (renamed from tools/windows/help/en_US/TIME_SAMPLE_dialogbox.png) | bin | 6481 -> 6481 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/TIME_SAMPLE_help.tst (renamed from tools/windows/help/en_US/TIME_SAMPLE_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/build_help.sce (renamed from tools/windows/help/en_US/build_help.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/close_serial.xml (renamed from tools/windows/help/en_US/close_serial.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_analog_in.tst (renamed from tools/windows/help/en_US/cmd_analog_in.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_analog_in.xml (renamed from tools/windows/help/en_US/cmd_analog_in.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_analog_in_volt.xml (renamed from tools/windows/help/en_US/cmd_analog_in_volt.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_analog_out.xml (renamed from tools/windows/help/en_US/cmd_analog_out.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_analog_out_volt.xml (renamed from tools/windows/help/en_US/cmd_analog_out_volt.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_arduino_a_control.xml (renamed from tools/windows/help/en_US/cmd_arduino_a_control.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_arduino_d_control.xml (renamed from tools/windows/help/en_US/cmd_arduino_d_control.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_arduino_meter.xml (renamed from tools/windows/help/en_US/cmd_arduino_meter.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_dcmotor_release.xml (renamed from tools/windows/help/en_US/cmd_dcmotor_release.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_dcmotor_run.xml (renamed from tools/windows/help/en_US/cmd_dcmotor_run.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_dcmotor_setup.xml (renamed from tools/windows/help/en_US/cmd_dcmotor_setup.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_digital_in.xml (renamed from tools/windows/help/en_US/cmd_digital_in.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_digital_out.xml (renamed from tools/windows/help/en_US/cmd_digital_out.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_servo_attach.xml (renamed from tools/windows/help/en_US/cmd_servo_attach.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_servo_detach.xml (renamed from tools/windows/help/en_US/cmd_servo_detach.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/cmd_servo_move.xml (renamed from tools/windows/help/en_US/cmd_servo_move.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/master_help.xml (renamed from tools/windows/help/en_US/master_help.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/open_serial.xml (renamed from tools/windows/help/en_US/open_serial.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/read_file_doc.sci (renamed from tools/windows/help/en_US/read_file_doc.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/read_file_doc2.sci (renamed from tools/windows/help/en_US/read_file_doc2.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif (renamed from tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif) | bin | 2782 -> 2782 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html (renamed from tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png) | bin | 3735 -> 3735 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_example.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_example.png) | bin | 8842 -> 8842 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif (renamed from tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif) | bin | 2800 -> 2800 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html (renamed from tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png) | bin | 3996 -> 3996 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png) | bin | 16337 -> 16337 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif (renamed from tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif) | bin | 2370 -> 2370 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html (renamed from tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png) | bin | 6352 -> 6352 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png) | bin | 37200 -> 37200 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png) | bin | 14663 -> 14663 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif (renamed from tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif) | bin | 2469 -> 2469 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.html (renamed from tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png (renamed from tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png) | bin | 8011 -> 8011 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png (renamed from tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png) | bin | 4745 -> 4745 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png (renamed from tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png) | bin | 6841 -> 6841 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png (renamed from tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png) | bin | 6955 -> 6955 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png (renamed from tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png) | bin | 28033 -> 28033 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif (renamed from tools/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif) | bin | 2654 -> 2654 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html (renamed from tools/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png (renamed from tools/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png) | bin | 3787 -> 3787 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif (renamed from tools/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif) | bin | 2705 -> 2705 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html (renamed from tools/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png (renamed from tools/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png) | bin | 3827 -> 3827 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_exemple.png (renamed from tools/windows/help/en_US/scilab_en_US_help/DIGITAL_exemple.png) | bin | 12382 -> 12382 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB.gif (renamed from tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB.gif) | bin | 2329 -> 2329 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB.html (renamed from tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png) | bin | 3947 -> 3947 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png) | bin | 4425 -> 4425 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_exemple.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ENCODER_exemple.png) | bin | 26523 -> 26523 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif (renamed from tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif) | bin | 2432 -> 2432 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.html (renamed from tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png (renamed from tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png) | bin | 3915 -> 3915 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png (renamed from tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png) | bin | 8993 -> 8993 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS (renamed from tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS) | bin | 2769 -> 2769 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB (renamed from tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS (renamed from tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS (renamed from tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS) | bin | 13159 -> 13159 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA (renamed from tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP (renamed from tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP) | bin | 10240 -> 10240 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png (renamed from tools/windows/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png) | bin | 5293 -> 5293 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png (renamed from tools/windows/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png) | bin | 17128 -> 17128 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif (renamed from tools/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif) | bin | 2438 -> 2438 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html (renamed from tools/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabCaution.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ScilabCaution.png) | bin | 603 -> 603 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabEdit.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ScilabEdit.png) | bin | 574 -> 574 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabExecute.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ScilabExecute.png) | bin | 660 -> 660 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabImportant.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ScilabImportant.png) | bin | 717 -> 717 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabNote.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ScilabNote.png) | bin | 863 -> 863 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabTip.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ScilabTip.png) | bin | 863 -> 863 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabWarning.png (renamed from tools/windows/help/en_US/scilab_en_US_help/ScilabWarning.png) | bin | 603 -> 603 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif (renamed from tools/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif) | bin | 1603 -> 1603 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.html (renamed from tools/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png (renamed from tools/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png) | bin | 6481 -> 6481 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/c_code.css (renamed from tools/windows/help/en_US/scilab_en_US_help/c_code.css) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/close_serial.html (renamed from tools/windows/help/en_US/scilab_en_US_help/close_serial.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_in.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_analog_in.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_out.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_analog_out.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_arduino_meter.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_arduino_meter.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_digital_in.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_digital_in.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_digital_out.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_digital_out.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_servo_attach.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_servo_attach.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_servo_detach.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_servo_detach.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_servo_move.html (renamed from tools/windows/help/en_US/scilab_en_US_help/cmd_servo_move.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/index.html (renamed from tools/windows/help/en_US/scilab_en_US_help/index.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/jhelpidx.xml (renamed from tools/windows/help/en_US/scilab_en_US_help/jhelpidx.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/jhelpmap.jhm (renamed from tools/windows/help/en_US/scilab_en_US_help/jhelpmap.jhm) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/jhelpset.hs (renamed from tools/windows/help/en_US/scilab_en_US_help/jhelpset.hs) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/jhelptoc.xml (renamed from tools/windows/help/en_US/scilab_en_US_help/jhelptoc.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/open_serial.html (renamed from tools/windows/help/en_US/scilab_en_US_help/open_serial.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/scilab_code.css (renamed from tools/windows/help/en_US/scilab_en_US_help/scilab_code.css) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/section_147efb2e6adc067fcd27975e0e16385a.html (renamed from tools/windows/help/en_US/scilab_en_US_help/section_147efb2e6adc067fcd27975e0e16385a.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html | 184 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html (renamed from tools/windows/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/style.css (renamed from tools/windows/help/en_US/scilab_en_US_help/style.css) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/en_US/scilab_en_US_help/xml_code.css (renamed from tools/windows/help/en_US/scilab_en_US_help/xml_code.css) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ANALOG_READ_SB.xml (renamed from tools/windows/help/fr_En/ANALOG_READ_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ANALOG_READ_SB_dialogbox.png (renamed from tools/windows/help/fr_En/ANALOG_READ_SB_dialogbox.png) | bin | 3735 -> 3735 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ANALOG_READ_SB_help.tst (renamed from tools/windows/help/fr_En/ANALOG_READ_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ANALOG_READ_example.png (renamed from tools/windows/help/fr_En/ANALOG_READ_example.png) | bin | 8842 -> 8842 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ANALOG_WRITE_SB.xml (renamed from tools/windows/help/fr_En/ANALOG_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ANALOG_WRITE_SB_dialogbox.png (renamed from tools/windows/help/fr_En/ANALOG_WRITE_SB_dialogbox.png) | bin | 3996 -> 3996 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ANALOG_WRITE_SB_help.tst (renamed from tools/windows/help/fr_En/ANALOG_WRITE_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ANALOG_WRITE_exemple.png (renamed from tools/windows/help/fr_En/ANALOG_WRITE_exemple.png) | bin | 16337 -> 16337 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ARDUINO_SETUP.xml (renamed from tools/windows/help/fr_En/ARDUINO_SETUP.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ARDUINO_SETUP_dialogbox.png (renamed from tools/windows/help/fr_En/ARDUINO_SETUP_dialogbox.png) | bin | 6352 -> 6352 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ARDUINO_SETUP_example.png (renamed from tools/windows/help/fr_En/ARDUINO_SETUP_example.png) | bin | 37200 -> 37200 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ARDUINO_SETUP_help.tst (renamed from tools/windows/help/fr_En/ARDUINO_SETUP_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ASSERV_POS_exemple.png (renamed from tools/windows/help/fr_En/ASSERV_POS_exemple.png) | bin | 14663 -> 14663 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DCMOTOR_SB.tst (renamed from tools/windows/help/fr_En/DCMOTOR_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DCMOTOR_SB.xml (renamed from tools/windows/help/fr_En/DCMOTOR_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox1.png (renamed from tools/windows/help/fr_En/DCMOTOR_SB_dialogbox1.png) | bin | 8011 -> 8011 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox2.png (renamed from tools/windows/help/fr_En/DCMOTOR_SB_dialogbox2.png) | bin | 4745 -> 4745 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox3.png (renamed from tools/windows/help/fr_En/DCMOTOR_SB_dialogbox3.png) | bin | 6841 -> 6841 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox4.png (renamed from tools/windows/help/fr_En/DCMOTOR_SB_dialogbox4.png) | bin | 6955 -> 6955 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DCMOTOR_exemple.png (renamed from tools/windows/help/fr_En/DCMOTOR_exemple.png) | bin | 28033 -> 28033 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DIGITAL_READ_SB.xml (renamed from tools/windows/help/fr_En/DIGITAL_READ_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DIGITAL_READ_SB_dialogbox.png (renamed from tools/windows/help/fr_En/DIGITAL_READ_SB_dialogbox.png) | bin | 3787 -> 3787 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DIGITAL_READ_SB_help.tst (renamed from tools/windows/help/fr_En/DIGITAL_READ_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DIGITAL_WRITE_SB.xml (renamed from tools/windows/help/fr_En/DIGITAL_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png (renamed from tools/windows/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png) | bin | 3827 -> 3827 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DIGITAL_WRITE_SB_help.tst (renamed from tools/windows/help/fr_En/DIGITAL_WRITE_SB_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/DIGITAL_exemple.png (renamed from tools/windows/help/fr_En/DIGITAL_exemple.png) | bin | 12382 -> 12382 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ENCODER_SB.tst (renamed from tools/windows/help/fr_En/ENCODER_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ENCODER_SB.xml (renamed from tools/windows/help/fr_En/ENCODER_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ENCODER_SB_dialogbox1.png (renamed from tools/windows/help/fr_En/ENCODER_SB_dialogbox1.png) | bin | 3947 -> 3947 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ENCODER_SB_dialogbox2.png (renamed from tools/windows/help/fr_En/ENCODER_SB_dialogbox2.png) | bin | 4425 -> 4425 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/ENCODER_exemple.png (renamed from tools/windows/help/fr_En/ENCODER_exemple.png) | bin | 26523 -> 26523 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/INTERRUPT_SB.tst (renamed from tools/windows/help/fr_En/INTERRUPT_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/INTERRUPT_SB.xml (renamed from tools/windows/help/fr_En/INTERRUPT_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/INTERRUPT_SB_dialogbox.png (renamed from tools/windows/help/fr_En/INTERRUPT_SB_dialogbox.png) | bin | 3915 -> 3915 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/INTERRUPT_exemple.png (renamed from tools/windows/help/fr_En/INTERRUPT_exemple.png) | bin | 8993 -> 8993 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/SERVO_SB.tst (renamed from tools/windows/help/fr_En/SERVO_SB.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/SERVO_SB_dialogbox.png (renamed from tools/windows/help/fr_En/SERVO_SB_dialogbox.png) | bin | 5293 -> 5293 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/SERVO_SB_exemple.png (renamed from tools/windows/help/fr_En/SERVO_SB_exemple.png) | bin | 9439 -> 9439 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/SERVO_WRITE_SB.xml (renamed from tools/windows/help/fr_En/SERVO_WRITE_SB.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/TIME_SAMPLE.xml (renamed from tools/windows/help/fr_En/TIME_SAMPLE.xml) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/TIME_SAMPLE_dialogbox.png (renamed from tools/windows/help/fr_En/TIME_SAMPLE_dialogbox.png) | bin | 6481 -> 6481 bytes | |||
-rw-r--r-- | tools/scilab/windows/help/fr_En/TIME_SAMPLE_help.tst (renamed from tools/windows/help/fr_En/TIME_SAMPLE_help.tst) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/build_help.sce (renamed from tools/windows/help/fr_En/build_help.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/help/fr_En/read_file_doc.sci (renamed from tools/windows/help/fr_En/read_file_doc.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/gif/ANALOG_READ_SB.gif (renamed from tools/windows/images/gif/ANALOG_READ_SB.gif) | bin | 2782 -> 2782 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ANALOG_WRITE_SB.gif (renamed from tools/windows/images/gif/ANALOG_WRITE_SB.gif) | bin | 2800 -> 2800 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_ANALOG_READ.gif (renamed from tools/windows/images/gif/ARDUINO_ANALOG_READ.gif) | bin | 2118 -> 2118 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_ANALOG_WRITE.gif (renamed from tools/windows/images/gif/ARDUINO_ANALOG_WRITE.gif) | bin | 2142 -> 2142 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_DCMOTOR.gif (renamed from tools/windows/images/gif/ARDUINO_DCMOTOR.gif) | bin | 1917 -> 1917 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_DIGITAL_READ.gif (renamed from tools/windows/images/gif/ARDUINO_DIGITAL_READ.gif) | bin | 2026 -> 2026 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_DIGITAL_WRITE.gif (renamed from tools/windows/images/gif/ARDUINO_DIGITAL_WRITE.gif) | bin | 2048 -> 2048 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_ENCODER.gif (renamed from tools/windows/images/gif/ARDUINO_ENCODER.gif) | bin | 3967 -> 3967 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_INTERRUPT.gif (renamed from tools/windows/images/gif/ARDUINO_INTERRUPT.gif) | bin | 943 -> 943 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_SCOPE.gif (renamed from tools/windows/images/gif/ARDUINO_SCOPE.gif) | bin | 1866 -> 1866 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_SERVO_READ.gif (renamed from tools/windows/images/gif/ARDUINO_SERVO_READ.gif) | bin | 2064 -> 2064 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_SERVO_WRITE.gif (renamed from tools/windows/images/gif/ARDUINO_SERVO_WRITE.gif) | bin | 2517 -> 2517 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_SETUP.gif (renamed from tools/windows/images/gif/ARDUINO_SETUP.gif) | bin | 2370 -> 2370 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_STEPPER.gif (renamed from tools/windows/images/gif/ARDUINO_STEPPER.gif) | bin | 1991 -> 1991 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ARDUINO_WRITE.gif (renamed from tools/windows/images/gif/ARDUINO_WRITE.gif) | bin | 943 -> 943 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/DCMOTOR_SB.gif (renamed from tools/windows/images/gif/DCMOTOR_SB.gif) | bin | 2469 -> 2469 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/DIGITAL_READ_SB.gif (renamed from tools/windows/images/gif/DIGITAL_READ_SB.gif) | bin | 2654 -> 2654 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/DIGITAL_WRITE_SB.gif (renamed from tools/windows/images/gif/DIGITAL_WRITE_SB.gif) | bin | 2705 -> 2705 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/ENCODER_SB.gif (renamed from tools/windows/images/gif/ENCODER_SB.gif) | bin | 2329 -> 2329 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/INTERRUPT_SB.gif (renamed from tools/windows/images/gif/INTERRUPT_SB.gif) | bin | 2432 -> 2432 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/SERVO_READ_SB.gif (renamed from tools/windows/images/gif/SERVO_READ_SB.gif) | bin | 943 -> 943 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/SERVO_WRITE_SB.gif (renamed from tools/windows/images/gif/SERVO_WRITE_SB.gif) | bin | 2438 -> 2438 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/STEPPER_SB.gif (renamed from tools/windows/images/gif/STEPPER_SB.gif) | bin | 2446 -> 2446 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/gif/TIME_SAMPLE.gif (renamed from tools/windows/images/gif/TIME_SAMPLE.gif) | bin | 1603 -> 1603 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ANALOG_READ_SB.sod (renamed from tools/windows/images/h5/ANALOG_READ_SB.sod) | bin | 114880 -> 114880 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ANALOG_WRITE_SB.sod (renamed from tools/windows/images/h5/ANALOG_WRITE_SB.sod) | bin | 114880 -> 114880 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_ANALOG_READ.sod (renamed from tools/windows/images/h5/ARDUINO_ANALOG_READ.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_ANALOG_WRITE.sod (renamed from tools/windows/images/h5/ARDUINO_ANALOG_WRITE.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_DCMOTOR.sod (renamed from tools/windows/images/h5/ARDUINO_DCMOTOR.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_DIGITAL_READ.sod (renamed from tools/windows/images/h5/ARDUINO_DIGITAL_READ.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_DIGITAL_WRITE.sod (renamed from tools/windows/images/h5/ARDUINO_DIGITAL_WRITE.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_ENCODER.sod (renamed from tools/windows/images/h5/ARDUINO_ENCODER.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_INTERRUPT.sod (renamed from tools/windows/images/h5/ARDUINO_INTERRUPT.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_SCOPE.sod (renamed from tools/windows/images/h5/ARDUINO_SCOPE.sod) | bin | 140736 -> 140736 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_SERVO_READ.sod (renamed from tools/windows/images/h5/ARDUINO_SERVO_READ.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_SERVO_WRITE.sod (renamed from tools/windows/images/h5/ARDUINO_SERVO_WRITE.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_SETUP.sod (renamed from tools/windows/images/h5/ARDUINO_SETUP.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ARDUINO_STEPPER.sod (renamed from tools/windows/images/h5/ARDUINO_STEPPER.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/DCMOTOR_SB.sod (renamed from tools/windows/images/h5/DCMOTOR_SB.sod) | bin | 115232 -> 115232 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/DIGITAL_READ_SB.sod (renamed from tools/windows/images/h5/DIGITAL_READ_SB.sod) | bin | 114880 -> 114880 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/DIGITAL_WRITE_SB.sod (renamed from tools/windows/images/h5/DIGITAL_WRITE_SB.sod) | bin | 114880 -> 114880 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/ENCODER_SB.sod (renamed from tools/windows/images/h5/ENCODER_SB.sod) | bin | 115232 -> 115232 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/INTERRUPT_SB.sod (renamed from tools/windows/images/h5/INTERRUPT_SB.sod) | bin | 114880 -> 114880 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/SERVO_READ_SB.sod (renamed from tools/windows/images/h5/SERVO_READ_SB.sod) | bin | 114880 -> 114880 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/SERVO_WRITE_SB.sod (renamed from tools/windows/images/h5/SERVO_WRITE_SB.sod) | bin | 114880 -> 114880 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/STEPPER_SB.sod (renamed from tools/windows/images/h5/STEPPER_SB.sod) | bin | 114880 -> 114880 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/h5/TIME_SAMPLE.sod (renamed from tools/windows/images/h5/TIME_SAMPLE.sod) | bin | 33384 -> 33384 bytes | |||
-rw-r--r-- | tools/scilab/windows/images/svg/ANALOG_READ_SB.svg (renamed from tools/windows/images/svg/ANALOG_READ_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ANALOG_WRITE_SB.svg (renamed from tools/windows/images/svg/ANALOG_WRITE_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_ANALOG_READ.svg (renamed from tools/windows/images/svg/ARDUINO_ANALOG_READ.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_ANALOG_WRITE.svg (renamed from tools/windows/images/svg/ARDUINO_ANALOG_WRITE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_DCMOTOR.svg (renamed from tools/windows/images/svg/ARDUINO_DCMOTOR.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_DIGITAL_READ.svg (renamed from tools/windows/images/svg/ARDUINO_DIGITAL_READ.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_DIGITAL_WRITE.svg (renamed from tools/windows/images/svg/ARDUINO_DIGITAL_WRITE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_ENCODER.svg (renamed from tools/windows/images/svg/ARDUINO_ENCODER.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_INTERRUPT.svg (renamed from tools/windows/images/svg/ARDUINO_INTERRUPT.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_SCOPE.svg (renamed from tools/windows/images/svg/ARDUINO_SCOPE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_SERVO_READ.svg (renamed from tools/windows/images/svg/ARDUINO_SERVO_READ.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_SERVO_WRITE.svg (renamed from tools/windows/images/svg/ARDUINO_SERVO_WRITE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_SETUP.svg (renamed from tools/windows/images/svg/ARDUINO_SETUP.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_STEPPER.svg (renamed from tools/windows/images/svg/ARDUINO_STEPPER.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ARDUINO_WRITE.svg (renamed from tools/windows/images/svg/ARDUINO_WRITE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/DCMOTOR_SB.svg (renamed from tools/windows/images/svg/DCMOTOR_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/DIGITAL_READ_SB.svg (renamed from tools/windows/images/svg/DIGITAL_READ_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/DIGITAL_WRITE_SB.svg (renamed from tools/windows/images/svg/DIGITAL_WRITE_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/ENCODER_SB.svg (renamed from tools/windows/images/svg/ENCODER_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/INTERRUPT_SB.svg (renamed from tools/windows/images/svg/INTERRUPT_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/SERVO_READ_SB.svg (renamed from tools/windows/images/svg/SERVO_READ_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/SERVO_WRITE_SB.svg (renamed from tools/windows/images/svg/SERVO_WRITE_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/STEPPER_SB.svg (renamed from tools/windows/images/svg/STEPPER_SB.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/images/svg/TIME_SAMPLE.svg (renamed from tools/windows/images/svg/TIME_SAMPLE.svg) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/jar/scilab_en_US_help.jar (renamed from tools/windows/jar/scilab_en_US_help.jar) | bin | 347176 -> 347176 bytes | |||
-rw-r--r-- | tools/scilab/windows/loader.sce (renamed from tools/windows/loader.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ANALOG_READ_SB.bin (renamed from tools/windows/macros/ANALOG_READ_SB.bin) | bin | 9808 -> 9808 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ANALOG_READ_SB.sci (renamed from tools/windows/macros/ANALOG_READ_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ANALOG_WRITE_SB.bin (renamed from tools/windows/macros/ANALOG_WRITE_SB.bin) | bin | 10164 -> 10164 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ANALOG_WRITE_SB.sci (renamed from tools/windows/macros/ANALOG_WRITE_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ANALOG_READ.bin (renamed from tools/windows/macros/ARDUINO_ANALOG_READ.bin) | bin | 7428 -> 7428 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ANALOG_READ.sci (renamed from tools/windows/macros/ARDUINO_ANALOG_READ.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ANALOG_READ_sim.bin (renamed from tools/windows/macros/ARDUINO_ANALOG_READ_sim.bin) | bin | 6248 -> 6248 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ANALOG_READ_sim.sci (renamed from tools/windows/macros/ARDUINO_ANALOG_READ_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE.bin (renamed from tools/windows/macros/ARDUINO_ANALOG_WRITE.bin) | bin | 7756 -> 7756 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE.sci (renamed from tools/windows/macros/ARDUINO_ANALOG_WRITE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE_sim.bin (renamed from tools/windows/macros/ARDUINO_ANALOG_WRITE_sim.bin) | bin | 6100 -> 6100 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE_sim.sci (renamed from tools/windows/macros/ARDUINO_ANALOG_WRITE_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DCMOTOR.bin (renamed from tools/windows/macros/ARDUINO_DCMOTOR.bin) | bin | 15220 -> 15220 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DCMOTOR.sci (renamed from tools/windows/macros/ARDUINO_DCMOTOR.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DCMOTOR_sim.bin (renamed from tools/windows/macros/ARDUINO_DCMOTOR_sim.bin) | bin | 15060 -> 15060 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DCMOTOR_sim.sci (renamed from tools/windows/macros/ARDUINO_DCMOTOR_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DIGITAL_READ.bin (renamed from tools/windows/macros/ARDUINO_DIGITAL_READ.bin) | bin | 7464 -> 7464 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DIGITAL_READ.sci (renamed from tools/windows/macros/ARDUINO_DIGITAL_READ.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DIGITAL_READ_sim.bin (renamed from tools/windows/macros/ARDUINO_DIGITAL_READ_sim.bin) | bin | 6424 -> 6424 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DIGITAL_READ_sim.sci (renamed from tools/windows/macros/ARDUINO_DIGITAL_READ_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DIGITAL_WRITE.bin (renamed from tools/windows/macros/ARDUINO_DIGITAL_WRITE.bin) | bin | 7460 -> 7460 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DIGITAL_WRITE.sci (renamed from tools/windows/macros/ARDUINO_DIGITAL_WRITE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DIG_WRITE_sim.bin (renamed from tools/windows/macros/ARDUINO_DIG_WRITE_sim.bin) | bin | 6088 -> 6088 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_DIG_WRITE_sim.sci (renamed from tools/windows/macros/ARDUINO_DIG_WRITE_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ENCODER.bin (renamed from tools/windows/macros/ARDUINO_ENCODER.bin) | bin | 13680 -> 13680 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ENCODER.sci (renamed from tools/windows/macros/ARDUINO_ENCODER.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ENCODER_sim.bin (renamed from tools/windows/macros/ARDUINO_ENCODER_sim.bin) | bin | 11392 -> 11392 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_ENCODER_sim.sci (renamed from tools/windows/macros/ARDUINO_ENCODER_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_INTERRUPT.bin (renamed from tools/windows/macros/ARDUINO_INTERRUPT.bin) | bin | 7196 -> 7196 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_INTERRUPT.sci (renamed from tools/windows/macros/ARDUINO_INTERRUPT.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_INTERRUPT_sim.bin (renamed from tools/windows/macros/ARDUINO_INTERRUPT_sim.bin) | bin | 6712 -> 6712 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_INTERRUPT_sim.sci (renamed from tools/windows/macros/ARDUINO_INTERRUPT_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_PMODHB5.bin (renamed from tools/windows/macros/ARDUINO_PMODHB5.bin) | bin | 9636 -> 9636 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_PMODHB5.sci (renamed from tools/windows/macros/ARDUINO_PMODHB5.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_PMODHB5_WRITE_sim.bin (renamed from tools/windows/macros/ARDUINO_PMODHB5_WRITE_sim.bin) | bin | 7140 -> 7140 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_PMODHB5_WRITE_sim.sci (renamed from tools/windows/macros/ARDUINO_PMODHB5_WRITE_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SCOPE.bin (renamed from tools/windows/macros/ARDUINO_SCOPE.bin) | bin | 17560 -> 17560 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SCOPE.sci (renamed from tools/windows/macros/ARDUINO_SCOPE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SERVO_READ.bin (renamed from tools/windows/macros/ARDUINO_SERVO_READ.bin) | bin | 7224 -> 7224 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SERVO_READ.sci (renamed from tools/windows/macros/ARDUINO_SERVO_READ.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SERVO_READ_sim.bin (renamed from tools/windows/macros/ARDUINO_SERVO_READ_sim.bin) | bin | 7064 -> 7064 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SERVO_READ_sim.sci (renamed from tools/windows/macros/ARDUINO_SERVO_READ_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SERVO_WRITE.bin (renamed from tools/windows/macros/ARDUINO_SERVO_WRITE.bin) | bin | 7196 -> 7196 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SERVO_WRITE.sci (renamed from tools/windows/macros/ARDUINO_SERVO_WRITE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SERVO_WRITE_sim.bin (renamed from tools/windows/macros/ARDUINO_SERVO_WRITE_sim.bin) | bin | 9088 -> 9088 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SERVO_WRITE_sim.sci (renamed from tools/windows/macros/ARDUINO_SERVO_WRITE_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SETUP.bin (renamed from tools/windows/macros/ARDUINO_SETUP.bin) | bin | 6856 -> 6856 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_SETUP.sci (renamed from tools/windows/macros/ARDUINO_SETUP.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_STEPPER.bin (renamed from tools/windows/macros/ARDUINO_STEPPER.bin) | bin | 7128 -> 7128 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_STEPPER.sci (renamed from tools/windows/macros/ARDUINO_STEPPER.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_STEPPER_sim.bin (renamed from tools/windows/macros/ARDUINO_STEPPER_sim.bin) | bin | 4380 -> 4380 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_STEPPER_sim.sci (renamed from tools/windows/macros/ARDUINO_STEPPER_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_WRITE.bin (renamed from tools/windows/macros/ARDUINO_WRITE.bin) | bin | 5584 -> 5584 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_WRITE.sci (renamed from tools/windows/macros/ARDUINO_WRITE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_WRITE_sim.bin (renamed from tools/windows/macros/ARDUINO_WRITE_sim.bin) | bin | 3956 -> 3956 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_WRITE_sim.sci (renamed from tools/windows/macros/ARDUINO_WRITE_sim.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_post_simulate.bin (renamed from tools/windows/macros/ARDUINO_post_simulate.bin) | bin | 16980 -> 16980 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_post_simulate.sci (renamed from tools/windows/macros/ARDUINO_post_simulate.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_pre_simulate.bin (renamed from tools/windows/macros/ARDUINO_pre_simulate.bin) | bin | 20780 -> 20780 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ARDUINO_pre_simulate.sci (renamed from tools/windows/macros/ARDUINO_pre_simulate.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ArduinoUnoR3.png (renamed from tools/windows/macros/ArduinoUnoR3.png) | bin | 38607 -> 38607 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/Arduino_GUI.sce (renamed from tools/windows/macros/Arduino_GUI.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/DCMOTOR_SB.bin (renamed from tools/windows/macros/DCMOTOR_SB.bin) | bin | 16812 -> 16812 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/DCMOTOR_SB.sci (renamed from tools/windows/macros/DCMOTOR_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/DIGITAL_READ_SB.bin (renamed from tools/windows/macros/DIGITAL_READ_SB.bin) | bin | 10068 -> 10068 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/DIGITAL_READ_SB.sci (renamed from tools/windows/macros/DIGITAL_READ_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/DIGITAL_WRITE_SB.bin (renamed from tools/windows/macros/DIGITAL_WRITE_SB.bin) | bin | 10072 -> 10072 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/DIGITAL_WRITE_SB.sci (renamed from tools/windows/macros/DIGITAL_WRITE_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/ENCODER_SB.bin (renamed from tools/windows/macros/ENCODER_SB.bin) | bin | 16628 -> 16628 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/ENCODER_SB.sci (renamed from tools/windows/macros/ENCODER_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/INTERRUPT_SB.bin (renamed from tools/windows/macros/INTERRUPT_SB.bin) | bin | 9620 -> 9620 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/INTERRUPT_SB.sci (renamed from tools/windows/macros/INTERRUPT_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/SERVO_READ_SB.bin (renamed from tools/windows/macros/SERVO_READ_SB.bin) | bin | 9832 -> 9832 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/SERVO_READ_SB.sci (renamed from tools/windows/macros/SERVO_READ_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/SERVO_WRITE_SB.bin (renamed from tools/windows/macros/SERVO_WRITE_SB.bin) | bin | 9800 -> 9800 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/SERVO_WRITE_SB.sci (renamed from tools/windows/macros/SERVO_WRITE_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/STEPPER_SB.bin (renamed from tools/windows/macros/STEPPER_SB.bin) | bin | 9748 -> 9748 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/STEPPER_SB.sci (renamed from tools/windows/macros/STEPPER_SB.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/TIME_SAMPLE.bin (renamed from tools/windows/macros/TIME_SAMPLE.bin) | bin | 7128 -> 7128 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/TIME_SAMPLE.sci (renamed from tools/windows/macros/TIME_SAMPLE.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/buildmacros.sce (renamed from tools/windows/macros/buildmacros.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/close_serial.bin (renamed from tools/windows/macros/close_serial.bin) | bin | 2860 -> 2860 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/close_serial.sci (renamed from tools/windows/macros/close_serial.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_analog_in.bin (renamed from tools/windows/macros/cmd_analog_in.bin) | bin | 4984 -> 4984 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_analog_in.sci (renamed from tools/windows/macros/cmd_analog_in.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_analog_in_volt.bin (renamed from tools/windows/macros/cmd_analog_in_volt.bin) | bin | 5340 -> 5340 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_analog_in_volt.sci (renamed from tools/windows/macros/cmd_analog_in_volt.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_analog_out.bin (renamed from tools/windows/macros/cmd_analog_out.bin) | bin | 6872 -> 6872 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_analog_out.sci (renamed from tools/windows/macros/cmd_analog_out.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_analog_out_volt.bin (renamed from tools/windows/macros/cmd_analog_out_volt.bin) | bin | 5732 -> 5732 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_analog_out_volt.sci (renamed from tools/windows/macros/cmd_analog_out_volt.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_arduino_a_control.bin (renamed from tools/windows/macros/cmd_arduino_a_control.bin) | bin | 9756 -> 9756 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_arduino_a_control.sci (renamed from tools/windows/macros/cmd_arduino_a_control.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_arduino_d_control.bin (renamed from tools/windows/macros/cmd_arduino_d_control.bin) | bin | 11096 -> 11096 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_arduino_d_control.sci (renamed from tools/windows/macros/cmd_arduino_d_control.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_arduino_meter.bin (renamed from tools/windows/macros/cmd_arduino_meter.bin) | bin | 9348 -> 9348 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_arduino_meter.sci (renamed from tools/windows/macros/cmd_arduino_meter.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_dcmotor_release.bin (renamed from tools/windows/macros/cmd_dcmotor_release.bin) | bin | 5908 -> 5908 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_dcmotor_release.sci (renamed from tools/windows/macros/cmd_dcmotor_release.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_dcmotor_run.bin (renamed from tools/windows/macros/cmd_dcmotor_run.bin) | bin | 6884 -> 6884 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_dcmotor_run.sci (renamed from tools/windows/macros/cmd_dcmotor_run.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_dcmotor_setup.bin (renamed from tools/windows/macros/cmd_dcmotor_setup.bin) | bin | 10144 -> 10144 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_dcmotor_setup.sci (renamed from tools/windows/macros/cmd_dcmotor_setup.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_digital_in.bin (renamed from tools/windows/macros/cmd_digital_in.bin) | bin | 7160 -> 7160 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_digital_in.sci (renamed from tools/windows/macros/cmd_digital_in.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_digital_out.bin (renamed from tools/windows/macros/cmd_digital_out.bin) | bin | 8624 -> 8624 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_digital_out.sci (renamed from tools/windows/macros/cmd_digital_out.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_encoder_init.bin (renamed from tools/windows/macros/cmd_encoder_init.bin) | bin | 4508 -> 4508 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_encoder_init.sci (renamed from tools/windows/macros/cmd_encoder_init.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_servo_attach.bin (renamed from tools/windows/macros/cmd_servo_attach.bin) | bin | 8188 -> 8188 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_servo_attach.sci (renamed from tools/windows/macros/cmd_servo_attach.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_servo_detach.bin (renamed from tools/windows/macros/cmd_servo_detach.bin) | bin | 8104 -> 8104 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_servo_detach.sci (renamed from tools/windows/macros/cmd_servo_detach.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/cmd_servo_move.bin (renamed from tools/windows/macros/cmd_servo_move.bin) | bin | 8492 -> 8492 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/cmd_servo_move.sci (renamed from tools/windows/macros/cmd_servo_move.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/genhelpscript.sce (renamed from tools/windows/macros/genhelpscript.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/getArduinoVersion.bin (renamed from tools/windows/macros/getArduinoVersion.bin) | bin | 144 -> 144 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/getArduinoVersion.sci (renamed from tools/windows/macros/getArduinoVersion.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/init_arduino.bin (renamed from tools/windows/macros/init_arduino.bin) | bin | 20688 -> 20688 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/init_arduino.sci (renamed from tools/windows/macros/init_arduino.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/lib (renamed from tools/windows/macros/lib) | bin | 1944 -> 1944 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/names (renamed from tools/windows/macros/names) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/nicescope.bin (renamed from tools/windows/macros/nicescope.bin) | bin | 12292 -> 12292 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/nicescope.sci (renamed from tools/windows/macros/nicescope.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/open_serial.bin (renamed from tools/windows/macros/open_serial.bin) | bin | 3492 -> 3492 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/open_serial.sci (renamed from tools/windows/macros/open_serial.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/post_xcos_simulate.bin (renamed from tools/windows/macros/post_xcos_simulate.bin) | bin | 11168 -> 11168 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/post_xcos_simulate.sci (renamed from tools/windows/macros/post_xcos_simulate.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/pre_xcos_simulate.bin (renamed from tools/windows/macros/pre_xcos_simulate.bin) | bin | 13648 -> 13648 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/pre_xcos_simulate.sci (renamed from tools/windows/macros/pre_xcos_simulate.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/read_serial.bin (renamed from tools/windows/macros/read_serial.bin) | bin | 508 -> 508 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/read_serial.sci (renamed from tools/windows/macros/read_serial.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/status_serial.bin (renamed from tools/windows/macros/status_serial.bin) | bin | 640 -> 640 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/status_serial.sci (renamed from tools/windows/macros/status_serial.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/tkscaleblk.bin (renamed from tools/windows/macros/tkscaleblk.bin) | bin | 9328 -> 9328 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/tkscaleblk.sci (renamed from tools/windows/macros/tkscaleblk.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/macros/write_serial.bin (renamed from tools/windows/macros/write_serial.bin) | bin | 572 -> 572 bytes | |||
-rw-r--r-- | tools/scilab/windows/macros/write_serial.sci (renamed from tools/windows/macros/write_serial.sci) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/src/libserial.dll (renamed from tools/windows/src/libserial.dll) | bin | 93501 -> 93501 bytes | |||
-rw-r--r-- | tools/scilab/windows/src/libserial64.dll (renamed from tools/windows/src/libserial64.dll) | bin | 112037 -> 112037 bytes | |||
-rw-r--r-- | tools/scilab/windows/src/loader.sce (renamed from tools/windows/src/loader.sce) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/src/main.c (renamed from tools/windows/src/main.c) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/src/make.txt (renamed from tools/windows/src/make.txt) | 0 | ||||
-rw-r--r-- | tools/scilab/windows/unloader.sce (renamed from tools/windows/unloader.sce) | 0 | ||||
-rw-r--r-- | user-code/dcmotor/julia/ArduinoTools.jl | 189 | ||||
-rw-r--r-- | user-code/dcmotor/julia/dcmotor-both.jl | 10 | ||||
-rw-r--r-- | user-code/dcmotor/julia/dcmotor-clock.jl | 8 | ||||
-rw-r--r-- | user-code/dcmotor/julia/dcmotor-loop.jl | 12 | ||||
-rw-r--r-- | user-code/dcmotor/python/Arduino/Arduino.py | 327 | ||||
-rw-r--r-- | user-code/dcmotor/python/Arduino/__init__.py | 0 | ||||
-rw-r--r-- | user-code/dcmotor/python/Arduino/__pycache__/Arduino.cpython-38.pyc | bin | 0 -> 9943 bytes | |||
-rw-r--r-- | user-code/dcmotor/python/Arduino/__pycache__/__init__.cpython-38.pyc | bin | 0 -> 160 bytes | |||
-rw-r--r-- | user-code/dcmotor/scilab/dcmotor-both.sce | 2 | ||||
-rw-r--r-- | user-code/dcmotor/scilab/dcmotor-clock.sce | 2 | ||||
-rw-r--r-- | user-code/dcmotor/scilab/dcmotor-loop.sce | 2 | ||||
-rw-r--r-- | user-code/ldr/OpenModelica/ldr-led.mo | 4 | ||||
-rw-r--r-- | user-code/ldr/OpenModelica/ldr-read.mo | 4 | ||||
-rw-r--r-- | user-code/ldr/julia/ArduinoTools.jl | 189 | ||||
-rw-r--r-- | user-code/ldr/julia/ldr-led.jl | 10 | ||||
-rw-r--r-- | user-code/ldr/julia/ldr-read.jl | 4 | ||||
-rw-r--r-- | user-code/ldr/python/Arduino/Arduino.py | 327 | ||||
-rw-r--r-- | user-code/ldr/python/Arduino/__init__.py | 0 | ||||
-rw-r--r-- | user-code/ldr/python/Arduino/__pycache__/Arduino.cpython-38.pyc | bin | 0 -> 9921 bytes | |||
-rw-r--r-- | user-code/ldr/python/Arduino/__pycache__/__init__.cpython-38.pyc | bin | 0 -> 159 bytes | |||
-rw-r--r-- | user-code/led/OpenModelica/led-blue-delay.mo | 4 | ||||
-rw-r--r-- | user-code/led/OpenModelica/led-blue-red.mo | 4 | ||||
-rw-r--r-- | user-code/led/OpenModelica/led-blue.mo | 4 | ||||
-rw-r--r-- | user-code/led/OpenModelica/led-green-blink.mo | 4 | ||||
-rw-r--r-- | user-code/led/OpenModelica/test_firmware.mo | 12 | ||||
-rw-r--r-- | user-code/led/arduino-old/led-blink/led-blink.ino | 13 | ||||
-rw-r--r-- | user-code/led/arduino-old/led-blue-delay/led-blue-delay.ino | 8 | ||||
-rw-r--r-- | user-code/led/arduino-old/led-blue-red/led-blue-red.ino | 12 | ||||
-rw-r--r-- | user-code/led/arduino-old/led-blue/led-blue.ino | 6 | ||||
-rw-r--r-- | user-code/led/arduino-old/led_on/led_on.ino | 11 | ||||
-rw-r--r-- | user-code/led/arduino-old/led_sleep/led_sleep.ino | 16 | ||||
-rw-r--r-- | user-code/led/arduino/led-green-blink/led-blink.ino~ (renamed from user-code/led/arduino/led-blink/led-blink.ino~) | 0 | ||||
-rw-r--r-- | user-code/led/arduino/led-green-blink/led-green-blink.ino (renamed from user-code/led/arduino/led-blink/led-blink.ino) | 0 | ||||
-rw-r--r-- | user-code/led/arduino/led_on-amravati/led_on-amravati.ino | 12 | ||||
-rw-r--r-- | user-code/led/arduino/led_on/led_on.ino | 12 | ||||
-rw-r--r-- | user-code/led/arduino/led_sleep/led_sleep.ino | 16 | ||||
-rw-r--r-- | user-code/led/julia/ArduinoTools.jl | 189 | ||||
-rw-r--r-- | user-code/led/julia/led-blue-delay.jl | 8 | ||||
-rw-r--r-- | user-code/led/julia/led-blue-red.jl | 14 | ||||
-rw-r--r-- | user-code/led/julia/led-blue.jl | 6 | ||||
-rw-r--r-- | user-code/led/julia/led-green-blink.jl | 8 | ||||
-rw-r--r-- | user-code/led/julia/test_firmware.jl | 12 | ||||
-rw-r--r-- | user-code/led/led.tex | 11 | ||||
-rw-r--r-- | user-code/led/python/4.2LED.py | 37 | ||||
-rw-r--r-- | user-code/led/python/Arduino/__pycache__/Arduino.cpython-38.pyc | bin | 9932 -> 9932 bytes | |||
-rw-r--r-- | user-code/led/scilab/led-blink.sce | 15 | ||||
-rw-r--r-- | user-code/led/scilab/led-blink.zcos | bin | 4897 -> 0 bytes | |||
-rw-r--r-- | user-code/led/scilab/led-blue.sce | 4 | ||||
-rw-r--r-- | user-code/led/scilab/led-green-blink.sce | 2 | ||||
-rw-r--r-- | user-code/led/scilab/led2.zcos | bin | 6560 -> 0 bytes | |||
-rw-r--r-- | user-code/led/scilab/manual.docx | bin | 12177 -> 0 bytes | |||
-rw-r--r-- | user-code/pot/OpenModelica/pot-threshold.mo | 4 | ||||
-rw-r--r-- | user-code/pot/OpenModelica/pot-threshold.sce | 42 | ||||
-rw-r--r-- | user-code/pot/julia/ArduinoTools.jl | 189 | ||||
-rw-r--r-- | user-code/pot/julia/pot-threshold.jl | 22 | ||||
-rw-r--r-- | user-code/pot/python/Arduino/Arduino.py | 327 | ||||
-rw-r--r-- | user-code/pot/python/Arduino/__init__.py | 0 | ||||
-rw-r--r-- | user-code/pot/python/Arduino/__pycache__/Arduino.cpython-38.pyc | bin | 0 -> 9943 bytes | |||
-rw-r--r-- | user-code/pot/python/Arduino/__pycache__/__init__.cpython-38.pyc | bin | 0 -> 160 bytes | |||
-rw-r--r-- | user-code/push/OpenModelica/led-push-button.mo | 6 | ||||
-rw-r--r-- | user-code/push/OpenModelica/push-button-status.mo | 6 | ||||
-rw-r--r-- | user-code/push/julia/ArduinoTools.jl | 189 | ||||
-rw-r--r-- | user-code/push/julia/led-push-button.jl | 12 | ||||
-rw-r--r-- | user-code/push/julia/push-button-status.jl | 6 | ||||
-rw-r--r-- | user-code/servo/julia/ArduinoTools.jl | 189 | ||||
-rw-r--r-- | user-code/servo/julia/servo-init.jl | 6 | ||||
-rw-r--r-- | user-code/servo/julia/servo-loop.jl | 8 | ||||
-rw-r--r-- | user-code/servo/julia/servo-pot.jl | 10 | ||||
-rw-r--r-- | user-code/servo/julia/servo-reverse.jl | 8 | ||||
-rw-r--r-- | user-code/sw-env/sw-env.tex | 53 | ||||
-rw-r--r-- | user-code/thermistor-old/arduino/therm-buzzer/therm-buzzer.ino | 28 | ||||
-rw-r--r-- | user-code/thermistor-old/arduino/therm-read/therm-read.ino | 18 | ||||
-rw-r--r-- | user-code/thermistor-old/figures/BUZZER Diagram.jpg | bin | 65858 -> 0 bytes | |||
-rw-r--r-- | user-code/thermistor-old/figures/NTC-bead.jpg | bin | 26322 -> 0 bytes | |||
-rw-r--r-- | user-code/thermistor-old/figures/THERMISTOR-Diagram.jpg | bin | 67163 -> 0 bytes | |||
-rw-r--r-- | user-code/thermistor-old/figures/therm-buzzer-xcos.png | bin | 62520 -> 0 bytes | |||
-rw-r--r-- | user-code/thermistor-old/figures/therm-buzzer.png | bin | 21991 -> 0 bytes | |||
-rw-r--r-- | user-code/thermistor-old/figures/therm-read-xcos.png | bin | 57179 -> 0 bytes | |||
-rw-r--r-- | user-code/thermistor-old/figures/therm-read.png | bin | 19495 -> 0 bytes | |||
-rw-r--r-- | user-code/thermistor-old/figures/therm-sym.png | bin | 17914 -> 0 bytes | |||
-rw-r--r-- | user-code/thermistor-old/scilab/therm-buzzer-xcos.zcos | bin | 5601 -> 0 bytes | |||
-rw-r--r-- | user-code/thermistor-old/scilab/therm-buzzer.sce | 13 | ||||
-rw-r--r-- | user-code/thermistor-old/scilab/therm-read-xcos.zcos | bin | 4525 -> 0 bytes | |||
-rw-r--r-- | user-code/thermistor-old/scilab/therm-read.sce | 9 | ||||
-rw-r--r-- | user-code/thermistor-old/thermistor.tex | 226 | ||||
-rw-r--r-- | user-code/thermistor/OpenModelica/therm-buzzer.mo | 4 | ||||
-rw-r--r-- | user-code/thermistor/OpenModelica/therm-read.mo | 4 | ||||
-rw-r--r-- | user-code/thermistor/julia/ArduinoTools.jl | 189 | ||||
-rw-r--r-- | user-code/thermistor/julia/therm-buzzer.jl | 12 | ||||
-rw-r--r-- | user-code/thermistor/julia/therm-read.jl | 6 | ||||
-rw-r--r-- | user-code/thermistor/python/Arduino/Arduino.py | 327 | ||||
-rw-r--r-- | user-code/thermistor/python/Arduino/__init__.py | 0 | ||||
-rw-r--r-- | user-code/thermistor/python/Arduino/__pycache__/Arduino.cpython-38.pyc | bin | 0 -> 9943 bytes | |||
-rw-r--r-- | user-code/thermistor/python/Arduino/__pycache__/__init__.cpython-38.pyc | bin | 0 -> 160 bytes |
1267 files changed, 26796 insertions, 2232 deletions
diff --git a/floss-arduino.OpenModelicad b/floss-arduino.OpenModelicad index bc89c65..0ed7919 100644 --- a/floss-arduino.OpenModelicad +++ b/floss-arduino.OpenModelicad @@ -11,14 +11,14 @@ \contentsline {section}{\numberline {6.{1}}Read and display the LDR values}{128}% \contentsline {section}{\numberline {6.{2}}Turning the blue LED on and off}{129}% \addvspace {10pt} -\contentsline {section}{\numberline {7.{1}}Rotating the DC motor}{150}% -\contentsline {section}{\numberline {7.{2}}Rotating the DC motor in both directions}{150}% -\contentsline {section}{\numberline {7.{3}}Rotating the DC motor in both directions in a loop}{151}% +\contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{142}% \addvspace {10pt} -\contentsline {section}{\numberline {8.{1}}Turning on LEDs depending on the potentiometer threshold}{164}% +\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{161}% +\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{162}% \addvspace {10pt} -\contentsline {section}{\numberline {9.{1}}Read and display the thermistor values}{183}% -\contentsline {section}{\numberline {9.{2}}Turning the buzzer on and off using thermistor values}{184}% +\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{182}% +\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{182}% +\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{183}% \addvspace {10pt} \contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{204}% \contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{205}% diff --git a/floss-arduino.ard b/floss-arduino.ard index 8e2d80c..c04c142 100644 --- a/floss-arduino.ard +++ b/floss-arduino.ard @@ -11,14 +11,14 @@ \contentsline {section}{\numberline {6.{1}}Read and display the LDR values}{117}% \contentsline {section}{\numberline {6.{2}}Turning the blue LED on and off}{118}% \addvspace {10pt} -\contentsline {section}{\numberline {7.{1}}Rotating the DC motor}{135}% -\contentsline {section}{\numberline {7.{2}}Rotating the DC motor in both directions}{135}% -\contentsline {section}{\numberline {7.{3}}Rotating the DC motor in both directions in a loop}{135}% +\contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{134}% \addvspace {10pt} -\contentsline {section}{\numberline {8.{1}}Turning on LEDs depending on the potentiometer threshold}{156}% +\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{149}% +\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{150}% \addvspace {10pt} -\contentsline {section}{\numberline {9.{1}}Read and display the thermistor values}{171}% -\contentsline {section}{\numberline {9.{2}}Turning the buzzer on and off using thermistor values}{172}% +\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{167}% +\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{167}% +\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{167}% \addvspace {10pt} \contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{187}% \contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{188}% diff --git a/floss-arduino.aux b/floss-arduino.aux index fda7731..e74b23f 100644 --- a/floss-arduino.aux +++ b/floss-arduino.aux @@ -147,7 +147,7 @@ \newlabel{loader}{{3.11}{32}} \@writefile{lof}{\contentsline {figure}{\numberline {3.12}{\ignorespaces Device Manager in windows\relax }}{33}\protected@file@percent } \newlabel{dev-mgr}{{3.12}{33}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/tools/test\textunderscore firmware.sce}{33}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/test\textunderscore firmware.sce}{33}\protected@file@percent } \newlabel{fn:firmware}{{5}{33}} \@writefile{lof}{\contentsline {figure}{\numberline {3.13}{\ignorespaces COM port properties window\relax }}{34}\protected@file@percent } \newlabel{com}{{3.13}{34}} @@ -166,7 +166,7 @@ \newlabel{10@xvr}{{}{36}} \newlabel{10@vr}{{}{36}} \newlabel{sci:test-firmware}{{3.{1}}{36}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/tools/test\textunderscore firmware.sce}{36}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/test\textunderscore firmware.sce}{36}\protected@file@percent } \@writefile{toc}{\contentsline {section}{\numberline {3.3}Xcos}{36}\protected@file@percent } \newlabel{sec:xcos-start}{{3.3}{36}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.3.1}Downloading, installing and testing}{36}\protected@file@percent } @@ -218,7 +218,7 @@ \newlabel{12@xvr}{{}{47}} \newlabel{12@vr}{{}{47}} \newlabel{py:test-firmware}{{3.{1}}{47}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/test\textunderscore firmware.py}{47}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/tools/python/test\textunderscore firmware.py}{47}\protected@file@percent } \@writefile{toc}{\contentsline {section}{\numberline {3.5}Julia}{48}\protected@file@percent } \newlabel{sec:julia-start}{{3.5}{48}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.5.1}Downloading and installing on Windows}{48}\protected@file@percent } @@ -251,7 +251,7 @@ \newlabel{14@xvr}{{}{56}} \newlabel{14@vr}{{}{56}} \newlabel{julia:test-firmware}{{3.{1}}{56}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/test\textunderscore firmware.jl}{56}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/tools/julia/test\textunderscore firmware.jl}{56}\protected@file@percent } \@writefile{toc}{\contentsline {section}{\numberline {3.6}OpenModelica}{56}\protected@file@percent } \newlabel{sec:OpenModelica-start}{{3.6}{56}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.6.1}Downloading and installing on Windows}{57}\protected@file@percent } @@ -297,7 +297,7 @@ \newlabel{16@xvr}{{}{67}} \newlabel{16@vr}{{}{67}} \newlabel{OpenModelica:test-firmware}{{3.{1}}{67}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/test\textunderscore firmware.mo}{67}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/tools/openmodelica/test\textunderscore firmware.mo}{67}\protected@file@percent } \@writefile{toc}{\contentsline {chapter}{\numberline {4}Interfacing a Light Emitting Diode}{69}\protected@file@percent } \@writefile{lof}{\addvspace {10\p@ }} \@writefile{lot}{\addvspace {10\p@ }} @@ -351,7 +351,7 @@ \newlabel{20@xvr}{{}{75}} \newlabel{20@vr}{{}{75}} \newlabel{ard:led-blink}{{4.{4}}{75}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led\textendash blink/led\textendash blink.ino}{75}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led\textendash green\textendash blink/led\textendash green\textendash blink.ino}{75}\protected@file@percent } \@writefile{toc}{\contentsline {section}{\numberline {4.4}Lighting the LED from Scilab}{76}\protected@file@percent } \@writefile{toc}{\contentsline {subsection}{\numberline {4.4.1}Lighting the LED}{76}\protected@file@percent } \newlabel{sec:light-sci}{{4.4.1}{76}} @@ -433,8 +433,8 @@ \@writefile{pyd}{\contentsline {section}{\numberline {4.{1}}Turning on the LED through Python}{85}\protected@file@percent } \newlabel{37@xvr}{{}{85}} \newlabel{37@vr}{{}{85}} -\newlabel{py:led-blue1}{{4.{1}}{85}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led\textendash blue.py}{86}\protected@file@percent } +\newlabel{py:led-blue}{{4.{1}}{85}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led\textendash blue.py}{85}\protected@file@percent } \@writefile{thm}{\contentsline {pymass}{{Python Code}{4.{2}}{}}{86}\protected@file@percent } \@writefile{pyd}{\contentsline {section}{\numberline {4.{2}}Turning on the blue LED and turning it off after two seconds}{86}\protected@file@percent } \newlabel{38@xvr}{{}{86}} @@ -464,7 +464,7 @@ \newlabel{41@xvr}{{}{90}} \newlabel{41@vr}{{}{90}} \newlabel{julia:led-blue}{{4.{1}}{90}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/led\textendash blue.jl}{91}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/led\textendash blue.jl}{90}\protected@file@percent } \@writefile{thm}{\contentsline {juliamass}{{Julia Code}{4.{2}}{}}{91}\protected@file@percent } \@writefile{juliad}{\contentsline {section}{\numberline {4.{2}}Turning on the blue LED and turning it off after two seconds}{91}\protected@file@percent } \newlabel{42@xvr}{{}{91}} @@ -771,409 +771,409 @@ \newlabel{80@vr}{{}{129}} \newlabel{OpenModelica:ldr-led}{{6.{2}}{129}} \@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/OpenModelica/ldr\textendash led.mo}{129}\protected@file@percent } -\@writefile{toc}{\contentsline {chapter}{\numberline {7}Controlling a DC motor}{131}\protected@file@percent } +\@writefile{toc}{\contentsline {chapter}{\numberline {7}Interfacing a Potentiometer}{131}\protected@file@percent } \@writefile{lof}{\addvspace {10\p@ }} \@writefile{lot}{\addvspace {10\p@ }} -\newlabel{dcmotor}{{7}{131}} +\newlabel{potmeter}{{7}{131}} \@writefile{toc}{\contentsline {section}{\numberline {7.1}Preliminaries}{131}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {7.1}{\ignorespaces L293D motor driver board\relax }}{132}\protected@file@percent } -\newlabel{fig:motordriverboard}{{7.1}{132}} -\@writefile{lof}{\contentsline {figure}{\numberline {7.2}{\ignorespaces A schematic of DC motor connections\relax }}{133}\protected@file@percent } -\newlabel{fig:dcm-schematic}{{7.2}{133}} -\@writefile{lof}{\contentsline {figure}{\numberline {7.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{133}\protected@file@percent } -\newlabel{fig:dcmotorconn}{{7.3}{133}} -\@writefile{toc}{\contentsline {section}{\numberline {7.2}Controlling the DC motor from Arduino}{133}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {7.2.1}Controlling the DC motor}{133}\protected@file@percent } -\newlabel{sec:dcm-ard}{{7.2.1}{133}} -\@writefile{thm}{\contentsline {egmass}{{Exercise}{7.{1}}{}}{134}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {7.2.2}Arduino Code}{135}\protected@file@percent } -\newlabel{sec:dcmotor-arduino-code}{{7.2.2}{135}} -\@writefile{ard}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{7.{1}}{}}{135}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {7.{1}}Rotating the DC motor}{135}\protected@file@percent } -\newlabel{81@xvr}{{}{135}} -\newlabel{81@vr}{{}{135}} -\newlabel{ard:dcmotor-clock}{{7.{1}}{135}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash clock/dcmotor\textendash clock.ino}{135}\protected@file@percent } -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{7.{2}}{}}{135}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {7.{2}}Rotating the DC motor in both directions}{135}\protected@file@percent } -\newlabel{82@xvr}{{}{135}} -\newlabel{82@vr}{{}{135}} -\newlabel{ard:dcmotor-both}{{7.{2}}{135}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash both/dcmotor\textendash both.ino}{135}\protected@file@percent } -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{7.{3}}{}}{135}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {7.{3}}Rotating the DC motor in both directions in a loop}{135}\protected@file@percent } -\newlabel{83@xvr}{{}{135}} -\newlabel{83@vr}{{}{135}} -\newlabel{ard:dcmotor-loop}{{7.{3}}{135}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash loop/dcmotor\textendash loop.ino}{136}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {7.3}Controlling the DC motor from Scilab}{136}\protected@file@percent } -\newlabel{sec:dcm-sci}{{7.3}{136}} -\@writefile{toc}{\contentsline {subsection}{\numberline {7.3.1}Initialization}{136}\protected@file@percent } -\@writefile{lot}{\contentsline {table}{\numberline {7.1}{\ignorespaces A numbering convention used in the DC motor breakout board\relax }}{137}\protected@file@percent } -\newlabel{table:convention}{{7.1}{137}} -\@writefile{lot}{\contentsline {table}{\numberline {7.2}{\ignorespaces Parameters for DC motor initialization\relax }}{137}\protected@file@percent } -\newlabel{tab:dcmotor-init}{{7.2}{137}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{137}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {7.3.2}Rotation for a specified time}{137}\protected@file@percent } -\newlabel{sec:dc-both}{{7.3.2}{137}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{137}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{138}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{138}\protected@file@percent } -\@writefile{thm}{\contentsline {egmass}{{Exercise}{7.{2}}{}}{138}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {7.3.3}Using the capabilities of Scilab}{138}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {7.3.4}Scilab Code}{139}\protected@file@percent } -\newlabel{sec:dcmotor-scilab-code}{{7.3.4}{139}} -\@writefile{cod}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{7.{1}}{}}{139}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {7.{1}}Rotating the DC motor}{139}\protected@file@percent } -\newlabel{84@xvr}{{}{139}} -\newlabel{84@vr}{{}{139}} -\newlabel{sci:dcmotor-clock}{{7.{1}}{139}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{139}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{7.{2}}{}}{139}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {7.{2}}Rotating the DC motor in both directions}{139}\protected@file@percent } -\newlabel{85@xvr}{{}{139}} -\newlabel{85@vr}{{}{139}} -\newlabel{sci:dcmotor-both}{{7.{2}}{139}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash both.sce}{139}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{7.{3}}{}}{139}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {7.{3}}Rotating the DC motor in both directions in a loop}{139}\protected@file@percent } -\newlabel{86@xvr}{{}{139}} -\newlabel{86@vr}{{}{139}} -\newlabel{sci:dcmotor-loop}{{7.{3}}{139}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash loop.sce}{139}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {7.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{140}\protected@file@percent } -\newlabel{88@xvr}{{}{140}} -\newlabel{88@vr}{{}{140}} -\newlabel{fig:dcmotor-clock}{{7.4}{140}} -\@writefile{toc}{\contentsline {section}{\numberline {7.4}Controlling the DC Motor from Xcos}{140}\protected@file@percent } -\@writefile{lot}{\contentsline {table}{\numberline {7.3}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{141}\protected@file@percent } -\newlabel{tab:dcmotor-clock}{{7.3}{141}} -\newlabel{89@xvr}{{}{141}} -\newlabel{89@vr}{{}{141}} -\@writefile{thm}{\contentsline {egmass}{{Exercise}{7.{3}}{}}{141}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {7.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{142}\protected@file@percent } -\newlabel{91@xvr}{{}{142}} -\newlabel{91@vr}{{}{142}} -\newlabel{fig:dcmotor-both}{{7.5}{142}} -\@writefile{lot}{\contentsline {table}{\numberline {7.4}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{142}\protected@file@percent } -\newlabel{tab:dcmotor-both}{{7.4}{142}} -\newlabel{92@xvr}{{}{142}} -\newlabel{92@vr}{{}{142}} -\@writefile{lof}{\contentsline {figure}{\numberline {7.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{143}\protected@file@percent } -\newlabel{94@xvr}{{}{143}} -\newlabel{94@vr}{{}{143}} -\newlabel{fig:dcmotor-loop}{{7.6}{143}} -\@writefile{toc}{\contentsline {section}{\numberline {7.5}Controlling the DC Motor from Python}{143}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {7.5.1}Controlling the DC Motor}{143}\protected@file@percent } -\@writefile{lot}{\contentsline {table}{\numberline {7.5}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{144}\protected@file@percent } -\newlabel{tab:dcmotor-loop}{{7.5}{144}} -\newlabel{95@xvr}{{}{144}} -\newlabel{95@vr}{{}{144}} -\@writefile{toc}{\contentsline {subsection}{\numberline {7.5.2}Python Code}{145}\protected@file@percent } -\newlabel{sec:dcmotor-python-code}{{7.5.2}{145}} -\@writefile{pyd}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {pymass}{{Python Code}{7.{1}}{}}{145}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {7.{1}}Rotating the DC motor}{145}\protected@file@percent } -\newlabel{96@xvr}{{}{145}} -\newlabel{96@vr}{{}{145}} -\newlabel{py:dcmotor-clock}{{7.{1}}{145}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash clock.py}{145}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{7.{2}}{}}{146}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {7.{2}}Rotating the DC motor in both directions}{146}\protected@file@percent } -\newlabel{97@xvr}{{}{146}} -\newlabel{97@vr}{{}{146}} -\newlabel{py:dcmotor-both}{{7.{2}}{146}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash both.py}{146}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{7.{3}}{}}{146}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {7.{3}}Rotating the DC motor in both directions in a loop}{146}\protected@file@percent } -\newlabel{98@xvr}{{}{147}} -\newlabel{98@vr}{{}{147}} -\newlabel{py:dcmotor-loop}{{7.{3}}{147}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash loop.py}{147}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {7.6}Controlling the DC Motor from Julia}{148}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {7.6.1}Controlling the DC Motor}{148}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {7.6.2}Julia Code}{148}\protected@file@percent } -\newlabel{sec:dcmotor-julia-code}{{7.6.2}{148}} -\@writefile{juliad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{7.{1}}{}}{148}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {7.{1}}Rotating the DC motor}{148}\protected@file@percent } -\newlabel{99@xvr}{{}{148}} -\newlabel{99@vr}{{}{148}} -\newlabel{julia:dcmotor-clock}{{7.{1}}{148}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash clock.jl}{148}\protected@file@percent } -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{7.{2}}{}}{149}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {7.{2}}Rotating the DC motor in both directions}{149}\protected@file@percent } -\newlabel{100@xvr}{{}{149}} -\newlabel{100@vr}{{}{149}} -\newlabel{julia:dcmotor-both}{{7.{2}}{149}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash both.jl}{149}\protected@file@percent } -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{7.{3}}{}}{149}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {7.{3}}Rotating the DC motor in both directions in a loop}{149}\protected@file@percent } -\newlabel{101@xvr}{{}{149}} -\newlabel{101@vr}{{}{149}} -\newlabel{julia:dcmotor-loop}{{7.{3}}{149}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash loop.jl}{149}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {7.7}Controlling the DC Motor from OpenModelica}{149}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {7.7.1}Controlling the DC Motor}{149}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {7.7.2}OpenModelica Code}{150}\protected@file@percent } -\newlabel{sec:dcmotor-OpenModelica-code}{{7.7.2}{150}} -\@writefile{OpenModelicad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{7.{1}}{}}{150}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {7.{1}}Rotating the DC motor}{150}\protected@file@percent } -\newlabel{102@xvr}{{}{150}} -\newlabel{102@vr}{{}{150}} -\newlabel{OpenModelica:dcmotor-clock}{{7.{1}}{150}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash clock.mo}{150}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{7.{2}}{}}{150}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {7.{2}}Rotating the DC motor in both directions}{150}\protected@file@percent } -\newlabel{103@xvr}{{}{150}} -\newlabel{103@vr}{{}{150}} -\newlabel{OpenModelica:dcmotor-both}{{7.{2}}{150}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash both.mo}{151}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{7.{3}}{}}{151}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {7.{3}}Rotating the DC motor in both directions in a loop}{151}\protected@file@percent } -\newlabel{104@xvr}{{}{151}} -\newlabel{104@vr}{{}{151}} -\newlabel{OpenModelica:dcmotor-loop}{{7.{3}}{151}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash loop.mo}{151}\protected@file@percent } -\@writefile{toc}{\contentsline {chapter}{\numberline {8}Interfacing a Potentiometer}{153}\protected@file@percent } -\@writefile{lof}{\addvspace {10\p@ }} -\@writefile{lot}{\addvspace {10\p@ }} -\newlabel{potmeter}{{8}{153}} -\@writefile{toc}{\contentsline {section}{\numberline {8.1}Preliminaries}{153}\protected@file@percent } -\newlabel{105@xvr}{{}{153}} -\newlabel{105@vr}{{}{153}} -\newlabel{fig:pot}{{8.1a}{154}} +\newlabel{81@xvr}{{}{131}} +\newlabel{81@vr}{{}{131}} +\newlabel{fig:pot}{{7.1a}{132}} \newlabel{sub@fig:pot}{{(a)}{a}} -\newlabel{fig:potsch}{{8.1b}{154}} +\newlabel{fig:potsch}{{7.1b}{132}} \newlabel{sub@fig:potsch}{{(b)}{b}} -\@writefile{lof}{\contentsline {figure}{\numberline {8.1}{\ignorespaces Potentiometer's schematic on the shield\relax }}{154}\protected@file@percent } -\newlabel{fig:potmeterconn}{{8.1}{154}} -\@writefile{lof}{\contentsline {subfigure}{\numberline{(a)}{\ignorespaces {Pictorial representation of a potentiometer}}}{154}\protected@file@percent } -\@writefile{lof}{\contentsline {subfigure}{\numberline{(b)}{\ignorespaces {Schematic representation of the potentiometer}}}{154}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {8.2}Connecting a potentiometer with Arduino Uno\ using a breadboard}{154}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {8.2}{\ignorespaces A potentiometer to control an LED with Arduino Uno using a breadboard\relax }}{155}\protected@file@percent } -\newlabel{fig:pot-led}{{8.2}{155}} -\@writefile{toc}{\contentsline {section}{\numberline {8.3}Reading the potentiometer from the Arduino IDE}{155}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.3.1}Reading the potentiometer}{155}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot\textendash threshold/pot\textendash threshold.ino}{156}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot\textendash threshold/pot\textendash threshold.ino}{156}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.3.2}Arduino Code}{156}\protected@file@percent } -\newlabel{sec:pot-arduino-code}{{8.3.2}{156}} +\@writefile{lof}{\contentsline {figure}{\numberline {7.1}{\ignorespaces Potentiometer's schematic on the shield\relax }}{132}\protected@file@percent } +\newlabel{fig:potmeterconn}{{7.1}{132}} +\@writefile{lof}{\contentsline {subfigure}{\numberline{(a)}{\ignorespaces {Pictorial representation of a potentiometer}}}{132}\protected@file@percent } +\@writefile{lof}{\contentsline {subfigure}{\numberline{(b)}{\ignorespaces {Schematic representation of the potentiometer}}}{132}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {7.2}Connecting a potentiometer with Arduino Uno\ using a breadboard}{132}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {7.2}{\ignorespaces A potentiometer to control an LED with Arduino Uno using a breadboard\relax }}{133}\protected@file@percent } +\newlabel{fig:pot-led}{{7.2}{133}} +\@writefile{toc}{\contentsline {section}{\numberline {7.3}Reading the potentiometer from the Arduino IDE}{133}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {7.3.1}Reading the potentiometer}{133}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot\textendash threshold/pot\textendash threshold.ino}{134}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot\textendash threshold/pot\textendash threshold.ino}{134}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {7.3.2}Arduino Code}{134}\protected@file@percent } +\newlabel{sec:pot-arduino-code}{{7.3.2}{134}} \@writefile{ard}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{8.{1}}{}}{156}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {8.{1}}Turning on LEDs depending on the potentiometer threshold}{156}\protected@file@percent } -\newlabel{106@xvr}{{}{156}} -\newlabel{106@vr}{{}{156}} -\newlabel{ard:pot-100}{{8.{1}}{156}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot\textendash threshold/pot\textendash threshold.ino}{156}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {8.4}Reading the potentiometer from Scilab}{157}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.4.1}Reading the potentiometer}{157}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot\textendash threshold.sce}{157}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot\textendash threshold.sce}{157}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.4.2}Scilab Code}{158}\protected@file@percent } -\newlabel{sec:pot-scilab-code}{{8.4.2}{158}} +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{7.{1}}{}}{134}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{134}\protected@file@percent } +\newlabel{82@xvr}{{}{134}} +\newlabel{82@vr}{{}{134}} +\newlabel{ard:pot-100}{{7.{1}}{134}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot\textendash threshold/pot\textendash threshold.ino}{134}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {7.4}Reading the potentiometer from Scilab}{135}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {7.4.1}Reading the potentiometer}{135}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot\textendash threshold.sce}{135}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot\textendash threshold.sce}{135}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {7.4.2}Scilab Code}{136}\protected@file@percent } +\newlabel{sec:pot-scilab-code}{{7.4.2}{136}} \@writefile{cod}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{8.{1}}{}}{158}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {8.{1}}Turning on LEDs depending on the potentiometer threshold}{158}\protected@file@percent } -\newlabel{107@xvr}{{}{158}} -\newlabel{107@vr}{{}{158}} -\newlabel{sci:pot-100}{{8.{1}}{158}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot\textendash threshold.sce}{158}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {8.5}Reading the potentiometer from Xcos}{158}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {8.3}{\ignorespaces Turning LEDs on through Xcos depending on the potentiometer threshold}}{159}\protected@file@percent } -\newlabel{109@xvr}{{}{159}} -\newlabel{109@vr}{{}{159}} -\newlabel{fig:pot-threshold}{{8.3}{159}} -\@writefile{toc}{\contentsline {paragraph}{Exercise:}{159}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {8.6}Reading the potentiometer from Python}{159}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.1}Reading the potentiometer}{159}\protected@file@percent } -\@writefile{lot}{\contentsline {table}{\numberline {8.1}{\ignorespaces Xcos parameters to turn on different LEDs depending on the potentiometer value\relax }}{160}\protected@file@percent } -\newlabel{tab:pot-threshold}{{8.1}{160}} -\newlabel{110@xvr}{{}{160}} -\newlabel{110@vr}{{}{160}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot\textendash threshold.py}{160}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot\textendash threshold.py}{161}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.2}Python Code}{161}\protected@file@percent } -\newlabel{sec:pot-python-code}{{8.6.2}{161}} +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{7.{1}}{}}{136}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{136}\protected@file@percent } +\newlabel{83@xvr}{{}{136}} +\newlabel{83@vr}{{}{136}} +\newlabel{sci:pot-100}{{7.{1}}{136}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot\textendash threshold.sce}{136}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {7.5}Reading the potentiometer from Xcos}{136}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {7.3}{\ignorespaces Turning LEDs on through Xcos depending on the potentiometer threshold}}{137}\protected@file@percent } +\newlabel{85@xvr}{{}{137}} +\newlabel{85@vr}{{}{137}} +\newlabel{fig:pot-threshold}{{7.3}{137}} +\@writefile{toc}{\contentsline {paragraph}{Exercise:}{137}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {7.6}Reading the potentiometer from Python}{137}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {7.6.1}Reading the potentiometer}{137}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {7.1}{\ignorespaces Xcos parameters to turn on different LEDs depending on the potentiometer value\relax }}{138}\protected@file@percent } +\newlabel{tab:pot-threshold}{{7.1}{138}} +\newlabel{86@xvr}{{}{138}} +\newlabel{86@vr}{{}{138}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot\textendash threshold.py}{138}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot\textendash threshold.py}{139}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {7.6.2}Python Code}{139}\protected@file@percent } +\newlabel{sec:pot-python-code}{{7.6.2}{139}} \@writefile{pyd}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {pymass}{{Python Code}{8.{1}}{}}{161}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {8.{1}}Turning on LEDs depending on the potentiometer threshold}{161}\protected@file@percent } -\newlabel{111@xvr}{{}{161}} -\newlabel{111@vr}{{}{161}} -\newlabel{py:pot-100}{{8.{1}}{161}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot\textendash threshold.py}{161}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {8.7}Reading the potentiometer from Julia}{162}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.7.1}Reading the potentiometer}{162}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot\textendash threshold.jl}{162}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot\textendash threshold.jl}{162}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.7.2}Julia Code}{163}\protected@file@percent } -\newlabel{sec:pot-julia-code}{{8.7.2}{163}} +\@writefile{thm}{\contentsline {pymass}{{Python Code}{7.{1}}{}}{139}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{139}\protected@file@percent } +\newlabel{87@xvr}{{}{139}} +\newlabel{87@vr}{{}{139}} +\newlabel{py:pot-100}{{7.{1}}{139}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot\textendash threshold.py}{139}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {7.7}Reading the potentiometer from Julia}{140}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {7.7.1}Reading the potentiometer}{140}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot\textendash threshold.jl}{140}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot\textendash threshold.jl}{140}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {7.7.2}Julia Code}{141}\protected@file@percent } +\newlabel{sec:pot-julia-code}{{7.7.2}{141}} \@writefile{juliad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{8.{1}}{}}{163}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {8.{1}}Turning on LEDs depending on the potentiometer threshold}{163}\protected@file@percent } -\newlabel{112@xvr}{{}{163}} -\newlabel{112@vr}{{}{163}} -\newlabel{julia:pot-100}{{8.{1}}{163}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot\textendash threshold.jl}{163}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {8.8}Reading the potentiometer from OpenModelica}{163}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.8.1}Reading the potentiometer}{163}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot\textendash threshold.mo}{163}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot\textendash threshold.mo}{164}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {8.8.2}OpenModelica Code}{164}\protected@file@percent } -\newlabel{sec:pot-OpenModelica-code}{{8.8.2}{164}} +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{7.{1}}{}}{141}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{141}\protected@file@percent } +\newlabel{88@xvr}{{}{141}} +\newlabel{88@vr}{{}{141}} +\newlabel{julia:pot-100}{{7.{1}}{141}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot\textendash threshold.jl}{141}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {7.8}Reading the potentiometer from OpenModelica}{141}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.1}Reading the potentiometer}{141}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot\textendash threshold.mo}{141}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot\textendash threshold.mo}{142}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {7.8.2}OpenModelica Code}{142}\protected@file@percent } +\newlabel{sec:pot-OpenModelica-code}{{7.8.2}{142}} \@writefile{OpenModelicad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{1}}{}}{164}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {8.{1}}Turning on LEDs depending on the potentiometer threshold}{164}\protected@file@percent } -\newlabel{113@xvr}{{}{164}} -\newlabel{113@vr}{{}{164}} -\newlabel{OpenModelica:pot-100}{{8.{1}}{164}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot\textendash threshold.mo}{164}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{7.{1}}{}}{142}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{142}\protected@file@percent } +\newlabel{89@xvr}{{}{142}} +\newlabel{89@vr}{{}{142}} +\newlabel{OpenModelica:pot-100}{{7.{1}}{142}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot\textendash threshold.mo}{142}\protected@file@percent } \citation{therm-wiki} \citation{therm-wiki} -\@writefile{toc}{\contentsline {chapter}{\numberline {9}Interfacing a Thermistor}{167}\protected@file@percent } +\@writefile{toc}{\contentsline {chapter}{\numberline {8}Interfacing a Thermistor}{145}\protected@file@percent } \@writefile{lof}{\addvspace {10\p@ }} \@writefile{lot}{\addvspace {10\p@ }} -\newlabel{thermistor}{{9}{167}} -\@writefile{toc}{\contentsline {section}{\numberline {9.1}Preliminaries}{167}\protected@file@percent } -\newlabel{fig:therm}{{9.1a}{168}} +\newlabel{thermistor}{{8}{145}} +\@writefile{toc}{\contentsline {section}{\numberline {8.1}Preliminaries}{145}\protected@file@percent } +\newlabel{fig:therm}{{8.1a}{146}} \newlabel{sub@fig:therm}{{(a)}{a}} -\newlabel{fig:thermsym}{{9.1b}{168}} +\newlabel{fig:thermsym}{{8.1b}{146}} \newlabel{sub@fig:thermsym}{{(b)}{b}} -\@writefile{lof}{\contentsline {figure}{\numberline {9.1}{\ignorespaces Pictorial and symbolic representation of a thermistor\relax }}{168}\protected@file@percent } -\@writefile{lof}{\contentsline {subfigure}{\numberline{(a)}{\ignorespaces {Pictorial representation of a thermistor\cite {therm-wiki}}}}{168}\protected@file@percent } -\@writefile{lof}{\contentsline {subfigure}{\numberline{(b)}{\ignorespaces {Symbolic representation of a thermistor}}}{168}\protected@file@percent } -\newlabel{fig:therm-conn}{{9.2a}{168}} +\@writefile{lof}{\contentsline {figure}{\numberline {8.1}{\ignorespaces Pictorial and symbolic representation of a thermistor\relax }}{146}\protected@file@percent } +\@writefile{lof}{\contentsline {subfigure}{\numberline{(a)}{\ignorespaces {Pictorial representation of a thermistor\cite {therm-wiki}}}}{146}\protected@file@percent } +\@writefile{lof}{\contentsline {subfigure}{\numberline{(b)}{\ignorespaces {Symbolic representation of a thermistor}}}{146}\protected@file@percent } +\newlabel{fig:therm-conn}{{8.2a}{146}} \newlabel{sub@fig:therm-conn}{{(a)}{a}} -\newlabel{fig:buzzer-conn}{{9.2b}{168}} +\newlabel{fig:buzzer-conn}{{8.2b}{146}} \newlabel{sub@fig:buzzer-conn}{{(b)}{b}} -\@writefile{lof}{\contentsline {figure}{\numberline {9.2}{\ignorespaces Thermistor and buzzer connection diagrams\relax }}{168}\protected@file@percent } -\@writefile{lof}{\contentsline {subfigure}{\numberline{(a)}{\ignorespaces {Thermistor connection diagram}}}{168}\protected@file@percent } -\@writefile{lof}{\contentsline {subfigure}{\numberline{(b)}{\ignorespaces {Buzzer connection diagram}}}{168}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {9.2}Connecting a thermistor with Arduino Uno\ using a breadboard}{168}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {9.3}{\ignorespaces A thermistor to read its values with Arduino Uno using a breadboard\relax }}{169}\protected@file@percent } -\newlabel{fig:ard-therm-bread}{{9.3}{169}} -\@writefile{lof}{\contentsline {figure}{\numberline {9.4}{\ignorespaces A thermistor to control a buzzer with Arduino Uno using a breadboard\relax }}{170}\protected@file@percent } -\newlabel{fig:ard-therm-buzzer}{{9.4}{170}} -\@writefile{toc}{\contentsline {section}{\numberline {9.3}Interfacing the Thermistor from the Arduino IDE}{170}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.1}Interfacing the Thermistor}{170}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{170}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{170}\protected@file@percent } -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{170}\protected@file@percent } -\@writefile{thm}{\contentsline {egmass}{{Exercise}{9.{1}}{}}{171}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.2}Arduino Code}{171}\protected@file@percent } -\newlabel{sec:therm-arduino-code}{{9.3.2}{171}} +\@writefile{lof}{\contentsline {figure}{\numberline {8.2}{\ignorespaces Thermistor and buzzer connection diagrams\relax }}{146}\protected@file@percent } +\@writefile{lof}{\contentsline {subfigure}{\numberline{(a)}{\ignorespaces {Thermistor connection diagram}}}{146}\protected@file@percent } +\@writefile{lof}{\contentsline {subfigure}{\numberline{(b)}{\ignorespaces {Buzzer connection diagram}}}{146}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {8.2}Connecting a thermistor with Arduino Uno\ using a breadboard}{146}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {8.3}{\ignorespaces A thermistor to read its values with Arduino Uno using a breadboard\relax }}{147}\protected@file@percent } +\newlabel{fig:ard-therm-bread}{{8.3}{147}} +\@writefile{lof}{\contentsline {figure}{\numberline {8.4}{\ignorespaces A thermistor to control a buzzer with Arduino Uno using a breadboard\relax }}{148}\protected@file@percent } +\newlabel{fig:ard-therm-buzzer}{{8.4}{148}} +\@writefile{toc}{\contentsline {section}{\numberline {8.3}Interfacing the Thermistor from the Arduino IDE}{148}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.3.1}Interfacing the Thermistor}{148}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{148}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{148}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{148}\protected@file@percent } +\@writefile{thm}{\contentsline {egmass}{{Exercise}{8.{1}}{}}{149}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.3.2}Arduino Code}{149}\protected@file@percent } +\newlabel{sec:therm-arduino-code}{{8.3.2}{149}} +\@writefile{ard}{\addvspace {10pt}} +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{8.{1}}{}}{149}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{149}\protected@file@percent } +\newlabel{90@xvr}{{}{149}} +\newlabel{90@vr}{{}{149}} +\newlabel{ard:therm-read}{{8.{1}}{149}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{149}\protected@file@percent } +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{8.{2}}{}}{150}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{150}\protected@file@percent } +\newlabel{91@xvr}{{}{150}} +\newlabel{91@vr}{{}{150}} +\newlabel{ard:therm-buzzer}{{8.{2}}{150}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash buzzer/therm\textendash buzzer.ino}{150}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {8.4}Interfacing the Thermistor from Scilab}{150}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.4.1}Interfacing the Thermistor}{150}\protected@file@percent } +\@writefile{thm}{\contentsline {egmass}{{Exercise}{8.{2}}{}}{151}\protected@file@percent } +\newlabel{therm-abc}{{8.1}{151}} +\newlabel{therm-beta}{{8.2}{152}} +\@writefile{toc}{\contentsline {subsection}{\numberline {8.4.2}Scilab Code}{152}\protected@file@percent } +\newlabel{sec:therm-scilab-code}{{8.4.2}{152}} +\@writefile{cod}{\addvspace {10pt}} +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{8.{1}}{}}{152}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{152}\protected@file@percent } +\newlabel{92@xvr}{{}{152}} +\newlabel{92@vr}{{}{152}} +\newlabel{sci:therm-read}{{8.{1}}{152}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm\textendash read.sce}{152}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{8.{2}}{}}{152}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{152}\protected@file@percent } +\newlabel{93@xvr}{{}{152}} +\newlabel{93@vr}{{}{152}} +\newlabel{sci:therm-buzzer}{{8.{2}}{152}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm\textendash buzzer.sce}{152}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {8.5}{\ignorespaces Xcos diagram to read thermistor values}}{153}\protected@file@percent } +\newlabel{95@xvr}{{}{153}} +\newlabel{95@vr}{{}{153}} +\newlabel{fig:therm-read}{{8.5}{153}} +\@writefile{toc}{\contentsline {section}{\numberline {8.5}Interfacing the Thermistor from Xcos}{153}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {8.1}{\ignorespaces Xcos parameters to read thermistor\relax }}{154}\protected@file@percent } +\newlabel{tab:therm-read}{{8.1}{154}} +\newlabel{96@xvr}{{}{154}} +\newlabel{96@vr}{{}{154}} +\@writefile{lof}{\contentsline {figure}{\numberline {8.6}{\ignorespaces Output of Xcos diagram to read thermistor values}}{154}\protected@file@percent } +\newlabel{98@xvr}{{}{154}} +\newlabel{98@vr}{{}{154}} +\newlabel{fig:therm-read-output}{{8.6}{154}} +\@writefile{lof}{\contentsline {figure}{\numberline {8.7}{\ignorespaces Xcos diagram to read the value of thermistor, which is used to turn the buzzer on or off}}{155}\protected@file@percent } +\newlabel{100@xvr}{{}{155}} +\newlabel{100@vr}{{}{155}} +\newlabel{fig:therm-buzzer}{{8.7}{155}} +\@writefile{lof}{\contentsline {figure}{\numberline {8.8}{\ignorespaces Output of Xcos diagram to switch buzzer through thermistor values}}{155}\protected@file@percent } +\newlabel{103@xvr}{{}{155}} +\newlabel{103@vr}{{}{155}} +\newlabel{fig:therm-buzzer-output}{{8.8}{155}} +\@writefile{lot}{\contentsline {table}{\numberline {8.2}{\ignorespaces Xcos parameters to read thermistor and switch the buzzer\relax }}{156}\protected@file@percent } +\newlabel{tab:ldr-led}{{8.2}{156}} +\newlabel{101@xvr}{{}{156}} +\newlabel{101@vr}{{}{156}} +\@writefile{toc}{\contentsline {section}{\numberline {8.6}Interfacing the Thermistor from Python}{156}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.1}Interfacing the Thermistor}{156}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.6.2}Python Code}{157}\protected@file@percent } +\newlabel{sec:therm-pyhton-code}{{8.6.2}{157}} +\@writefile{pyd}{\addvspace {10pt}} +\@writefile{thm}{\contentsline {pymass}{{Python Code}{8.{1}}{}}{157}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{157}\protected@file@percent } +\newlabel{104@xvr}{{}{157}} +\newlabel{104@vr}{{}{157}} +\newlabel{py:therm-read}{{8.{1}}{157}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm\textendash read.py}{157}\protected@file@percent } +\@writefile{thm}{\contentsline {pymass}{{Python Code}{8.{2}}{}}{158}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{158}\protected@file@percent } +\newlabel{105@xvr}{{}{158}} +\newlabel{105@vr}{{}{158}} +\newlabel{py:therm-buzzer}{{8.{2}}{158}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm\textendash buzzer.py}{158}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {8.7}Interfacing the Thermistor from Julia}{159}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.7.1}Interfacing the Thermistor}{159}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.7.2}Julia Code}{159}\protected@file@percent } +\newlabel{sec:therm-julia-code}{{8.7.2}{159}} +\@writefile{juliad}{\addvspace {10pt}} +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{8.{1}}{}}{159}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{159}\protected@file@percent } +\newlabel{106@xvr}{{}{159}} +\newlabel{106@vr}{{}{159}} +\newlabel{julia:therm-read}{{8.{1}}{159}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm\textendash read.jl}{159}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{8.{2}}{}}{160}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{160}\protected@file@percent } +\newlabel{107@xvr}{{}{160}} +\newlabel{107@vr}{{}{160}} +\newlabel{julia:therm-buzzer}{{8.{2}}{160}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm\textendash buzzer.jl}{160}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {8.8}Interfacing the Thermistor from OpenModelica}{160}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.8.1}Interfacing the Thermistor}{160}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {8.8.2}OpenModelica Code}{161}\protected@file@percent } +\newlabel{sec:therm-OpenModelica-code}{{8.8.2}{161}} +\@writefile{OpenModelicad}{\addvspace {10pt}} +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{1}}{}}{161}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{161}\protected@file@percent } +\newlabel{108@xvr}{{}{161}} +\newlabel{108@vr}{{}{161}} +\newlabel{OpenModelica:therm-read}{{8.{1}}{161}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm\textendash read.mo}{161}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{2}}{}}{162}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{162}\protected@file@percent } +\newlabel{109@xvr}{{}{162}} +\newlabel{109@vr}{{}{162}} +\newlabel{OpenModelica:therm-buzzer}{{8.{2}}{162}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm\textendash buzzer.mo}{162}\protected@file@percent } +\@writefile{toc}{\contentsline {chapter}{\numberline {9}Controlling a DC motor}{163}\protected@file@percent } +\@writefile{lof}{\addvspace {10\p@ }} +\@writefile{lot}{\addvspace {10\p@ }} +\newlabel{dcmotor}{{9}{163}} +\@writefile{toc}{\contentsline {section}{\numberline {9.1}Preliminaries}{163}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {9.1}{\ignorespaces L293D motor driver board\relax }}{164}\protected@file@percent } +\newlabel{fig:motordriverboard}{{9.1}{164}} +\@writefile{lof}{\contentsline {figure}{\numberline {9.2}{\ignorespaces A schematic of DC motor connections\relax }}{165}\protected@file@percent } +\newlabel{fig:dcm-schematic}{{9.2}{165}} +\@writefile{lof}{\contentsline {figure}{\numberline {9.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{165}\protected@file@percent } +\newlabel{fig:dcmotorconn}{{9.3}{165}} +\@writefile{toc}{\contentsline {section}{\numberline {9.2}Controlling the DC motor from Arduino}{165}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.2.1}Controlling the DC motor}{165}\protected@file@percent } +\newlabel{sec:dcm-ard}{{9.2.1}{165}} +\@writefile{thm}{\contentsline {egmass}{{Exercise}{9.{1}}{}}{166}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.2.2}Arduino Code}{167}\protected@file@percent } +\newlabel{sec:dcmotor-arduino-code}{{9.2.2}{167}} \@writefile{ard}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{9.{1}}{}}{171}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {9.{1}}Read and display the thermistor values}{171}\protected@file@percent } +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{9.{1}}{}}{167}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{167}\protected@file@percent } +\newlabel{110@xvr}{{}{167}} +\newlabel{110@vr}{{}{167}} +\newlabel{ard:dcmotor-clock}{{9.{1}}{167}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash clock/dcmotor\textendash clock.ino}{167}\protected@file@percent } +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{9.{2}}{}}{167}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{167}\protected@file@percent } +\newlabel{111@xvr}{{}{167}} +\newlabel{111@vr}{{}{167}} +\newlabel{ard:dcmotor-both}{{9.{2}}{167}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash both/dcmotor\textendash both.ino}{167}\protected@file@percent } +\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{9.{3}}{}}{167}\protected@file@percent } +\@writefile{ard}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{167}\protected@file@percent } +\newlabel{112@xvr}{{}{167}} +\newlabel{112@vr}{{}{167}} +\newlabel{ard:dcmotor-loop}{{9.{3}}{167}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor\textendash loop/dcmotor\textendash loop.ino}{168}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {9.3}Controlling the DC motor from Scilab}{168}\protected@file@percent } +\newlabel{sec:dcm-sci}{{9.3}{168}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.1}Initialization}{168}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {9.1}{\ignorespaces A numbering convention used in the DC motor breakout board\relax }}{169}\protected@file@percent } +\newlabel{table:convention}{{9.1}{169}} +\@writefile{lot}{\contentsline {table}{\numberline {9.2}{\ignorespaces Parameters for DC motor initialization\relax }}{169}\protected@file@percent } +\newlabel{tab:dcmotor-init}{{9.2}{169}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{169}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.2}Rotation for a specified time}{169}\protected@file@percent } +\newlabel{sec:dc-both}{{9.3.2}{169}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{169}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{170}\protected@file@percent } +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{170}\protected@file@percent } +\@writefile{thm}{\contentsline {egmass}{{Exercise}{9.{2}}{}}{170}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.3}Using the capabilities of Scilab}{170}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.3.4}Scilab Code}{171}\protected@file@percent } +\newlabel{sec:dcmotor-scilab-code}{{9.3.4}{171}} +\@writefile{cod}{\addvspace {10pt}} +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{9.{1}}{}}{171}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{171}\protected@file@percent } +\newlabel{113@xvr}{{}{171}} +\newlabel{113@vr}{{}{171}} +\newlabel{sci:dcmotor-clock}{{9.{1}}{171}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash clock.sce}{171}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{9.{2}}{}}{171}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{171}\protected@file@percent } \newlabel{114@xvr}{{}{171}} \newlabel{114@vr}{{}{171}} -\newlabel{ard:therm-read}{{9.{1}}{171}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash read/therm\textendash read.ino}{171}\protected@file@percent } -\@writefile{thm}{\contentsline {ardmass}{{Arduino Code}{9.{2}}{}}{172}\protected@file@percent } -\@writefile{ard}{\contentsline {section}{\numberline {9.{2}}Turning the buzzer on and off using thermistor values}{172}\protected@file@percent } -\newlabel{115@xvr}{{}{172}} -\newlabel{115@vr}{{}{172}} -\newlabel{ard:therm-buzzer}{{9.{2}}{172}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm\textendash buzzer/therm\textendash buzzer.ino}{172}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {9.4}Interfacing the Thermistor from Scilab}{172}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.4.1}Interfacing the Thermistor}{172}\protected@file@percent } -\@writefile{thm}{\contentsline {egmass}{{Exercise}{9.{2}}{}}{173}\protected@file@percent } -\newlabel{therm-abc}{{9.1}{173}} -\newlabel{therm-beta}{{9.2}{174}} -\@writefile{toc}{\contentsline {subsection}{\numberline {9.4.2}Scilab Code}{174}\protected@file@percent } -\newlabel{sec:therm-scilab-code}{{9.4.2}{174}} -\@writefile{cod}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{9.{1}}{}}{174}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {9.{1}}Read and display the thermistor values}{174}\protected@file@percent } -\newlabel{116@xvr}{{}{174}} -\newlabel{116@vr}{{}{174}} -\newlabel{sci:therm-read}{{9.{1}}{174}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm\textendash read.sce}{174}\protected@file@percent } -\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{9.{2}}{}}{174}\protected@file@percent } -\@writefile{cod}{\contentsline {section}{\numberline {9.{2}}Turning the buzzer on and off using thermistor values}{174}\protected@file@percent } -\newlabel{117@xvr}{{}{174}} -\newlabel{117@vr}{{}{174}} -\newlabel{sci:therm-buzzer}{{9.{2}}{174}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm\textendash buzzer.sce}{174}\protected@file@percent } -\@writefile{lof}{\contentsline {figure}{\numberline {9.5}{\ignorespaces Xcos diagram to read thermistor values}}{175}\protected@file@percent } -\newlabel{119@xvr}{{}{175}} -\newlabel{119@vr}{{}{175}} -\newlabel{fig:therm-read}{{9.5}{175}} -\@writefile{toc}{\contentsline {section}{\numberline {9.5}Interfacing the Thermistor from Xcos}{175}\protected@file@percent } -\@writefile{lot}{\contentsline {table}{\numberline {9.1}{\ignorespaces Xcos parameters to read thermistor\relax }}{176}\protected@file@percent } -\newlabel{tab:therm-read}{{9.1}{176}} -\newlabel{120@xvr}{{}{176}} -\newlabel{120@vr}{{}{176}} -\@writefile{lof}{\contentsline {figure}{\numberline {9.6}{\ignorespaces Output of Xcos diagram to read thermistor values}}{176}\protected@file@percent } -\newlabel{122@xvr}{{}{176}} -\newlabel{122@vr}{{}{176}} -\newlabel{fig:therm-read-output}{{9.6}{176}} -\@writefile{lof}{\contentsline {figure}{\numberline {9.7}{\ignorespaces Xcos diagram to read the value of thermistor, which is used to turn the buzzer on or off}}{177}\protected@file@percent } -\newlabel{124@xvr}{{}{177}} -\newlabel{124@vr}{{}{177}} -\newlabel{fig:therm-buzzer}{{9.7}{177}} -\@writefile{lof}{\contentsline {figure}{\numberline {9.8}{\ignorespaces Output of Xcos diagram to switch buzzer through thermistor values}}{177}\protected@file@percent } -\newlabel{127@xvr}{{}{177}} -\newlabel{127@vr}{{}{177}} -\newlabel{fig:therm-buzzer-output}{{9.8}{177}} -\@writefile{lot}{\contentsline {table}{\numberline {9.2}{\ignorespaces Xcos parameters to read thermistor and switch the buzzer\relax }}{178}\protected@file@percent } -\newlabel{tab:ldr-led}{{9.2}{178}} -\newlabel{125@xvr}{{}{178}} -\newlabel{125@vr}{{}{178}} -\@writefile{toc}{\contentsline {section}{\numberline {9.6}Interfacing the Thermistor from Python}{178}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.6.1}Interfacing the Thermistor}{178}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.6.2}Python Code}{179}\protected@file@percent } -\newlabel{sec:therm-pyhton-code}{{9.6.2}{179}} +\newlabel{sci:dcmotor-both}{{9.{2}}{171}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash both.sce}{171}\protected@file@percent } +\@writefile{thm}{\contentsline {codemass}{{Scilab Code}{9.{3}}{}}{171}\protected@file@percent } +\@writefile{cod}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{171}\protected@file@percent } +\newlabel{115@xvr}{{}{171}} +\newlabel{115@vr}{{}{171}} +\newlabel{sci:dcmotor-loop}{{9.{3}}{171}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor\textendash loop.sce}{171}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {9.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{172}\protected@file@percent } +\newlabel{117@xvr}{{}{172}} +\newlabel{117@vr}{{}{172}} +\newlabel{fig:dcmotor-clock}{{9.4}{172}} +\@writefile{toc}{\contentsline {section}{\numberline {9.4}Controlling the DC Motor from Xcos}{172}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {9.3}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{173}\protected@file@percent } +\newlabel{tab:dcmotor-clock}{{9.3}{173}} +\newlabel{118@xvr}{{}{173}} +\newlabel{118@vr}{{}{173}} +\@writefile{thm}{\contentsline {egmass}{{Exercise}{9.{3}}{}}{173}\protected@file@percent } +\@writefile{lof}{\contentsline {figure}{\numberline {9.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{174}\protected@file@percent } +\newlabel{120@xvr}{{}{174}} +\newlabel{120@vr}{{}{174}} +\newlabel{fig:dcmotor-both}{{9.5}{174}} +\@writefile{lot}{\contentsline {table}{\numberline {9.4}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{174}\protected@file@percent } +\newlabel{tab:dcmotor-both}{{9.4}{174}} +\newlabel{121@xvr}{{}{174}} +\newlabel{121@vr}{{}{174}} +\@writefile{lof}{\contentsline {figure}{\numberline {9.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{175}\protected@file@percent } +\newlabel{123@xvr}{{}{175}} +\newlabel{123@vr}{{}{175}} +\newlabel{fig:dcmotor-loop}{{9.6}{175}} +\@writefile{toc}{\contentsline {section}{\numberline {9.5}Controlling the DC Motor from Python}{175}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.5.1}Controlling the DC Motor}{175}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {9.5}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{176}\protected@file@percent } +\newlabel{tab:dcmotor-loop}{{9.5}{176}} +\newlabel{124@xvr}{{}{176}} +\newlabel{124@vr}{{}{176}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.5.2}Python Code}{177}\protected@file@percent } +\newlabel{sec:dcmotor-python-code}{{9.5.2}{177}} \@writefile{pyd}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {pymass}{{Python Code}{9.{1}}{}}{179}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {9.{1}}Read and display the thermistor values}{179}\protected@file@percent } -\newlabel{128@xvr}{{}{179}} -\newlabel{128@vr}{{}{179}} -\newlabel{py:therm-read}{{9.{1}}{179}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm\textendash read.py}{179}\protected@file@percent } -\@writefile{thm}{\contentsline {pymass}{{Python Code}{9.{2}}{}}{180}\protected@file@percent } -\@writefile{pyd}{\contentsline {section}{\numberline {9.{2}}Turning the buzzer on and off using thermistor values}{180}\protected@file@percent } -\newlabel{129@xvr}{{}{180}} -\newlabel{129@vr}{{}{180}} -\newlabel{py:therm-buzzer}{{9.{2}}{180}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm\textendash buzzer.py}{180}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {9.7}Interfacing the Thermistor from Julia}{181}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.7.1}Interfacing the Thermistor}{181}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.7.2}Julia Code}{181}\protected@file@percent } -\newlabel{sec:therm-julia-code}{{9.7.2}{181}} +\@writefile{thm}{\contentsline {pymass}{{Python Code}{9.{1}}{}}{177}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{177}\protected@file@percent } +\newlabel{125@xvr}{{}{177}} +\newlabel{125@vr}{{}{177}} +\newlabel{py:dcmotor-clock}{{9.{1}}{177}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash clock.py}{177}\protected@file@percent } +\@writefile{thm}{\contentsline {pymass}{{Python Code}{9.{2}}{}}{178}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{178}\protected@file@percent } +\newlabel{126@xvr}{{}{178}} +\newlabel{126@vr}{{}{178}} +\newlabel{py:dcmotor-both}{{9.{2}}{178}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash both.py}{178}\protected@file@percent } +\@writefile{thm}{\contentsline {pymass}{{Python Code}{9.{3}}{}}{178}\protected@file@percent } +\@writefile{pyd}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{178}\protected@file@percent } +\newlabel{127@xvr}{{}{179}} +\newlabel{127@vr}{{}{179}} +\newlabel{py:dcmotor-loop}{{9.{3}}{179}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor\textendash loop.py}{179}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {9.6}Controlling the DC Motor from Julia}{180}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.6.1}Controlling the DC Motor}{180}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.6.2}Julia Code}{180}\protected@file@percent } +\newlabel{sec:dcmotor-julia-code}{{9.6.2}{180}} \@writefile{juliad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{9.{1}}{}}{181}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {9.{1}}Read and display the thermistor values}{181}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{9.{1}}{}}{180}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{180}\protected@file@percent } +\newlabel{128@xvr}{{}{180}} +\newlabel{128@vr}{{}{180}} +\newlabel{julia:dcmotor-clock}{{9.{1}}{180}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash clock.jl}{180}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{9.{2}}{}}{181}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{181}\protected@file@percent } +\newlabel{129@xvr}{{}{181}} +\newlabel{129@vr}{{}{181}} +\newlabel{julia:dcmotor-both}{{9.{2}}{181}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash both.jl}{181}\protected@file@percent } +\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{9.{3}}{}}{181}\protected@file@percent } +\@writefile{juliad}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{181}\protected@file@percent } \newlabel{130@xvr}{{}{181}} \newlabel{130@vr}{{}{181}} -\newlabel{julia:therm-read}{{9.{1}}{181}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm\textendash read.jl}{181}\protected@file@percent } -\@writefile{thm}{\contentsline {juliamass}{{Julia Code}{9.{2}}{}}{182}\protected@file@percent } -\@writefile{juliad}{\contentsline {section}{\numberline {9.{2}}Turning the buzzer on and off using thermistor values}{182}\protected@file@percent } +\newlabel{julia:dcmotor-loop}{{9.{3}}{181}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor\textendash loop.jl}{181}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {9.7}Controlling the DC Motor from OpenModelica}{181}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.7.1}Controlling the DC Motor}{181}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {9.7.2}OpenModelica Code}{182}\protected@file@percent } +\newlabel{sec:dcmotor-OpenModelica-code}{{9.7.2}{182}} +\@writefile{OpenModelicad}{\addvspace {10pt}} +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{1}}{}}{182}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{182}\protected@file@percent } \newlabel{131@xvr}{{}{182}} \newlabel{131@vr}{{}{182}} -\newlabel{julia:therm-buzzer}{{9.{2}}{182}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm\textendash buzzer.jl}{182}\protected@file@percent } -\@writefile{toc}{\contentsline {section}{\numberline {9.8}Interfacing the Thermistor from OpenModelica}{182}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.8.1}Interfacing the Thermistor}{182}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {9.8.2}OpenModelica Code}{183}\protected@file@percent } -\newlabel{sec:therm-OpenModelica-code}{{9.8.2}{183}} -\@writefile{OpenModelicad}{\addvspace {10pt}} -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{1}}{}}{183}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {9.{1}}Read and display the thermistor values}{183}\protected@file@percent } -\newlabel{132@xvr}{{}{183}} -\newlabel{132@vr}{{}{183}} -\newlabel{OpenModelica:therm-read}{{9.{1}}{183}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm\textendash read.mo}{183}\protected@file@percent } -\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{2}}{}}{184}\protected@file@percent } -\@writefile{OpenModelicad}{\contentsline {section}{\numberline {9.{2}}Turning the buzzer on and off using thermistor values}{184}\protected@file@percent } -\newlabel{133@xvr}{{}{184}} -\newlabel{133@vr}{{}{184}} -\newlabel{OpenModelica:therm-buzzer}{{9.{2}}{184}} -\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm\textendash buzzer.mo}{184}\protected@file@percent } +\newlabel{OpenModelica:dcmotor-clock}{{9.{1}}{182}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash clock.mo}{182}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{2}}{}}{182}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{182}\protected@file@percent } +\newlabel{132@xvr}{{}{182}} +\newlabel{132@vr}{{}{182}} +\newlabel{OpenModelica:dcmotor-both}{{9.{2}}{182}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash both.mo}{183}\protected@file@percent } +\@writefile{thm}{\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{3}}{}}{183}\protected@file@percent } +\@writefile{OpenModelicad}{\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{183}\protected@file@percent } +\newlabel{133@xvr}{{}{183}} +\newlabel{133@vr}{{}{183}} +\newlabel{OpenModelica:dcmotor-loop}{{9.{3}}{183}} +\@writefile{lol}{\contentsline {lstlisting}{/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor\textendash loop.mo}{183}\protected@file@percent } \@writefile{toc}{\contentsline {chapter}{\numberline {10}Interfacing a Servomotor}{185}\protected@file@percent } \@writefile{lof}{\addvspace {10\p@ }} \@writefile{lot}{\addvspace {10\p@ }} diff --git a/floss-arduino.cod b/floss-arduino.cod index c9dfc9f..641ba73 100644 --- a/floss-arduino.cod +++ b/floss-arduino.cod @@ -14,14 +14,14 @@ \contentsline {section}{\numberline {6.{1}}Read and display the LDR values}{119}% \contentsline {section}{\numberline {6.{2}}Turning the blue LED on and off}{120}% \addvspace {10pt} -\contentsline {section}{\numberline {7.{1}}Rotating the DC motor}{139}% -\contentsline {section}{\numberline {7.{2}}Rotating the DC motor in both directions}{139}% -\contentsline {section}{\numberline {7.{3}}Rotating the DC motor in both directions in a loop}{139}% +\contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{136}% \addvspace {10pt} -\contentsline {section}{\numberline {8.{1}}Turning on LEDs depending on the potentiometer threshold}{158}% +\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{152}% +\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{152}% \addvspace {10pt} -\contentsline {section}{\numberline {9.{1}}Read and display the thermistor values}{174}% -\contentsline {section}{\numberline {9.{2}}Turning the buzzer on and off using thermistor values}{174}% +\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{171}% +\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{171}% +\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{171}% \addvspace {10pt} \contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{190}% \contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{190}% diff --git a/floss-arduino.fdb_latexmk b/floss-arduino.fdb_latexmk index 42ebaa7..44ae009 100644 --- a/floss-arduino.fdb_latexmk +++ b/floss-arduino.fdb_latexmk @@ -1,20 +1,20 @@ # Fdb version 3 -["bibtex floss-arduino"] 1619378671 "floss-arduino.aux" "floss-arduino.bbl" "floss-arduino" 1619378685 +["bibtex floss-arduino"] 1619403271 "floss-arduino.aux" "floss-arduino.bbl" "floss-arduino" 1619404406 "/usr/share/texlive/texmf-dist/bibtex/bst/base/unsrt.bst" 1292289607 18030 1376b4b231b50c66211e47e42eda2875 "" "bibliography.bib" 1619058609 4121 e0d02327e4bb995867623cd1f708046e "" - "floss-arduino.aux" 1619378684 130082 c0d0dfe18f4a0e4480f5f4a44e834aaf "pdflatex" + "floss-arduino.aux" 1619404406 130107 69b980419001beb2b0ce53c0ede79ce2 "pdflatex" (generated) "floss-arduino.blg" "floss-arduino.bbl" -["makeindex floss-arduino.idx"] 1619377935 "floss-arduino.idx" "floss-arduino.ind" "floss-arduino" 1619378685 - "floss-arduino.idx" 1619378684 187 17354befd342982efe000a89847c6f1f "pdflatex" +["makeindex floss-arduino.idx"] 1619403271 "floss-arduino.idx" "floss-arduino.ind" "floss-arduino" 1619404406 + "floss-arduino.idx" 1619404406 187 127d22f171683959438710553c1aeb57 "pdflatex" (generated) - "floss-arduino.ind" "floss-arduino.ilg" -["pdflatex"] 1619378671 "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" "floss-arduino" 1619378685 + "floss-arduino.ind" +["pdflatex"] 1619404397 "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" "floss-arduino" 1619404406 "/etc/texmf/web2c/texmf.cnf" 1602253014 475 c0e671620eb5563b2130f56340a5fde8 "" - "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux" 1619378684 130082 c0d0dfe18f4a0e4480f5f4a44e834aaf "" - "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" 1616757903 4558 ca761944339060a19cdb71de5337b126 "" + "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux" 1619404406 130107 69b980419001beb2b0ce53c0ede79ce2 "" + "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex" 1619403261 4558 99e8133d713ce68a01e2f2b59b0d6baf "" "/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc" 1165713224 4850 80dc9bab7f31fb78a000ccfed0e27cab "" "/usr/share/texlive/texmf-dist/fonts/map/fontname/texfonts.map" 1577235249 3524 cb3e574dea2d1052e39280babc910dc8 "" "/usr/share/texlive/texmf-dist/fonts/tfm/jknappen/ec/ecbx0900.tfm" 1136768653 3584 1a7de6c99457381c64abc1a7c545505f "" @@ -138,26 +138,29 @@ "/usr/share/texmf/web2c/texmf.cnf" 1581979058 38841 ce3692aa899bb693b90b87eaa5d4d84e "" "/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1604540077 4770781 1ed1abab22da9c3e2cc82e4db562318b "" "/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1604540101 8258883 e8330f8aa4fe7c6cdcf08bf0b72237fd "" - "floss-arduino.OpenModelicad" 1619378684 2299 3a4e14302ef770241ba0e77f5929e7c7 "pdflatex" - "floss-arduino.ard" 1619378684 2084 07a54e29a6a6a0bd0f7418e8e1853d7d "pdflatex" - "floss-arduino.aux" 1619378684 130082 c0d0dfe18f4a0e4480f5f4a44e834aaf "pdflatex" - "floss-arduino.bbl" 1619378671 2654 051fbb0ca9f90e7ce7d2577998098d98 "bibtex floss-arduino" - "floss-arduino.cod" 1619378684 2527 27a059d87658837c8df72c9cccfd3eb9 "pdflatex" - "floss-arduino.ind" 1619377935 228 3e4a191d4586b13fe79ab18b68d300d1 "makeindex floss-arduino.idx" - "floss-arduino.juliad" 1619378684 2320 1842e870f3a94f3362f839416a810f36 "pdflatex" - "floss-arduino.lof" 1619378684 13137 2db979c4c8224e9e0d31dfaba7ca6e9e "pdflatex" - "floss-arduino.lot" 1619378684 3702 d81e0afda848997b4aa7f535ebcf88e0 "pdflatex" - "floss-arduino.pyd" 1619378684 2327 e4a0a370b1be0af8c0ea7925e9817df8 "pdflatex" - "floss-arduino.tex" 1616757903 4558 ca761944339060a19cdb71de5337b126 "" - "floss-arduino.toc" 1619378684 15542 f9340c19d38ae17276511b00e0edae1b "pdflatex" + "floss-arduino.OpenModelicad" 1619404406 2299 89eee2271cf7b6651bb4ffc3b6e57071 "pdflatex" + "floss-arduino.ard" 1619404406 2084 6bad0e124799c33541dc2b8409055e82 "pdflatex" + "floss-arduino.aux" 1619404406 130107 69b980419001beb2b0ce53c0ede79ce2 "pdflatex" + "floss-arduino.bbl" 1619403271 2654 051fbb0ca9f90e7ce7d2577998098d98 "bibtex floss-arduino" + "floss-arduino.cod" 1619404406 2527 f3b2244ff032ebce91381284aaa5aaa3 "pdflatex" + "floss-arduino.ind" 1619403271 228 406d6b8e82a74b8f88d07279eacd2e35 "makeindex floss-arduino.idx" + "floss-arduino.juliad" 1619404406 2320 e3c6bb82c7cd9a87ee701d208aa3f761 "pdflatex" + "floss-arduino.lof" 1619404406 13137 11910ce6ccd75cea8cf16eea6248064b "pdflatex" + "floss-arduino.lot" 1619404406 3702 f2a1f5c0b1c8ea14ff4cfe4ae4542a36 "pdflatex" + "floss-arduino.pyd" 1619404406 2327 d827140ebdb728e756c9fcce7221bf61 "pdflatex" + "floss-arduino.tex" 1619403261 4558 99e8133d713ce68a01e2f2b59b0d6baf "" + "floss-arduino.toc" 1619404406 15542 fb05de791c4ca3fd940dd9d8123499fb "pdflatex" "suppl/acr.tex" 1615963613 1926 fd6481c4666ee0d60331b7d4cc24b645 "" "suppl/intro.tex" 1615963613 3437 b09628cf9e20fe17fa65b37a5997653c "" "suppl/styles.tex" 1615963613 8143 aa3280f0b59c8631fe8ec44895c9e871 "" "tools/arduino-firmware/arduino-firmware.ino" 1615963613 34362 dce80fc83f2a12c5a28422b7712bc3ac "" + "tools/julia/test_firmware.jl" 1619056276 168 3aaf8bf98ff271a626085f256b5bbbc9 "" + "tools/openmodelica/test_firmware.mo" 1619400452 616 087d18e8525d7f7e7b49bc700b2d08e4 "" + "tools/python/test_firmware.py" 1619119844 702 b3a122a1ebadec0840b6fc550c5e4e97 "" + "tools/scilab/test_firmware.sce" 1619392691 121 068cb1b11cc5bef7c9f9ddaa09316c22 "" "tools/shield/pcb_board_V1p2.png" 1615963613 39034 e737286dfaa03f083b37af936149ad4d "" "tools/shield/shield-V1p2.jpg" 1615963613 221681 3be329dcc0590284c83508bfc96ede10 "" "tools/shield/shield-V1p2.png" 1615963613 53354 a9da758f55dc80f179f1666876ecf261 "" - "tools/test_firmware.sce" 1615963613 117 284faf7c3b9a1a7fc9f34b15adcaa845 "" "user-code/dcmotor/OpenModelica/dcmotor-both.mo" 1615963613 1082 83d6eac8a66d717c6284b6ade0287601 "" "user-code/dcmotor/OpenModelica/dcmotor-clock.mo" 1615963613 973 f17376685d16673954c6ba57f7634e77 "" "user-code/dcmotor/OpenModelica/dcmotor-loop.mo" 1615963613 1212 64682eafa774ce359efdd3d63d27341a "" @@ -171,15 +174,15 @@ "user-code/dcmotor/figures/dcmotor-loop.png" 1615963613 28069 bc29d801afcbd2b0dcf5f9b69f21a4d9 "" "user-code/dcmotor/figures/dcmotor_board.png" 1615963613 114406 92155ec29d259e5fcda6bce5c6b08004 "" "user-code/dcmotor/figures/schematic.png" 1615963613 29144 971dcba68f6e79a1c3c5777dac2627ea "" - "user-code/dcmotor/julia/dcmotor-both.jl" 1615963613 196 92720229fca341a6a12f51dc5c621ef4 "" - "user-code/dcmotor/julia/dcmotor-clock.jl" 1615963613 164 8be6cb490bf6f3865bcfad764ffd215e "" - "user-code/dcmotor/julia/dcmotor-loop.jl" 1615963613 253 ac7ab3d63d1a4ca614d09d8202f8146e "" - "user-code/dcmotor/python/dcmotor-both.py" 1615963613 849 6dc6e246f894e02cd706646d6eafc8bb "" - "user-code/dcmotor/python/dcmotor-clock.py" 1615963613 823 f3b729c559cdfaf0120e15462d9d15c3 "" - "user-code/dcmotor/python/dcmotor-loop.py" 1615963613 952 cb8bbee7a980a5d3e6eecf7a24740284 "" - "user-code/dcmotor/scilab/dcmotor-both.sce" 1615963613 466 f4161dac876a5a4f5ba1e8626b87511f "" - "user-code/dcmotor/scilab/dcmotor-clock.sce" 1615963613 347 86ac126bdf94c50ae7fa49b4c85f2aec "" - "user-code/dcmotor/scilab/dcmotor-loop.sce" 1615963613 605 ce3f61c8fff2a7db071d5b152d6d238e "" + "user-code/dcmotor/julia/dcmotor-both.jl" 1618618069 261 0077ec42b539a84181d956b46e19dc7f "" + "user-code/dcmotor/julia/dcmotor-clock.jl" 1618011868 216 2168bf011db9b037e4f4e31c51934f64 "" + "user-code/dcmotor/julia/dcmotor-loop.jl" 1618618143 331 68491f3873f0f99bfa93cae90b3a5763 "" + "user-code/dcmotor/python/dcmotor-both.py" 1567596616 849 6dc6e246f894e02cd706646d6eafc8bb "" + "user-code/dcmotor/python/dcmotor-clock.py" 1567596580 823 f3b729c559cdfaf0120e15462d9d15c3 "" + "user-code/dcmotor/python/dcmotor-loop.py" 1567596568 952 cb8bbee7a980a5d3e6eecf7a24740284 "" + "user-code/dcmotor/scilab/dcmotor-both.sce" 1619404396 466 fb2e6adc272225681ca6d7e3f5acf2d0 "" + "user-code/dcmotor/scilab/dcmotor-clock.sce" 1619404365 347 0f1c7380c0565a6b776ed43b2ead332a "" + "user-code/dcmotor/scilab/dcmotor-loop.sce" 1619404376 605 8972b2bb4870599df482933d57b081de "" "user-code/hw-env/figures/OSHW-138px.png" 1615963613 8171 62fe0090b5a01299adb7fb7b4d9ac130 "" "user-code/hw-env/figures/arduino-3d-printer.jpg" 1615963613 39052 6dff9ea86aa1541b274437fe913ddd46 "" "user-code/hw-env/figures/arduino-ide.jpg" 1615963613 194767 bfef476ab04769e6b222de9ff24a9623 "" @@ -194,8 +197,8 @@ "user-code/hw-env/figures/shield-crop.jpg" 1615963614 88724 a405ddfd57bdc79018c6674fc399d67f "" "user-code/hw-env/figures/update-driver.png" 1615963614 40170 607a1cd06856f1eecd42ebc14fbe2daf "" "user-code/hw-env/hw-env.tex" 1618082024 19798 b085ac71ceaadcc1086ef83a9d10a2c1 "" - "user-code/ldr/OpenModelica/ldr-led.mo" 1615963614 1246 9c0dc0993bcd21f01e89bcf1b403c8b1 "" - "user-code/ldr/OpenModelica/ldr-read.mo" 1615963614 989 9dc1e823b5c929edaae5859675eb0060 "" + "user-code/ldr/OpenModelica/ldr-led.mo" 1619403218 1248 5d382a596718a83c7a45eb496aa73e62 "" + "user-code/ldr/OpenModelica/ldr-read.mo" 1619403225 990 bca32667a84a63b631d4ecff72b69630 "" "user-code/ldr/arduino/ldr-led/ldr-led.ino" 1615963614 330 447a5a22bd1fde20300f0e2fe8306db3 "" "user-code/ldr/arduino/ldr-read/ldr-read.ino" 1615963614 223 428416ae1ca1ac683e7cc49bc07972c3 "" "user-code/ldr/figures/LDR-led.png" 1617898904 240349 523edd11a7bcb1002c01b0410de0183e "" @@ -205,22 +208,21 @@ "user-code/ldr/figures/ldr-read-xcos.PNG" 1615963614 34063 b0eeeea9642553ea0bb2889cb52cfa60 "" "user-code/ldr/figures/ldr.jpg" 1615963614 4060 da1140b101edcf75176b3dfbb765dd42 "" "user-code/ldr/figures/ldr_sym.png" 1615963614 29267 73b70e220429569a98caa86348349aa1 "" - "user-code/ldr/julia/ldr-led.jl" 1615963614 226 06e515a8f72e1bd422164e137e169ccd "" - "user-code/ldr/julia/ldr-read.jl" 1615963614 172 3c22e807b98d0e14c9ed24c63191387a "" + "user-code/ldr/julia/ldr-led.jl" 1618052881 291 10c667eab24ab5d6a7dc26ea1caa6e1f "" + "user-code/ldr/julia/ldr-read.jl" 1617924880 198 2b86afecc5b0471921565b269dd05144 "" "user-code/ldr/ldr.tex" 1618127196 25445 0d2a101303264cec7a631b120efc2ca4 "" - "user-code/ldr/python/ldr-led.py" 1615963614 866 b724a956c314292b215cf655d7751fc2 "" - "user-code/ldr/python/ldr-read.py" 1615963614 686 16e0ee2162e2f212ba41d2c9d491f534 "" + "user-code/ldr/python/ldr-led.py" 1567596716 866 b724a956c314292b215cf655d7751fc2 "" + "user-code/ldr/python/ldr-read.py" 1567596692 686 16e0ee2162e2f212ba41d2c9d491f534 "" "user-code/ldr/scilab/ldr-led.sce" 1615963614 444 0895e89b3e22312736acf271c6315dea "" "user-code/ldr/scilab/ldr-read.sce" 1615963614 365 2baf1b4875c7cad242e65a3708abc113 "" - "user-code/led/OpenModelica/led-blue-delay.mo" 1615963614 1037 9e13fc17788ee59a36647f3f7507d464 "" - "user-code/led/OpenModelica/led-blue-red.mo" 1615963614 1152 02fbddba26b3d48ab782c0b69d27d7cc "" - "user-code/led/OpenModelica/led-blue.mo" 1615963614 796 7b6b4a4a4107c63c80bb0575a37ec9ff "" - "user-code/led/OpenModelica/led-green-blink.mo" 1615963614 1091 a1997012cbd29ea813ffbde1eb03a020 "" - "user-code/led/OpenModelica/test_firmware.mo" 1615963614 383 0f34571f00e8587e91f97c42155eceae "" - "user-code/led/arduino/led-blink/led-blink.ino" 1615963614 367 d039d0b254aa0be872e45337dbc97184 "" + "user-code/led/OpenModelica/led-blue-delay.mo" 1619402012 1038 e68c66c652fb55ef6e6e7826db23784a "" + "user-code/led/OpenModelica/led-blue-red.mo" 1619402018 1153 936d3de74c2858225d14f194e8dad81b "" + "user-code/led/OpenModelica/led-blue.mo" 1619402001 797 41e35c788c1181860958bd528270b5f2 "" + "user-code/led/OpenModelica/led-green-blink.mo" 1619402026 1092 2cf4b168f1de4b87c38b18892c3a5e35 "" "user-code/led/arduino/led-blue-delay/led-blue-delay.ino" 1615963614 131 e1d65f6bf12ce001f58bce4b6329eb63 "" "user-code/led/arduino/led-blue-red/led-blue-red.ino" 1615963614 209 b38328526259cf1e17b49c57c444af0b "" "user-code/led/arduino/led-blue/led-blue.ino" 1615963614 97 4006c8c86295abd9738d078b66a4a9e2 "" + "user-code/led/arduino/led-green-blink/led-green-blink.ino" 1615963614 367 d039d0b254aa0be872e45337dbc97184 "" "user-code/led/figures/arduino-shield.JPG" 1615963614 6411797 2af753c9693c789bfeac0924e48d8062 "" "user-code/led/figures/led-blue-delay.png" 1615963614 24224 74fb9d7d47c0e80095ffd6941b94d7ed "" "user-code/led/figures/led-blue-red.png" 1615963614 33412 93a5fd2d5f2d8434e507136db11da0fc "" @@ -230,21 +232,19 @@ "user-code/led/figures/led_output.png" 1615963614 4933000 3daaef0abe81c66166eaa3fd911c9b66 "" "user-code/led/figures/rgb-led-bb.png" 1617583787 241915 7c5374def5f441085b2d93294dde7979 "" "user-code/led/figures/schematic.png" 1615963614 34562 2b5d2cb148a99242ffb4343097ced0a0 "" - "user-code/led/julia/led-blue-delay.jl" 1615963614 155 44a9e33622fc3f7ed64ed07862b37d30 "" - "user-code/led/julia/led-blue-red.jl" 1615963614 229 30922ee6d10d798751eac936811197c6 "" - "user-code/led/julia/led-blue.jl" 1615963614 127 622bb51db887bc146e7f767e3b1d56f4 "" - "user-code/led/julia/led-green-blink.jl" 1615963614 191 e8ec59164af34e16a5cd0cff9e58f27e "" - "user-code/led/julia/test_firmware.jl" 1615963614 146 0fb4c836e3401ff48c75c309e39d01ba "" - "user-code/led/led.tex" 1617907492 43501 cf603ba160885e207f184c5af9016438 "" - "user-code/led/python/led-blue-delay.py" 1615963614 833 babefa03765e8de3166a7183bb9dea89 "" - "user-code/led/python/led-blue-red.py" 1615963614 1027 6d7d523452db15fd0dc6861ba415eb9b "" - "user-code/led/python/led-blue.py" 1615963614 735 58dfc81f1d62cfc75e56cc9c3485031b "" - "user-code/led/python/led-green-blink.py" 1615963614 790 a24c9d2a3c5eea736979846513ca943d "" - "user-code/led/python/test_firmware.py" 1619119844 702 b3a122a1ebadec0840b6fc550c5e4e97 "" - "user-code/led/scilab/led-blue-delay.sce" 1615963614 296 dc571fad7e86d3264301dc3de67ab806 "" + "user-code/led/julia/led-blue-delay.jl" 1617923870 207 8a24e990eb002c6a4cf928b4f8ccb078 "" + "user-code/led/julia/led-blue-red.jl" 1617923932 320 02d5d14ebbd49cd33b25a9828492945c "" + "user-code/led/julia/led-blue.jl" 1617923605 166 56d4924e6b7ef1cf57697194acb4e2a1 "" + "user-code/led/julia/led-green-blink.jl" 1617924319 243 1268c421bda565d0155d8da74276243f "" + "user-code/led/led.tex" 1619402170 43411 44688d61fae0e4f52adac537917fa9e5 "" + "user-code/led/python/led-blue-delay.py" 1567596780 833 babefa03765e8de3166a7183bb9dea89 "" + "user-code/led/python/led-blue-red.py" 1567596768 1027 6d7d523452db15fd0dc6861ba415eb9b "" + "user-code/led/python/led-blue.py" 1606995624 735 58dfc81f1d62cfc75e56cc9c3485031b "" + "user-code/led/python/led-green-blink.py" 1617229276 790 a24c9d2a3c5eea736979846513ca943d "" + "user-code/led/scilab/led-blue-delay.sce" 1619400747 296 dc571fad7e86d3264301dc3de67ab806 "" "user-code/led/scilab/led-blue-red.sce" 1615963614 522 35bdc246bc0acd9abb88f82797fb02d1 "" - "user-code/led/scilab/led-blue.sce" 1615963614 253 1e8fce86cb192073bfc694bd34067efc "" - "user-code/led/scilab/led-green-blink.sce" 1615963614 475 42ef34750ae49b20e1ad3386787424e4 "" + "user-code/led/scilab/led-blue.sce" 1619400737 257 77b591aba40f3774647c6b377db83a30 "" + "user-code/led/scilab/led-green-blink.sce" 1619401084 475 6f4d44735a8dd64f1ba9b6fd22b923b2 "" "user-code/modbus/OpenModelica/readCurrent.mo" 1615963614 415 303989413cadae961b297f9b27e7fea0 "" "user-code/modbus/OpenModelica/readPower.mo" 1615963614 435 3f5615fb24b7ddbe58cdd8e1bef132ae "" "user-code/modbus/OpenModelica/readVoltage.mo" 1615963614 415 6e1ebbf05cf22f407c8164397a270067 "" @@ -274,18 +274,18 @@ "user-code/modbus/scilab/read_current.sci" 1615963614 1090 97c84be93c41f56ed4617dfe2ffaf5bb "" "user-code/modbus/scilab/read_val.sce" 1615963614 1474 89f368fad786acfa64c8f7eab2d6c14a "" "user-code/modbus/scilab/read_voltage.sci" 1619050548 1100 00726a382c03a31bf874d21d1cc5eb16 "" - "user-code/pot/OpenModelica/pot-threshold.mo" 1615963614 1725 a803c7baa1ed467a26e4d70571b871c7 "" + "user-code/pot/OpenModelica/pot-threshold.mo" 1619403467 1727 cab5ba60b5aea6960e463bafe7584c25 "" "user-code/pot/arduino/pot-threshold/pot-threshold.ino" 1615963614 729 004f694d3a949bb3e91a253f78d11914 "" "user-code/pot/figures/POT-led-bb.png" 1618126815 243193 63a4dc18807be931f97545bfa9167a30 "" "user-code/pot/figures/pot-threshold.PNG" 1615963614 72552 8c710fcf76530bfd3f17d454560b19c4 "" "user-code/pot/figures/potmeter.png" 1615963614 99691 b56662d8570cfc9c91c52b76f21d1802 "" "user-code/pot/figures/schematic.png" 1615963614 24453 85099648f5c8e616d3cfd5f3d6d7a7bf "" - "user-code/pot/julia/pot-threshold.jl" 1615963614 457 c32a8f64cd2460150156b5e8cadf050b "" + "user-code/pot/julia/pot-threshold.jl" 1618063741 600 00f29edccfac55651b1dbae5de5ef9a2 "" "user-code/pot/pot.tex" 1618126907 18399 3bf4147f58d9202940dc09605e898da3 "" - "user-code/pot/python/pot-threshold.py" 1615963614 1168 1c8446b4eb191d9326f7c08bd342aa7f "" + "user-code/pot/python/pot-threshold.py" 1567597000 1168 1c8446b4eb191d9326f7c08bd342aa7f "" "user-code/pot/scilab/pot-threshold.sce" 1615963614 624 2bab29d371a2666f033dd6bccad5bb73 "" - "user-code/push/OpenModelica/led-push-button.mo" 1615963614 1198 120e49f80595079acd4df70592cdf775 "" - "user-code/push/OpenModelica/push-button-status.mo" 1615963614 1251 e670acf0e61d3855657d0d08598f967f "" + "user-code/push/OpenModelica/led-push-button.mo" 1619402658 1253 4810c5325e53ee3cedf2d65cc6aad6e0 "" + "user-code/push/OpenModelica/push-button-status.mo" 1619402620 1078 0e270b3c447b59263f2348b23a7a1768 "" "user-code/push/arduino/led-push-button/led-push-button.ino" 1615963614 396 f2cd654545d812fcf8dc360a261677ab "" "user-code/push/arduino/push-button-status/push-button-status.ino" 1615972043 376 77c53b136c9f6a2227e8e0c615b59677 "" "user-code/push/figures/led-push-button.PNG" 1615963614 29100 9fb97725008a4f858830924290bafd86 "" @@ -293,11 +293,11 @@ "user-code/push/figures/pushbutton-conn.png" 1615963614 25321 c2e109dc82f76507b9a0b5f6e09be7db "" "user-code/push/figures/switch-led.png" 1617880501 240149 ad9fa2cc65d176482fbdf38c633d826f "" "user-code/push/figures/switch.png" 1617880485 220988 2689323a6f7a00d63e81ef7abb52961a "" - "user-code/push/julia/led-push-button.jl" 1615963614 244 bdd35ebaf7a49131c86afec8f4d652d5 "" - "user-code/push/julia/push-button-status.jl" 1615963614 162 c571ce3005e5ec597e7dcda1b849185a "" + "user-code/push/julia/led-push-button.jl" 1617924745 322 d30bfe6d32217f97887be1e16f2fc0d1 "" + "user-code/push/julia/push-button-status.jl" 1617924444 201 a6e3d7882c902f9c4cac399b9ca59eeb "" "user-code/push/push.tex" 1617906984 23149 931abba34e8d18444b61bb1d6de3e1d4 "" - "user-code/push/python/led-push-button.py" 1615963614 840 4bb8db9727a8e8653a21fbbc7b7526d7 "" - "user-code/push/python/push-button-status.py" 1615963614 722 f58f02f7b8f3f6ec8ed84f102fba6df1 "" + "user-code/push/python/led-push-button.py" 1619089065 840 4bb8db9727a8e8653a21fbbc7b7526d7 "" + "user-code/push/python/push-button-status.py" 1619089055 722 f58f02f7b8f3f6ec8ed84f102fba6df1 "" "user-code/push/scilab/led-push-button.sce" 1615963614 343 cf0876406ea3698e7f8fabac2dd17128 "" "user-code/push/scilab/push-button-status.sce" 1615963614 363 7b086de623a4106004994824105bed4e "" "user-code/servo/OpenModelica/servo-init.mo" 1615963614 863 bb87abe9ddfb0a20ffa5730f616de29f "" @@ -365,9 +365,9 @@ "user-code/sw-env/figures/win-command-prompt.png" 1619057483 18481 e5638717dbbb0533251e1adcbc9b10f0 "" "user-code/sw-env/figures/windows-cmd.png" 1619057155 18559 6c4f07f73f86b74127aa8c76e23f3285 "" "user-code/sw-env/figures/xcos-help.png" 1615963614 87275 3c9b5157ebebe381cd7b5281cdd28482 "" - "user-code/sw-env/sw-env.tex" 1619378656 90980 bf3073b0176f8ed8d59f6e3e3bb639a1 "" - "user-code/thermistor/OpenModelica/therm-buzzer.mo" 1615963614 1234 e3c3c8d261a570f6ba97d9be5031ff1a "" - "user-code/thermistor/OpenModelica/therm-read.mo" 1615963614 990 198e4947eb2cc3dd685574c945aea1f2 "" + "user-code/sw-env/sw-env.tex" 1619401096 91076 27307332dc60475e87b6eea2c9580242 "" + "user-code/thermistor/OpenModelica/therm-buzzer.mo" 1619403721 1236 1f7c67893d838969538060ecfe0ab777 "" + "user-code/thermistor/OpenModelica/therm-read.mo" 1619403730 992 a6a3e7a260be69141ff1a6be804a9ae5 "" "user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino" 1615963614 389 c4216c80dfb4f1f23b090c94fd181a05 "" "user-code/thermistor/arduino/therm-read/therm-read.ino" 1615963614 221 de622bbb1d39cb66ab1a45e015351b9d "" "user-code/thermistor/figures/BUZZER-Diagram-crop.pdf" 1615963614 44580 9821d615a59f54c353650c91d53397ff "" @@ -380,26 +380,26 @@ "user-code/thermistor/figures/therm-sym.png" 1615963614 17914 5c4de58664f2c605c14ebafd7187b119 "" "user-code/thermistor/figures/thermistor-buzzer.png" 1617904904 251485 47e52a1b05f033ac5efc513d0c38b843 "" "user-code/thermistor/figures/thermistor.png" 1617904875 227111 a497c7b79fab30a854e897df8f7b9e5a "" - "user-code/thermistor/julia/therm-buzzer.jl" 1615963614 226 bf899244c84d5e79afd9cbb0b4e47ac3 "" - "user-code/thermistor/julia/therm-read.jl" 1615963614 144 6f69ed4b7b2565dc7b254e40a783b691 "" - "user-code/thermistor/python/therm-buzzer.py" 1615963614 928 ed9f475c9ed1b48df0336865cc08a77e "" - "user-code/thermistor/python/therm-read.py" 1615963614 756 69346d8630af0b54c8fd104e83808e25 "" + "user-code/thermistor/julia/therm-buzzer.jl" 1618063930 303 ecffb0efb608a5cf7b763adc820a95a7 "" + "user-code/thermistor/julia/therm-read.jl" 1618079676 178 dd878911ab553df01a9054408ce336a9 "" + "user-code/thermistor/python/therm-buzzer.py" 1567597218 928 ed9f475c9ed1b48df0336865cc08a77e "" + "user-code/thermistor/python/therm-read.py" 1567597204 756 69346d8630af0b54c8fd104e83808e25 "" "user-code/thermistor/scilab/therm-buzzer.sce" 1615963614 474 a5b32bd97a4179f7ac211aacf488dad3 "" "user-code/thermistor/scilab/therm-read.sce" 1615963614 382 5e743c25b50f9d961a2939ce81d7b633 "" "user-code/thermistor/thermistor.tex" 1618567312 25838 1f7c3824e3c28084af6bca0235c3226f "" (generated) - "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.log" - "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" - "floss-arduino.lof" - "floss-arduino.toc" - "floss-arduino.OpenModelicad" - "floss-arduino.pdf" - "floss-arduino.aux" "floss-arduino.thm" + "floss-arduino.OpenModelicad" "floss-arduino.lot" - "floss-arduino.ard" + "floss-arduino.log" + "floss-arduino.idx" "floss-arduino.cod" + "floss-arduino.lof" "floss-arduino.pyd" - "floss-arduino.log" + "floss-arduino.ard" + "floss-arduino.pdf" + "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf" + "/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.log" "floss-arduino.juliad" - "floss-arduino.idx" + "floss-arduino.toc" + "floss-arduino.aux" diff --git a/floss-arduino.fls b/floss-arduino.fls index a121b2d..b33537a 100644 --- a/floss-arduino.fls +++ b/floss-arduino.fls @@ -271,18 +271,18 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-pro INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-port.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-port.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-port.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/test_firmware.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/test_firmware.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/test_firmware.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/scilab/test_firmware.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/scilab/test_firmware.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/scilab/test_firmware.sce INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-console.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-console.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-console.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_functions_crop.pdf INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_functions_crop.pdf INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_functions_crop.pdf -INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/test_firmware.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/test_firmware.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/test_firmware.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/scilab/test_firmware.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/scilab/test_firmware.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/scilab/test_firmware.sce INPUT /usr/share/texlive/texmf-dist/fonts/tfm/jknappen/ec/ecbx0900.tfm INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-blk.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-blk.png @@ -320,9 +320,9 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/windows INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-command-prompt.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-command-prompt.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-command-prompt.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/test_firmware.py -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/test_firmware.py -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/test_firmware.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/python/test_firmware.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/python/test_firmware.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/python/test_firmware.py INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-download.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-download.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-download.png @@ -341,9 +341,9 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-t INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/test_firmware.jl -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/test_firmware.jl -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/test_firmware.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/julia/test_firmware.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/julia/test_firmware.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/julia/test_firmware.jl INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmodelica-run-anyway.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmodelica-run-anyway.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmodelica-run-anyway.png @@ -374,9 +374,9 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim- INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-toolbox-loaded.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-toolbox-loaded.png INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-toolbox-loaded.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/test_firmware.mo -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/test_firmware.mo -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/test_firmware.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/openmodelica/test_firmware.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/openmodelica/test_firmware.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/tools/openmodelica/test_firmware.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/led.tex INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/led.tex INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led.png @@ -418,9 +418,9 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-d INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-red/led-blue-red.ino INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-red/led-blue-red.ino INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-red/led-blue-red.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blink/led-blink.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blink/led-blink.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blink/led-blink.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-green-blink/led-green-blink.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-green-blink/led-green-blink.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-green-blink/led-green-blink.ino INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce @@ -648,84 +648,6 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/OpenModelica/ldr-r INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/OpenModelica/ldr-led.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/OpenModelica/ldr-led.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/OpenModelica/ldr-led.mo -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/dcmotor.tex -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/dcmotor.tex -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_board.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_board.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_board.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg -INPUT /usr/share/texlive/texmf-dist/fonts/tfm/jknappen/ec/ecsi1095.tfm -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-loop/dcmotor-loop.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-loop/dcmotor-loop.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-loop/dcmotor-loop.ino -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-loop.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-loop.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-loop.sce -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-clock.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-clock.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-clock.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-both.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-both.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-both.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-loop.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-loop.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-loop.png -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-loop.py -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-loop.py -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-loop.py -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-loop.jl -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-loop.jl -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-loop.jl -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-loop.mo -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-loop.mo -INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-loop.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/pot.tex INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/pot.tex INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/potmeter.png @@ -856,6 +778,84 @@ INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelic INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-buzzer.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-buzzer.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-buzzer.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/dcmotor.tex +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/dcmotor.tex +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_board.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_board.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_board.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/jknappen/ec/ecsi1095.tfm +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-loop/dcmotor-loop.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-loop/dcmotor-loop.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-loop/dcmotor-loop.ino +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-loop.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-loop.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-loop.sce +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-clock.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-clock.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-clock.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-both.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-both.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-both.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-loop.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-loop.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-loop.png +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-loop.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-loop.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-loop.py +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-loop.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-loop.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-loop.jl +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-loop.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-loop.mo +INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-loop.mo INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/servo.tex INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/servo.tex INPUT /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-init/servo-init.ino diff --git a/floss-arduino.idx b/floss-arduino.idx index 78d82df..b0d5cac 100644 --- a/floss-arduino.idx +++ b/floss-arduino.idx @@ -1,5 +1,5 @@ -\indexentry{H-Bridge circuit DC motor}{131} -\indexentry{H-Bridge}{131} -\indexentry{L293D,L298}{131} -\indexentry{PCB breakout board}{131} -\indexentry{pulse width modulation, PWM}{131} +\indexentry{H-Bridge circuit DC motor}{163} +\indexentry{H-Bridge}{163} +\indexentry{L293D,L298}{163} +\indexentry{PCB breakout board}{163} +\indexentry{pulse width modulation, PWM}{163} diff --git a/floss-arduino.ind b/floss-arduino.ind index 0b44b57..0338622 100644 --- a/floss-arduino.ind +++ b/floss-arduino.ind @@ -1,15 +1,15 @@ \begin{theindex} - \item H-Bridge, 131 - \item H-Bridge circuit DC motor, 131 + \item H-Bridge, 163 + \item H-Bridge circuit DC motor, 163 \indexspace - \item L293D,L298, 131 + \item L293D,L298, 163 \indexspace - \item PCB breakout board, 131 - \item pulse width modulation, PWM, 131 + \item PCB breakout board, 163 + \item pulse width modulation, PWM, 163 \end{theindex} diff --git a/floss-arduino.juliad b/floss-arduino.juliad index 6c10f19..3df1b52 100644 --- a/floss-arduino.juliad +++ b/floss-arduino.juliad @@ -11,14 +11,14 @@ \contentsline {section}{\numberline {6.{1}}Read and display the LDR values}{127}% \contentsline {section}{\numberline {6.{2}}Turning the blue LED on and off}{127}% \addvspace {10pt} -\contentsline {section}{\numberline {7.{1}}Rotating the DC motor}{148}% -\contentsline {section}{\numberline {7.{2}}Rotating the DC motor in both directions}{149}% -\contentsline {section}{\numberline {7.{3}}Rotating the DC motor in both directions in a loop}{149}% +\contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{141}% \addvspace {10pt} -\contentsline {section}{\numberline {8.{1}}Turning on LEDs depending on the potentiometer threshold}{163}% +\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{159}% +\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{160}% \addvspace {10pt} -\contentsline {section}{\numberline {9.{1}}Read and display the thermistor values}{181}% -\contentsline {section}{\numberline {9.{2}}Turning the buzzer on and off using thermistor values}{182}% +\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{180}% +\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{181}% +\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{181}% \addvspace {10pt} \contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{202}% \contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{202}% diff --git a/floss-arduino.lof b/floss-arduino.lof index bb85d68..9b54ccb 100644 --- a/floss-arduino.lof +++ b/floss-arduino.lof @@ -83,31 +83,31 @@ \contentsline {figure}{\numberline {6.5}{\ignorespaces Xcos diagram to read LDR values}}{121}% \contentsline {figure}{\numberline {6.6}{\ignorespaces Xcos diagram to read the value of the LDR, which is used to turn the blue LED on or off}}{122}% \addvspace {10\p@ } -\contentsline {figure}{\numberline {7.1}{\ignorespaces L293D motor driver board\relax }}{132}% -\contentsline {figure}{\numberline {7.2}{\ignorespaces A schematic of DC motor connections\relax }}{133}% -\contentsline {figure}{\numberline {7.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{133}% -\contentsline {figure}{\numberline {7.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{140}% -\contentsline {figure}{\numberline {7.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{142}% -\contentsline {figure}{\numberline {7.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{143}% +\contentsline {figure}{\numberline {7.1}{\ignorespaces Potentiometer's schematic on the shield\relax }}{132}% +\contentsline {subfigure}{\numberline {(a)}{\ignorespaces {Pictorial representation of a potentiometer}}}{132}% +\contentsline {subfigure}{\numberline {(b)}{\ignorespaces {Schematic representation of the potentiometer}}}{132}% +\contentsline {figure}{\numberline {7.2}{\ignorespaces A potentiometer to control an LED with Arduino Uno using a breadboard\relax }}{133}% +\contentsline {figure}{\numberline {7.3}{\ignorespaces Turning LEDs on through Xcos depending on the potentiometer threshold}}{137}% \addvspace {10\p@ } -\contentsline {figure}{\numberline {8.1}{\ignorespaces Potentiometer's schematic on the shield\relax }}{154}% -\contentsline {subfigure}{\numberline {(a)}{\ignorespaces {Pictorial representation of a potentiometer}}}{154}% -\contentsline {subfigure}{\numberline {(b)}{\ignorespaces {Schematic representation of the potentiometer}}}{154}% -\contentsline {figure}{\numberline {8.2}{\ignorespaces A potentiometer to control an LED with Arduino Uno using a breadboard\relax }}{155}% -\contentsline {figure}{\numberline {8.3}{\ignorespaces Turning LEDs on through Xcos depending on the potentiometer threshold}}{159}% +\contentsline {figure}{\numberline {8.1}{\ignorespaces Pictorial and symbolic representation of a thermistor\relax }}{146}% +\contentsline {subfigure}{\numberline {(a)}{\ignorespaces {Pictorial representation of a thermistor\cite {therm-wiki}}}}{146}% +\contentsline {subfigure}{\numberline {(b)}{\ignorespaces {Symbolic representation of a thermistor}}}{146}% +\contentsline {figure}{\numberline {8.2}{\ignorespaces Thermistor and buzzer connection diagrams\relax }}{146}% +\contentsline {subfigure}{\numberline {(a)}{\ignorespaces {Thermistor connection diagram}}}{146}% +\contentsline {subfigure}{\numberline {(b)}{\ignorespaces {Buzzer connection diagram}}}{146}% +\contentsline {figure}{\numberline {8.3}{\ignorespaces A thermistor to read its values with Arduino Uno using a breadboard\relax }}{147}% +\contentsline {figure}{\numberline {8.4}{\ignorespaces A thermistor to control a buzzer with Arduino Uno using a breadboard\relax }}{148}% +\contentsline {figure}{\numberline {8.5}{\ignorespaces Xcos diagram to read thermistor values}}{153}% +\contentsline {figure}{\numberline {8.6}{\ignorespaces Output of Xcos diagram to read thermistor values}}{154}% +\contentsline {figure}{\numberline {8.7}{\ignorespaces Xcos diagram to read the value of thermistor, which is used to turn the buzzer on or off}}{155}% +\contentsline {figure}{\numberline {8.8}{\ignorespaces Output of Xcos diagram to switch buzzer through thermistor values}}{155}% \addvspace {10\p@ } -\contentsline {figure}{\numberline {9.1}{\ignorespaces Pictorial and symbolic representation of a thermistor\relax }}{168}% -\contentsline {subfigure}{\numberline {(a)}{\ignorespaces {Pictorial representation of a thermistor\cite {therm-wiki}}}}{168}% -\contentsline {subfigure}{\numberline {(b)}{\ignorespaces {Symbolic representation of a thermistor}}}{168}% -\contentsline {figure}{\numberline {9.2}{\ignorespaces Thermistor and buzzer connection diagrams\relax }}{168}% -\contentsline {subfigure}{\numberline {(a)}{\ignorespaces {Thermistor connection diagram}}}{168}% -\contentsline {subfigure}{\numberline {(b)}{\ignorespaces {Buzzer connection diagram}}}{168}% -\contentsline {figure}{\numberline {9.3}{\ignorespaces A thermistor to read its values with Arduino Uno using a breadboard\relax }}{169}% -\contentsline {figure}{\numberline {9.4}{\ignorespaces A thermistor to control a buzzer with Arduino Uno using a breadboard\relax }}{170}% -\contentsline {figure}{\numberline {9.5}{\ignorespaces Xcos diagram to read thermistor values}}{175}% -\contentsline {figure}{\numberline {9.6}{\ignorespaces Output of Xcos diagram to read thermistor values}}{176}% -\contentsline {figure}{\numberline {9.7}{\ignorespaces Xcos diagram to read the value of thermistor, which is used to turn the buzzer on or off}}{177}% -\contentsline {figure}{\numberline {9.8}{\ignorespaces Output of Xcos diagram to switch buzzer through thermistor values}}{177}% +\contentsline {figure}{\numberline {9.1}{\ignorespaces L293D motor driver board\relax }}{164}% +\contentsline {figure}{\numberline {9.2}{\ignorespaces A schematic of DC motor connections\relax }}{165}% +\contentsline {figure}{\numberline {9.3}{\ignorespaces How to connect the DC motor to the Arduino Uno\ board\relax }}{165}% +\contentsline {figure}{\numberline {9.4}{\ignorespaces Control of DC motor for a specified time from Xcos}}{172}% +\contentsline {figure}{\numberline {9.5}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{174}% +\contentsline {figure}{\numberline {9.6}{\ignorespaces Xcos control of the DC motor in forward and reverse directions}}{175}% \addvspace {10\p@ } \contentsline {figure}{\numberline {10.1}{\ignorespaces Rotating the servomotor by a fixed angle}}{192}% \contentsline {figure}{\numberline {10.2}{\ignorespaces Rotating the servomotor forward and then reverse}}{193}% diff --git a/floss-arduino.log b/floss-arduino.log index d9313da..c1afef2 100644 --- a/floss-arduino.log +++ b/floss-arduino.log @@ -1,12 +1,12 @@ -This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.11.5) 26 APR 2021 00:54 +This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.11.5) 26 APR 2021 08:26 entering extended mode restricted \write18 enabled. - file:line:error style messages enabled. %&-line parsing enabled. -**/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex -(/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.tex +**floss-arduino.tex +(./floss-arduino.tex LaTeX2e <2020-02-02> patch level 2 -L3 programming layer <2020-02-14> (/usr/share/texlive/texmf-dist/tex/latex/base/book.cls +L3 programming layer <2020-02-14> +(/usr/share/texlive/texmf-dist/tex/latex/base/book.cls Document Class: book 2019/12/20 v1.4l Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/bk11.clo File: bk11.clo 2019/12/20 v1.4l Standard LaTeX file (size option) @@ -23,15 +23,19 @@ File: bk11.clo 2019/12/20 v1.4l Standard LaTeX file (size option) \abovecaptionskip=\skip47 \belowcaptionskip=\skip48 \bibindent=\dimen134 -) (/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty Package: color 2019/11/23 v1.2a Standard LaTeX Color (DPC) - (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg + +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg File: color.cfg 2016/01/02 v1.6 sample color configuration ) Package color Info: Driver file: pdftex.def on input line 147. - (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def + +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex -)) (/usr/share/texlive/texmf-dist/tex/latex/layouts/layouts.sty +)) +(/usr/share/texlive/texmf-dist/tex/latex/layouts/layouts.sty Package: layouts 2009/09/02 v2.6d graphical depiction of document elements \l@ylen=\skip49 \layoutsbox=\box45 @@ -111,27 +115,35 @@ Package: layouts 2009/09/02 v2.6d graphical depiction of document elements \trimtop=\skip72 \uppermargin=\skip73 \spinemargin=\skip74 -) (/usr/share/texlive/texmf-dist/tex/latex/cclicenses/cclicenses.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/cclicenses/cclicenses.sty Package: cclicenses 2005/05/20 v0.4 CC licenses typesetting - (/usr/share/texlive/texmf-dist/tex/latex/graphics/rotating.sty + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/rotating.sty Package: rotating 2016/08/11 v2.16d rotated objects in LaTeX - (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty Package: graphicx 2019/11/30 v1.2a Enhanced LaTeX Graphics (DPC,SPQR) - (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2014/10/28 v1.15 key=value parser (DPC) \KV@toks@=\toks15 -) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty Package: graphics 2019/11/30 v1.4a Standard LaTeX Graphics (DPC,SPQR) - (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty Package: trig 2016/01/03 v1.10 sin cos tan (DPC) -) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) Package graphics Info: Driver file: pdftex.def on input line 105. ) \Gin@req@height=\dimen135 \Gin@req@width=\dimen136 -) (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) ) \c@r@tfl@t=\count292 @@ -145,32 +157,40 @@ Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) \htmp=\dimen139 \hpos=\count293 \vpos=\count294 -) (/usr/share/texlive/texmf-dist/tex/latex/morefloats/morefloats.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/morefloats/morefloats.sty Package: morefloats 2015/07/22 v1.0h Raise limit of unprocessed floats (HMM) - (/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty + +(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty Package: kvoptions 2019/11/29 v3.13 Key value format for package options (HO) - (/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty + +(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty Package: ltxcmds 2019/12/15 v1.24 LaTeX kernel commands for general use (HO) -) (/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty +) +(/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO) )) Package morefloats Info: Maximum number of possible floats asked for: 36 (morefloats) (i.e. 18 more floats). (morefloats) LaTeX might run out of memory before this (morefloats) (in which case it will notify you). -) (/usr/share/texlive/texmf-dist/tex/latex/paralist/paralist.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/paralist/paralist.sty Package: paralist 2017/01/22 v2.7 Extended list environments \pltopsep=\skip77 \plpartopsep=\skip78 \plitemsep=\skip79 \plparsep=\skip80 \pl@lab=\toks17 -) (/usr/share/texlive/texmf-dist/tex/latex/chngcntr/chngcntr.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/chngcntr/chngcntr.sty Package: chngcntr 2018/04/09 v1.1a change counter resetting Package chngcntr Info: \counterwithout already defined. (chngcntr) Quitting chngcntr on input line 21. -) (/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty -Package: fancyhdr 2019/01/31 v3.10 Extensive control of page headers and footers +) +(/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty +Package: fancyhdr 2019/01/31 v3.10 Extensive control of page headers and footer +s \f@nch@headwidth=\skip81 \f@nch@O@elh=\skip82 \f@nch@O@erh=\skip83 @@ -180,21 +200,25 @@ Package: fancyhdr 2019/01/31 v3.10 Extensive control of page headers and footers \f@nch@O@erf=\skip87 \f@nch@O@olf=\skip88 \f@nch@O@orf=\skip89 -) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty Package: amsmath 2020/01/20 v2.17e AMS math features \@mathmargin=\skip90 For additional information on amsmath, use the `?' option. (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty Package: amstext 2000/06/29 v2.01 AMS text - (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty + +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty File: amsgen.sty 1999/11/30 v2.0 generic functions \@emptytoks=\toks18 \ex@=\dimen140 -)) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty +)) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty Package: amsbsy 1999/11/29 v1.2d Bold Symbols \pmbraise@=\dimen141 -) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty Package: amsopn 2016/03/08 v2.02 operator names ) \inf@bad=\count295 @@ -234,9 +258,11 @@ LaTeX Font Info: Redeclaring font encoding OMS on input line 734. \mathdisplay@stack=\toks22 LaTeX Info: Redefining \[ on input line 2859. LaTeX Info: Redefining \] on input line 2860. -) (/usr/share/texlive/texmf-dist/tex/latex/base/makeidx.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/base/makeidx.sty Package: makeidx 2014/09/29 v1.0m Standard LaTeX package -) (/usr/share/texlive/texmf-dist/tex/latex/fancybox/fancybox.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/fancybox/fancybox.sty Package: fancybox 2010/05/15 1.4 Style option: `fancybox' v1.4 <2010/05/15> (tvz) @@ -252,15 +278,19 @@ Style option: `fancybox' v1.4 <2010/05/15> (tvz) ) (/usr/share/texlive/texmf-dist/tex/latex/url/url.sty \Urlmuskip=\muskip17 Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. -) (/usr/share/texlive/texmf-dist/tex/latex/cite/cite.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/cite/cite.sty LaTeX Info: Redefining \cite on input line 302. LaTeX Info: Redefining \nocite on input line 332. Package: cite 2015/02/27 v 5.5 -) (/usr/share/texlive/texmf-dist/tex/latex/subfig/subfig.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/subfig/subfig.sty Package: subfig 2005/06/28 ver: 1.3 subfig package - (/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty + +(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty Package: caption 2020/01/03 v3.4h Customizing captions (AR) - (/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty + +(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty Package: caption3 2020/01/03 v1.8h caption3 kernel (AR) Package caption3 Info: TeX engine: e-TeX on input line 61. \captionmargin=\dimen150 @@ -289,7 +319,8 @@ Package caption Info: rotating package is loaded. \c@lotdepth=\count315 \sf@top=\skip96 \sf@bottom=\skip97 -) (/usr/share/texlive/texmf-dist/tex/latex/listings/listings.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.sty \lst@mode=\count316 \lst@gtempboxa=\box51 \lst@token=\toks27 @@ -302,25 +333,34 @@ Package caption Info: rotating package is loaded. \lst@newlines=\count320 \lst@lineno=\count321 \lst@maxwidth=\dimen161 - (/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty + +(/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty File: lstmisc.sty 2019/09/10 1.8c (Carsten Heinz) \c@lstnumber=\count322 \lst@skipnumbers=\count323 \lst@framebox=\box52 -) (/usr/share/texlive/texmf-dist/tex/latex/listings/listings.cfg +) +(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.cfg File: listings.cfg 2019/09/10 1.8c listings configuration )) Package: listings 2019/09/10 1.8c (Carsten Heinz) - (/usr/share/texlive/texmf-dist/tex/latex/tools/varioref.sty + +(/usr/share/texlive/texmf-dist/tex/latex/tools/varioref.sty Package: varioref 2020/01/23 v1.6c package for extended references (FMi) \c@vrcnt=\count324 -) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty Package: fontenc 2020/02/11 v2.0o Standard LaTeX package -) (/usr/share/texlive/texmf-dist/tex/latex/bera/beramono.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/bera/beramono.sty Package: beramono 2004/01/31 (WaS) -) (/usr/share/texlive/texmf-dist/tex/latex/seqsplit/seqsplit.sty -Package: seqsplit 2006/08/07 v0.1 Splitting long sequences (DNA, RNA, proteins, etc.) -) (/home/fossee/Desktop/floss-scilab-arduino/suppl/styles.tex (/usr/share/texlive/texmf-dist/tex/latex/ntheorem/ntheorem.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/seqsplit/seqsplit.sty +Package: seqsplit 2006/08/07 v0.1 Splitting long sequences (DNA, RNA, proteins, + etc.) +) +(/home/fossee/Desktop/floss-scilab-arduino/suppl/styles.tex +(/usr/share/texlive/texmf-dist/tex/latex/ntheorem/ntheorem.sty Style `ntheorem', Version 1.33 <2011/08/15> Package: ntheorem 2011/08/15 1.33 \theorem@style=\toks28 @@ -361,11 +401,14 @@ Package: ntheorem 2011/08/15 1.33 \c@OpenModelicamass=\count329 (/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty File: lstlang1.sty 2019/09/10 1.8c listings language file -) (/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty File: lstlang1.sty 2019/09/10 1.8c listings language file -) (/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty +) +(/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty File: lstmisc.sty 2019/09/10 1.8c (Carsten Heinz) -) (/usr/share/texlive/texmf-dist/tex/latex/tools/theorem.sty) +) +(/usr/share/texlive/texmf-dist/tex/latex/tools/theorem.sty) \c@egmass=\count330 ) \@indexfile=\write4 @@ -377,7 +420,8 @@ Writing index file floss-arduino.idx File: l3backend-pdfmode.def 2020-02-03 L3 backend support: PDF mode \l__kernel_color_stack_int=\count331 \l__pdf_internal_box=\box53 -) (/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux +) +(./floss-arduino.aux LaTeX Warning: Label `sec:led-OpenModelica-code' multiply defined. @@ -422,9 +466,12 @@ LaTeX Font Info: ... okay on input line 108. \everyMPtoPDFconversion=\toks47 ) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf -Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 485. - (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg -File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live +Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4 +85. + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv +e )) Package layouts Warning: Layout scale set to 0.5 on input line 108. @@ -434,7 +481,7 @@ Package caption Info: subfig package v1.3 is loaded. Package caption Info: listings package is loaded. Package caption Info: End \AtBeginDocument code. \c@lstlisting=\count338 -(/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.toc +(./floss-arduino.toc Overfull \hbox (60.41727pt too wide) detected at line 1 \T1/cmr/bx/n/10.95 List of Figures [] @@ -487,24 +534,25 @@ Overfull \hbox (42.2769pt too wide) detected at line 208 \tf@toc=\write5 \openout5 = `floss-arduino.toc'. - [6] (/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.lof [7 + [6] (./floss-arduino.lof [7 ] [8] -Overfull \hbox (4.98741pt too wide) in paragraph at lines 97--97 - [][] []\T1/cmr/m/n/10.95 Turning LEDs on through Xcos de-pend-ing on the po-ten-tiome-ter thresh- +Overfull \hbox (4.98741pt too wide) in paragraph at lines 90--90 + [][] []\T1/cmr/m/n/10.95 Turning LEDs on through Xcos de-pend-ing on the po-te +n-tiome-ter thresh- [] [9]) \tf@lof=\write6 \openout6 = `floss-arduino.lof'. - [10] (/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.lot [11 + [10] (./floss-arduino.lot [11 ]) \tf@lot=\write7 \openout7 = `floss-arduino.lot'. - [12] (/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.ard) + [12] (./floss-arduino.ard) \tf@ard=\write8 \openout8 = `floss-arduino.ard'. @@ -512,34 +560,38 @@ Overfull \hbox (4.98741pt too wide) in paragraph at lines 97--97 ] [14 -] (/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.cod [15]) +] +(./floss-arduino.cod [15]) \tf@cod=\write9 \openout9 = `floss-arduino.cod'. - [16] (/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pyd [17 + [16] (./floss-arduino.pyd [17 ]) \tf@pyd=\write10 \openout10 = `floss-arduino.pyd'. - [18] (/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.juliad) + [18] +(./floss-arduino.juliad) \tf@juliad=\write11 \openout11 = `floss-arduino.juliad'. [19 -] [20] (/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.OpenModelicad) +] [20] (./floss-arduino.OpenModelicad) \tf@OpenModelicad=\write12 \openout12 = `floss-arduino.OpenModelicad'. - (/home/fossee/Desktop/floss-scilab-arduino/suppl/acr.tex [21 + +(./suppl/acr.tex [21 ] [22]) Underfull \vbox (badness 10000) has occurred while \output is active [] [23 -] [24] (/home/fossee/Desktop/floss-scilab-arduino/suppl/intro.tex +] +[24] (./suppl/intro.tex Chapter 1. LaTeX Warning: Command \textregistered invalid in math mode on input line 22. @@ -559,310 +611,550 @@ Missing character: There is no ® in font cmr6! ] -LaTeX Font Info: Trying to load font information for T1+fvm on input line 59. +LaTeX Font Info: Trying to load font information for T1+fvm on input line 59 +. (/usr/share/texlive/texmf-dist/tex/latex/bera/t1fvm.fd File: t1fvm.fd 2004/09/07 scalable font definitions for T1/fvm. -)) (/home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/hw-env.tex [2] +)) +(./user-code/hw-env/hw-env.tex [2] Chapter 2. [3 ] -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/miccontblk.png, id=101, 419.6478pt x 413.3844pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/miccontblk.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/miccontblk.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/miccontblk.png used on input line 50. +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/miccontblk. +png, id=101, 419.6478pt x 413.3844pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/miccon +tblk.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/miccont +blk.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/miccontblk.png used on input line 50. (pdftex.def) Requested size: 258.36281pt x 254.51689pt. - [4 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/miccontblk.png>] [5] -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/resolution.png, id=110, 207.77625pt x 330.23375pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/resolution.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/resolution.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/resolution.png used on input line 127. + [4 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/miccont +blk.png>] [5] +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/resolution. +png, id=110, 207.77625pt x 330.23375pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/resolu +tion.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/resolut +ion.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/resolution.png used on input line 127. (pdftex.def) Requested size: 119.2467pt x 189.52515pt. - [6 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/resolution.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/OSHW-138px.png, id=115, 138.5175pt x 145.54375pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/OSHW-138px.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/OSHW-138px.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/OSHW-138px.png used on input line 182. + [6 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/resolut +ion.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/OSHW-138px. +png, id=115, 138.5175pt x 145.54375pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/OSHW-1 +38px.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/OSHW-13 +8px.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/OSHW-138px.png used on input line 182. (pdftex.def) Requested size: 72.26999pt x 75.93634pt. - [7 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/OSHW-138px.png>] [8] -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino.png, id=125, 585.18625pt x 221.82875pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino.png used on input line 254. + [7 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/OSHW-13 +8px.png>] [8] +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino.png +, id=125, 585.18625pt x 221.82875pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduin +o.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino +.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/arduino.png used on input line 254. (pdftex.def) Requested size: 357.73405pt x 135.61319pt. Overfull \hbox (7.40561pt too wide) in paragraph at lines 261--281 [] [] -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/mega.jpg, id=126, 481.8pt x 316.7835pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/mega.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/mega.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/mega.jpg used on input line 293. +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/mega.jpg, i +d=126, 481.8pt x 316.7835pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/mega.j +pg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/mega.jp +g> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/mega.jpg used on input line 293. (pdftex.def) Requested size: 258.36281pt x 169.87627pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/lily.jpg, id=127, 321.2pt x 321.2pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/lily.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/lily.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/lily.jpg used on input line 304. +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/lily.jpg, i +d=127, 321.2pt x 321.2pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/lily.j +pg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/lily.jp +g> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/lily.jpg used on input line 304. (pdftex.def) Requested size: 178.86702pt x 178.87094pt. -[9 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-phone.jpg, id=131, 230.15924pt x 153.5162pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-phone.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-phone.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-phone.jpg used on input line 323. +[9 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino. +png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-pho +ne.jpg, id=131, 230.15924pt x 153.5162pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduin +o-phone.jpg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino +-phone.jpg> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/arduino-phone.jpg used on input line 323. (pdftex.def) Requested size: 178.86702pt x 119.30411pt. - [10 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/mega.jpg>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-3d-printer.jpg, id=135, 770.88pt x 364.36125pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-3d-printer.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-3d-printer.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-3d-printer.jpg used on input line 337. + [10 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/mega.j +pg>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-3d- +printer.jpg, id=135, 770.88pt x 364.36125pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduin +o-3d-printer.jpg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino +-3d-printer.jpg> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/arduino-3d-printer.jpg used on input line 337. (pdftex.def) Requested size: 178.86702pt x 84.54076pt. - [11 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/lily.jpg> </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-phone.jpg>] -</home/fossee/Desktop/floss-scilab-arduino/tools/shield/pcb_board_V1p2.png, id=139, 405.76593pt x 347.79938pt> -File: /home/fossee/Desktop/floss-scilab-arduino/tools/shield/pcb_board_V1p2.png Graphic file (type png) + [11 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/lily.j +pg> </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino +-phone.jpg>] +</home/fossee/Desktop/floss-scilab-arduino/tools/shield/pcb_board_V1p2.png, id= +139, 405.76593pt x 347.79938pt> +File: /home/fossee/Desktop/floss-scilab-arduino/tools/shield/pcb_board_V1p2.png + Graphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/tools/shield/pcb_board_V1p2.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/tools/shield/pcb_board_V1p2.png used on input line 369. + +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/tools/shield +/pcb_board_V1p2.png used on input line 369. (pdftex.def) Requested size: 178.86702pt x 153.31877pt. Underfull \hbox (badness 1755) in paragraph at lines 371--371 -[]\T1/cmr/m/n/10.95 Figure 2.9: |PCB im-age of the shield. The PCB file can be found at +[]\T1/cmr/m/n/10.95 Figure 2.9: |PCB im-age of the shield. The PCB file can be +found at [] -</home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.png, id=140, 453.94594pt x 320.69812pt> -File: /home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.png Graphic file (type png) +</home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.png, id=140 +, 453.94594pt x 320.69812pt> +File: /home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.png Gr +aphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.png used on input line 379. +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/tools/shield +/shield-V1p2.png used on input line 379. (pdftex.def) Requested size: 397.48499pt x 280.81079pt. -</home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.jpg, id=141, 494.59781pt x 376.40625pt> -File: /home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.jpg Graphic file (type jpg) +</home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.jpg, id=141 +, 494.59781pt x 376.40625pt> +File: /home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.jpg Gr +aphic file (type jpg) <use /home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.jpg used on input line 390. +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/tools/shield +/shield-V1p2.jpg used on input line 390. (pdftex.def) Requested size: 238.49341pt x 181.5pt. Underfull \hbox (badness 2689) in paragraph at lines 394--394 -[]\T1/cmr/m/n/10.95 Figure 2.11: |PCB of the shield. The ac-tual im-age can be found at +[]\T1/cmr/m/n/10.95 Figure 2.11: |PCB of the shield. The ac-tual im-age can be +found at [] -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/shield-crop.jpg, id=142, 608.2725pt x 443.6575pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/shield-crop.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/shield-crop.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/shield-crop.jpg used on input line 458. +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/shield-crop +.jpg, id=142, 608.2725pt x 443.6575pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/shield +-crop.jpg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/shield- +crop.jpg> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/shield-crop.jpg used on input line 458. (pdftex.def) Requested size: 397.48499pt x 289.9242pt. -[12 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-3d-printer.jpg>]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/sw-env.tex [13 </home/fossee/Desktop/floss-scilab-arduino/tools/shield/pcb_board_V1p2.png>] [14 </home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.png>] [15 </home/fossee/Desktop/floss-scilab-arduino/tools/shield/shield-V1p2.jpg> </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/shield-crop.jpg>] [16] +[12 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino +-3d-printer.jpg>]) (./user-code/sw-env/sw-env.tex [13 </home/fossee/Desktop/flo +ss-scilab-arduino/tools/shield/pcb_board_V1p2.png>] [14 </home/fossee/Desktop/f +loss-scilab-arduino/tools/shield/shield-V1p2.png>] [15 </home/fossee/Desktop/fl +oss-scilab-arduino/tools/shield/shield-V1p2.jpg> </home/fossee/Desktop/floss-sc +ilab-arduino/user-code/hw-env/figures/shield-crop.jpg>] [16] Chapter 3. [17 ] -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/hw-device-manager.jpg, id=164, 793.96625pt x 579.16376pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/hw-device-manager.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/hw-device-manager.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/hw-device-manager.jpg used on input line 109. +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/hw-device-m +anager.jpg, id=164, 793.96625pt x 579.16376pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/hw-dev +ice-manager.jpg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/hw-devi +ce-manager.jpg> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/hw-device-manager.jpg used on input line 109. (pdftex.def) Requested size: 397.48499pt x 289.95233pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-manager-com.png, id=165, 1175.39125pt x 863.225pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-manager-com.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-manager-com.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-manager-com.png used on input line 116. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-mana +ger-com.png, id=165, 1175.39125pt x 863.225pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device +-manager-com.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device- +manager-com.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/device-manager-com.png used on input line 116. (pdftex.def) Requested size: 397.48499pt x 291.912pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/update-driver.png, id=166, 635.37375pt x 423.5825pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/update-driver.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/update-driver.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/update-driver.png used on input line 123. +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/update-driv +er.png, id=166, 635.37375pt x 423.5825pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/update +-driver.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/update- +driver.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/update-driver.png used on input line 123. (pdftex.def) Requested size: 397.48499pt x 264.99695pt. - [18] [19 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/hw-device-manager.jpg>] [20 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-manager-com.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/run.png, id=178, 545.03625pt x 155.58125pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/run.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/run.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/run.png used on input line 197. + [18] [19 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/h +w-device-manager.jpg>] [20 </home/fossee/Desktop/floss-scilab-arduino/user-code +/sw-env/figures/device-manager-com.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/run.png, id +=178, 545.03625pt x 155.58125pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/run.pn +g Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/run.png +> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/run.png used on input line 197. (pdftex.def) Requested size: 272.51746pt x 77.79042pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/launch-arduino-opt.png, id=179, 751.80875pt x 313.17pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/launch-arduino-opt.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/launch-arduino-opt.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/launch-arduino-opt.png used on input line 209. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/launch-ardu +ino-opt.png, id=179, 751.80875pt x 313.17pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/launch +-arduino-opt.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/launch- +arduino-opt.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/launch-arduino-opt.png used on input line 209. (pdftex.def) Requested size: 258.36281pt x 107.62325pt. - [21 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/update-driver.png (PNG copy)>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-ide.jpg, id=183, 856.19875pt x 657.45625pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-ide.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-ide.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-ide.jpg used on input line 226. + [21 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/update +-driver.png (PNG copy)>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-ide +.jpg, id=183, 856.19875pt x 657.45625pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduin +o-ide.jpg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino +-ide.jpg> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/hw +-env/figures/arduino-ide.jpg used on input line 226. (pdftex.def) Requested size: 397.48499pt x 305.22243pt. - [22 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/run.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/launch-arduino-opt.png>] [23 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/arduino-ide.jpg>] [24] (/home/fossee/Desktop/floss-scilab-arduino/tools/arduino-firmware/arduino-firmware.ino [25]) [26] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-cd.png, id=204, 787.94376pt x 192.72pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-cd.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-cd.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-cd.png used on input line 463. + [22 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-env/figures/run.pn +g> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/launch-a +rduino-opt.png>] [23 </home/fossee/Desktop/floss-scilab-arduino/user-code/hw-en +v/figures/arduino-ide.jpg>] [24] +(/home/fossee/Desktop/floss-scilab-arduino/tools/arduino-firmware/arduino-firmw +are.ino [25]) [26] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-cd.pn +g, id=204, 787.94376pt x 192.72pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux- +cd.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-c +d.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/linux-cd.png used on input line 463. (pdftex.def) Requested size: 393.97092pt x 96.35976pt. [27] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/change-directory.png, id=208, 602.25pt x 451.6875pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/change-directory.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/change-directory.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/change-directory.png used on input line 494. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/change-dire +ctory.png, id=208, 602.25pt x 451.6875pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/change +-directory.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/change- +directory.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/change-directory.png used on input line 494. (pdftex.def) Requested size: 397.48499pt x 298.12845pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/browse-directory.png, id=209, 450.18187pt x 327.47343pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/browse-directory.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/browse-directory.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/browse-directory.png used on input line 504. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/browse-dire +ctory.png, id=209, 450.18187pt x 327.47343pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/browse +-directory.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/browse- +directory.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/browse-directory.png used on input line 504. (pdftex.def) Requested size: 357.73405pt x 260.23521pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/builder.png, id=210, 600.74437pt x 421.575pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/builder.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/builder.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/builder.png used on input line 520. + +Overfull \hbox (19.3647pt too wide) in paragraph at lines 498--508 +[]\T1/cmr/m/n/10.95 Then, one has to browse to the tool-box folder \T1/fvm/m/n/ +10.95 Origin/tools/scilab/windows + [] + +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/builder.png +, id=210, 600.74437pt x 421.575pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/builde +r.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/builder +.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/builder.png used on input line 520. (pdftex.def) Requested size: 397.48499pt x 278.94795pt. Overfull \hbox (1.53204pt too wide) in paragraph at lines 514--524 -[]\T1/cmr/m/n/10.95 Next, type the fol-low-ing com-mand on the Scilab con-sole: \T1/fvm/m/n/10.95 exec builder.sce +[]\T1/cmr/m/n/10.95 Next, type the fol-low-ing com-mand on the Scilab con-sole: + \T1/fvm/m/n/10.95 exec builder.sce [] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader.png, id=211, 600.74437pt x 421.575pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader.png used on input line 536. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader.png, + id=211, 600.74437pt x 421.575pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader +.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader. +png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/loader.png used on input line 536. (pdftex.def) Requested size: 300.37144pt x 210.78697pt. -[28 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-cd.png>] [29 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/change-directory.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-manager.png, id=219, 602.25pt x 451.6875pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-manager.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-manager.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-manager.png used on input line 564. +[28 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-c +d.png>] [29 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures +/change-directory.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-mana +ger.png, id=219, 602.25pt x 451.6875pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device +-manager.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device- +manager.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/device-manager.png used on input line 564. (pdftex.def) Requested size: 397.48499pt x 298.12845pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-properties.png, id=220, 602.25pt x 451.6875pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-properties.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-properties.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-properties.png used on input line 585. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-propert +ies.png, id=220, 602.25pt x 451.6875pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-pr +operties.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-pro +perties.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/com-properties.png used on input line 585. (pdftex.def) Requested size: 301.12425pt x 225.84319pt. - [30 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/browse-directory.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-port.png, id=224, 634.37pt x 246.9225pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-port.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-port.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-port.png used on input line 609. + [30 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/browse +-directory.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-port. +png, id=224, 634.37pt x 246.9225pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux- +port.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-p +ort.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/linux-port.png used on input line 609. (pdftex.def) Requested size: 317.18422pt x 123.46094pt. - [31 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/builder.png>] (/home/fossee/Desktop/floss-scilab-arduino/tools/test_firmware.sce) [32 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-console.png, id=232, 600.74437pt x 421.575pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-console.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-console.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-console.png used on input line 660. + [31 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/builde +r.png>] +Overfull \hbox (22.98761pt too wide) in paragraph at lines 623--631 +[]\T1/cmr/m/n/10.95 Inside the \T1/fvm/m/n/10.95 Origin/tools/scilab \T1/cmr/m/ +n/10.95 di-rec-tory, lo-cate a file \T1/fvm/m/n/10.95 test_firmware.sce\T1/cmr/ +m/n/10.95 . + [] + +(/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/test_firmware.sce) +[32 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/loader. +png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-consol +e.png, id=232, 600.74437pt x 421.575pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-c +onsole.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-co +nsole.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/test-console.png used on input line 660. (pdftex.def) Requested size: 300.37144pt x 210.78697pt. - [33 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device-manager.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_functions_crop.pdf, id=236, 1055.945pt x 543.02875pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_functions_crop.pdf Graphic file (type pdf) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_functions_crop.pdf> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_functions_crop.pdf used on input line 685. + [33 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/device +-manager.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_funct +ions_crop.pdf, id=236, 1055.945pt x 543.02875pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_ +functions_crop.pdf Graphic file (type pdf) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_f +unctions_crop.pdf> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/table_functions_crop.pdf used on input line 685. (pdftex.def) Requested size: 397.48499pt x 204.40587pt. Underfull \vbox (badness 10000) has occurred while \output is active [] - [34 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-properties.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/linux-port.png>] [35 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/test-console.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/table_functions_crop.pdf>] (/home/fossee/Desktop/floss-scilab-arduino/tools/test_firmware.sce) -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-blk.png, id=250, 376.40625pt x 376.40625pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-blk.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-blk.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-blk.png used on input line 735. + [34 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/com-pr +operties.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figur +es/linux-port.png>] [35 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/test-console.png> </home/fossee/Desktop/floss-scilab-arduino/user- +code/sw-env/figures/table_functions_crop.pdf>] +(/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/test_firmware.sce) +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-blk.pn +g, id=250, 376.40625pt x 376.40625pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-b +lk.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-bl +k.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/sine-blk.png used on input line 735. (pdftex.def) Requested size: 357.73405pt x 357.76195pt. - [36] [37 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-blk.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/plot-blk.png, id=259, 310.15875pt x 109.1578pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/plot-blk.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/plot-blk.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/plot-blk.png used on input line 787. + +[36] [37 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/si +ne-blk.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/plot-blk.pn +g, id=259, 310.15875pt x 109.1578pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/plot-b +lk.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/plot-bl +k.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/plot-blk.png used on input line 787. (pdftex.def) Requested size: 357.73405pt x 125.90192pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clock-blk.png, id=260, 307.90031pt x 108.405pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clock-blk.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clock-blk.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clock-blk.png used on input line 801. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clock-blk.p +ng, id=260, 307.90031pt x 108.405pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clock- +blk.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clock-b +lk.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/clock-blk.png used on input line 801. (pdftex.def) Requested size: 357.73405pt x 125.95995pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-gen.png, id=261, 207.77625pt x 253.69781pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-gen.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-gen.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-gen.png used on input line 822. + [38 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/plot-b +lk.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clo +ck-blk.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-gen.pn +g, id=264, 207.77625pt x 253.69781pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-g +en.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-ge +n.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/sine-gen.png used on input line 822. (pdftex.def) Requested size: 178.86702pt x 218.40813pt. - [38 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/plot-blk.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/clock-blk.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-output.png, id=265, 383.18156pt x 184.43906pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-output.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-output.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-output.png used on input line 833. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-output +.png, id=265, 383.18156pt x 184.43906pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-o +utput.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-ou +tput.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/sine-output.png used on input line 833. (pdftex.def) Requested size: 258.36281pt x 124.36716pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope-config.png, id=266, 310.15875pt x 289.08pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope-config.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope-config.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope-config.png used on input line 847. + [39 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-g +en.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sin +e-output.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope-conf +ig.png, id=269, 310.15875pt x 289.08pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope +-config.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope- +config.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/cscope-config.png used on input line 847. (pdftex.def) Requested size: 258.36281pt x 240.8053pt. Overfull \hbox (0.16797pt too wide) in paragraph at lines 852--861 -\T1/fvm/m/n/10.95 Set Parameters \T1/cmr/m/n/10.95 win-dow will open. The first pa-ram-e-ter is \T1/fvm/m/n/10.95 Final integration +\T1/fvm/m/n/10.95 Set Parameters \T1/cmr/m/n/10.95 win-dow will open. The first + pa-ram-e-ter is \T1/fvm/m/n/10.95 Final integration [] -[39 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-gen.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sine-output.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sim-setup.png, id=270, 333.49594pt x 225.84375pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sim-setup.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sim-setup.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sim-setup.png used on input line 864. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sim-setup.p +ng, id=270, 333.49594pt x 225.84375pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sim-se +tup.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sim-set +up.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/sim-setup.png used on input line 864. (pdftex.def) Requested size: 258.36281pt x 174.97539pt. - -Underfull \vbox (badness 10000) has occurred while \output is active [] - - [40 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope-config.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/arduino-palette.png, id=274, 292.84406pt x 107.65219pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/arduino-palette.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/arduino-palette.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/arduino-palette.png used on input line 895. +[40 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/cscope- +config.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/arduino-pal +ette.png, id=274, 292.84406pt x 107.65219pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/arduin +o-palette.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/arduino +-palette.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/arduino-palette.png used on input line 895. (pdftex.def) Requested size: 258.36281pt x 94.98553pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/xcos-help.png, id=275, 617.30624pt x 466.74374pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/xcos-help.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/xcos-help.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/xcos-help.png used on input line 902. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/xcos-help.p +ng, id=275, 617.30624pt x 466.74374pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/xcos-h +elp.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/xcos-he +lp.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/xcos-help.png used on input line 902. (pdftex.def) Requested size: 258.36281pt x 195.35445pt. - -Underfull \vbox (badness 10000) has occurred while \output is active [] - - [41 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sim-setup.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/arduino-palette.png>] [42 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/xcos-help.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python-windows-install.JPG, id=282, 514.17094pt x 316.93407pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python-windows-install.JPG Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python-windows-install.JPG> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python-windows-install.JPG used on input line 942. + [41 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/sim-se +tup.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/ar +duino-palette.png>] [42 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/xcos-help.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python-wind +ows-install.JPG, id=282, 514.17094pt x 316.93407pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python +-windows-install.JPG Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python- +windows-install.JPG> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/python-windows-install.JPG used on input line 942. (pdftex.def) Requested size: 258.36281pt x 159.25491pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/windows-cmd.png, id=283, 572.1375pt x 338.26375pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/windows-cmd.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/windows-cmd.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/windows-cmd.png used on input line 961. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/windows-cmd +.png, id=283, 572.1375pt x 338.26375pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/window +s-cmd.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/windows +-cmd.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/windows-cmd.png used on input line 961. (pdftex.def) Requested size: 258.36281pt x 152.75406pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-command-prompt.png, id=284, 1353.055pt x 289.08pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-command-prompt.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-command-prompt.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-command-prompt.png used on input line 971. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-command +-prompt.png, id=284, 1353.055pt x 289.08pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-co +mmand-prompt.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-com +mand-prompt.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/win-command-prompt.png used on input line 971. (pdftex.def) Requested size: 258.36281pt x 55.19925pt. - [43 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python-windows-install.JPG>] [44 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/windows-cmd.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/win-command-prompt.png>] + [43 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/python +-windows-install.JPG>] [44 </home/fossee/Desktop/floss-scilab-arduino/user-code +/sw-env/figures/windows-cmd.png> </home/fossee/Desktop/floss-scilab-arduino/use +r-code/sw-env/figures/win-command-prompt.png>] Overfull \hbox (6.38388pt too wide) in paragraph at lines 1002--1006 -\T1/cmr/m/n/10.95 the Com-mand Prompt, ex-e-cute the fol-low-ing com-mand: \T1/fvm/m/n/10.95 pip show pyserial +\T1/cmr/m/n/10.95 the Com-mand Prompt, ex-e-cute the fol-low-ing com-mand: \T1/ +fvm/m/n/10.95 pip show pyserial [] -[45] [46] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/test_firmware.py) -Underfull \vbox (badness 2103) has occurred while \output is active [] +[45] [46] +(/home/fossee/Desktop/floss-scilab-arduino/tools/python/test_firmware.py) +Underfull \vbox (badness 7030) has occurred while \output is active [] [47] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-download.png, id=303, 670.00313pt x 277.035pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-download.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-download.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-download.png used on input line 1162. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-downl +oad.png, id=303, 670.00313pt x 277.035pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia- +download.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-d +ownload.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/julia-download.png used on input line 1162. (pdftex.def) Requested size: 397.48499pt x 164.34962pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-windows-install.png, id=304, 756.8275pt x 632.3625pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-windows-install.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-windows-install.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-windows-install.png used on input line 1169. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-windo +ws-install.png, id=304, 756.8275pt x 632.3625pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia- +windows-install.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-w +indows-install.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/julia-windows-install.png used on input line 1169. (pdftex.def) Requested size: 258.36281pt x 215.86882pt. - [48] [49 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-download.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-windows-install.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-repl-windows.png, id=314, 1354.05875pt x 768.8725pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-repl-windows.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-repl-windows.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-repl-windows.png used on input line 1217. + +[48] [49 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/ju +lia-download.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/f +igures/julia-windows-install.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-repl- +windows.png, id=314, 1354.05875pt x 768.8725pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia- +repl-windows.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-r +epl-windows.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/julia-repl-windows.png used on input line 1217. (pdftex.def) Requested size: 397.48499pt x 225.70088pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg-windows.png, id=315, 1353.055pt x 768.8725pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg-windows.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg-windows.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg-windows.png used on input line 1226. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg-w +indows.png, id=315, 1353.055pt x 768.8725pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia- +pkg-windows.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-p +kg-windows.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/julia-pkg-windows.png used on input line 1226. (pdftex.def) Requested size: 397.48499pt x 225.86513pt. [50] LaTeX Warning: Text page 51 contains only floats. -[51 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-repl-windows.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg-windows.png>] +[51 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-r +epl-windows.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/fi +gures/julia-pkg-windows.png>] Overfull \hbox (5.34262pt too wide) in paragraph at lines 1250--1252 -[]\T1/cmr/m/n/10.95 First, up-date your sys-tem. Open the Ter-mi-nal. Type \T1/fvm/m/n/10.95 sudo apt-get update +[]\T1/cmr/m/n/10.95 First, up-date your sys-tem. Open the Ter-mi-nal. Type \T1/ +fvm/m/n/10.95 sudo apt-get update [] @@ -871,129 +1163,268 @@ Overfull \hbox (12.2196pt too wide) in paragraph at lines 1267--1271 [] [52] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-terminal-repl.png, id=327, 949.5475pt x 655.44875pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-terminal-repl.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-terminal-repl.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-terminal-repl.png used on input line 1298. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-termi +nal-repl.png, id=327, 949.5475pt x 655.44875pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia- +terminal-repl.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-t +erminal-repl.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/julia-terminal-repl.png used on input line 1298. (pdftex.def) Requested size: 397.48499pt x 274.37646pt. [53] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg.png, id=331, 949.5475pt x 655.44875pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg.png used on input line 1329. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg.p +ng, id=331, 949.5475pt x 655.44875pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia- +pkg.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-p +kg.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/julia-pkg.png used on input line 1329. (pdftex.def) Requested size: 397.48499pt x 274.37646pt. - [54 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-terminal-repl.png>] [55 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia-pkg.png>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/test_firmware.jl) [56] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmodelica-run-anyway.png, id=344, 812.03375pt x 749.80125pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmodelica-run-anyway.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmodelica-run-anyway.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmodelica-run-anyway.png used on input line 1428. + [54 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/julia- +terminal-repl.png>] [55 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/julia-pkg.png>] +(/home/fossee/Desktop/floss-scilab-arduino/tools/julia/test_firmware.jl) +[56] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmodelic +a-run-anyway.png, id=344, 812.03375pt x 749.80125pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmo +delica-run-anyway.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmod +elica-run-anyway.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/openmodelica-run-anyway.png used on input line 1428. (pdftex.def) Requested size: 258.36281pt x 238.55693pt. Overfull \hbox (13.35912pt too wide) in paragraph at lines 1433--1439 -[]\T1/cmr/m/n/10.95 Once Open-Mod-el-ica has been in-stalled, Open-Mod-el-ica Con-nec-tion Ed-i-tor (OMEdit) +[]\T1/cmr/m/n/10.95 Once Open-Mod-el-ica has been in-stalled, Open-Mod-el-ica C +on-nec-tion Ed-i-tor (OMEdit) [] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-libraries.png, id=345, 664.4825pt x 546.04pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-libraries.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-libraries.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-libraries.png used on input line 1452. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-libr +aries.png, id=345, 664.4825pt x 546.04pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit +-libraries.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit- +libraries.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/OMEdit-libraries.png used on input line 1452. (pdftex.def) Requested size: 365.46649pt x 300.32292pt. -[57] [58 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/openmodelica-run-anyway.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-UI.png, id=353, 996.1215pt x 597.9138pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-UI.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-UI.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-UI.png used on input line 1484. +[57] [58 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/op +enmodelica-run-anyway.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-UI.p +ng, id=353, 996.1215pt x 597.9138pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit +-UI.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit- +UI.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/OMEdit-UI.png used on input line 1484. (pdftex.def) Requested size: 397.48499pt x 238.5865pt. - [59 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-libraries.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-open-model.png, id=358, 1087.06125pt x 792.9625pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-open-model.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-open-model.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-open-model.png used on input line 1498. + [59 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit +-libraries.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-open-mod +el.png, id=358, 1087.06125pt x 792.9625pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-ope +n-model.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-open +-model.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/om-open-model.png used on input line 1498. (pdftex.def) Requested size: 397.48499pt x 289.94313pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-Modeling.png, id=359, 1368.11125pt x 791.95876pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-Modeling.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-Modeling.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-Modeling.png used on input line 1505. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-Modeling +.png, id=359, 1368.11125pt x 791.95876pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-Mod +eling.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-Mode +ling.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/om-Modeling.png used on input line 1505. (pdftex.def) Requested size: 397.48499pt x 230.08511pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-modeling-views.png, id=360, 673.01437pt x 373.395pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-modeling-views.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-modeling-views.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-modeling-views.png used on input line 1513. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-modeling +-views.png, id=360, 673.01437pt x 373.395pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-mod +eling-views.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-mode +ling-views.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/om-modeling-views.png used on input line 1513. (pdftex.def) Requested size: 397.48499pt x 220.52904pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-text-view.png, id=361, 1370.11874pt x 796.9775pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-text-view.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-text-view.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-text-view.png used on input line 1521. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-text-vie +w.png, id=361, 1370.11874pt x 796.9775pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-tex +t-view.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-text +-view.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/om-text-view.png used on input line 1521. (pdftex.def) Requested size: 397.48499pt x 231.20267pt. - [60 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit-UI.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-simulate.png, id=366, 673.01437pt x 373.395pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-simulate.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-simulate.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-simulate.png used on input line 1550. + [60 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/OMEdit +-UI.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-simulate +.png, id=366, 673.01437pt x 373.395pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim +ulate.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-simu +late.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/om-simulate.png used on input line 1550. (pdftex.def) Requested size: 397.48499pt x 220.52904pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim-success.png, id=367, 647.41875pt x 516.93124pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim-success.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim-success.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim-success.png used on input line 1557. +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim-succ +ess.png, id=367, 647.41875pt x 516.93124pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim +-success.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim- +success.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/om-sim-success.png used on input line 1557. (pdftex.def) Requested size: 397.48499pt x 317.37051pt. - [61 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-open-model.png>] + [61 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-ope +n-model.png>] LaTeX Warning: Text page 62 contains only floats. -[62 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-modeling.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-modeling-views.png>] +[62 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-mode +ling.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/o +m-modeling-views.png>] LaTeX Warning: Text page 63 contains only floats. -[63 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-text-view.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-simulate.png>] [64 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim-success.png>] -Overfull \hbox (5.89722pt too wide) in paragraph at lines 1589--1595 -\T1/cmr/m/n/10.95 el-ica_Synchronous, Mod-el-ica_DeviceDrivers, and one model test_firmware.mo. +[63 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-text +-view.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/ +om-simulate.png>] +Overfull \hbox (0.4131pt too wide) in paragraph at lines 1568--1575 +\T1/fvm/m/n/10.95 openmodelica/windows \T1/cmr/m/n/10.95 or \T1/fvm/m/n/10.95 O +rigin/tools/openmodelica/linux \T1/cmr/m/n/10.95 di-rec-tory, [] -</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-toolbox-loaded.png, id=387, 325.215pt x 735.74875pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-toolbox-loaded.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-toolbox-loaded.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-toolbox-loaded.png used on input line 1615. +[64 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-sim- +success.png>] +Overfull \hbox (4.19868pt too wide) in paragraph at lines 1586--1588 +[]\T1/cmr/m/n/10.95 Navigate to \T1/fvm/m/n/10.95 Origin/tools/openmodelica/win +dows \T1/cmr/m/n/10.95 or \T1/fvm/m/n/10.95 Origin/tools/ + [] + + +Overfull \hbox (5.89722pt too wide) in paragraph at lines 1588--1594 +\T1/cmr/m/n/10.95 el-ica_Synchronous, Mod-el-ica_DeviceDrivers, and one model t +est_firmware.mo. + [] + +</home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-toolbox- +loaded.png, id=387, 325.215pt x 735.74875pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-too +lbox-loaded.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-tool +box-loaded.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/sw +-env/figures/om-toolbox-loaded.png used on input line 1614. (pdftex.def) Requested size: 178.86702pt x 404.66306pt. -[65] [66 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om-toolbox-loaded.png>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/test_firmware.mo)) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/led.tex [67] [68 +[65] [66 </home/fossee/Desktop/floss-scilab-arduino/user-code/sw-env/figures/om +-toolbox-loaded.png>] +(/home/fossee/Desktop/floss-scilab-arduino/tools/openmodelica/test_firmware.mo) +) (./user-code/led/led.tex [67] [68 ] Chapter 4. -</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led.png, id=402, 149.8097pt x 84.315pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led.png Graphic file (type png) +</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led.png, id=40 +3, 149.8097pt x 84.315pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led.png G +raphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led.png used on input line 51. +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le +d/figures/led.png used on input line 51. (pdftex.def) Requested size: 79.49577pt x 44.74203pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/schematic.png, id=403, 415.5525pt x 456.70625pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/schematic.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/schematic.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/schematic.png used on input line 64. +</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/schematic.png, + id=404, 415.5525pt x 456.70625pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/schematic +.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/schematic. +png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le +d/figures/schematic.png used on input line 64. (pdftex.def) Requested size: 178.86702pt x 196.58194pt. [69 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/arduino-shield.JPG, id=408, 951.48618pt x 713.61462pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/arduino-shield.JPG Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/arduino-shield.JPG> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/arduino-shield.JPG used on input line 78. +</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/arduino-shield +.JPG, id=409, 951.48618pt x 713.61462pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/arduino-s +hield.JPG Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/arduino-sh +ield.JPG> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le +d/figures/arduino-shield.JPG used on input line 78. (pdftex.def) Requested size: 178.86702pt x 134.15085pt. - [70 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/schematic.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/arduino-shield.JPG>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/rgb-led-bb.png, id=413, 451.286pt x 236.082pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/rgb-led-bb.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/rgb-led-bb.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/rgb-led-bb.png used on input line 106. + +[70 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/schematic. +png> </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/arduino-s +hield.JPG>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/rgb-led-bb.png +, id=414, 451.286pt x 236.082pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/rgb-led-b +b.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/rgb-led-bb +.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le +d/figures/rgb-led-bb.png used on input line 106. (pdftex.def) Requested size: 357.73405pt x 187.14034pt. - [71 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/rgb-led-bb.png>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue/led-blue.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue/led-blue.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-delay/led-blue-delay.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-delay/led-blue-delay.ino) [72] -</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led_output.png, id=421, 3035.34pt x 1947.275pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led_output.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led_output.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led_output.png used on input line 195. + [71 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/rgb-led-b +b.png>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue/led-b +lue.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue/led-b +lue.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-delay +/led-blue-delay.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-delay +/led-blue-delay.ino) [72] +</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led_output.png +, id=422, 3035.34pt x 1947.275pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led_outpu +t.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led_output +.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le +d/figures/led_output.png used on input line 195. (pdftex.def) Requested size: 357.73405pt x 229.47339pt. -LaTeX Font Info: Trying to load font information for T1+cmss on input line 207. - (/usr/share/texlive/texmf-dist/tex/latex/base/t1cmss.fd +LaTeX Font Info: Trying to load font information for T1+cmss on input line 2 +07. + +(/usr/share/texlive/texmf-dist/tex/latex/base/t1cmss.fd File: t1cmss.fd 2019/12/16 v2.5j Standard LaTeX font definitions -) [73] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue/led-blue.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-delay/led-blue-delay.ino [74 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led_output.png>]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-red/led-blue-red.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blink/led-blink.ino) [75] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) [76] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue-delay.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue-delay.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue-delay.sce [77]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue-red.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-green-blink.sce) -</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue.png, id=441, 233.37187pt x 252.19218pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue.png used on input line 393. +) [73] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue/led-b +lue.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-delay +/led-blue-delay.ino [74 </home/fossee/Desktop/floss-scilab-arduino/user-code/le +d/figures/led_output.png>]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-blue-red/l +ed-blue-red.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/arduino/led-green-blin +k/led-green-blink.ino) [75] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) +[76] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue-delay. +sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue-delay. +sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue-delay. +sce [77]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-blue-red.sc +e) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/scilab/led-green-blink +.sce) +</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue.png, +id=442, 233.37187pt x 252.19218pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue. +png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue.p +ng> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le +d/figures/led-blue.png used on input line 393. (pdftex.def) Requested size: 178.86702pt x 193.29965pt. Overfull \hbox (4.77844pt too wide) in paragraph at lines 409--418 @@ -1001,138 +1432,263 @@ Overfull \hbox (4.77844pt too wide) in paragraph at lines 409--418 [] [78] -</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-delay.png, id=445, 226.59656pt x 243.91125pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-delay.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-delay.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-delay.png used on input line 428. +</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-delay +.png, id=446, 226.59656pt x 243.91125pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue- +delay.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-d +elay.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le +d/figures/led-blue-delay.png used on input line 428. (pdftex.def) Requested size: 178.86702pt x 192.53517pt. Overfull \hbox (4.77844pt too wide) in paragraph at lines 443--455 [][] [] -[79 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-red.png, id=452, 245.41687pt x 339.51843pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-red.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-red.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-red.png used on input line 466. +[79 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue.p +ng>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-red.p +ng, id=453, 245.41687pt x 339.51843pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue- +red.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-r +ed.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le +d/figures/led-blue-red.png used on input line 466. (pdftex.def) Requested size: 178.86702pt x 247.45784pt. Overfull \hbox (13.85292pt too wide) in paragraph at lines 482--499 [][] [] -[80 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-delay.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green-blink.png, id=457, 246.9225pt x 251.43938pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green-blink.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green-blink.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green-blink.png used on input line 509. +[80 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-d +elay.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green-blin +k.png, id=458, 246.9225pt x 251.43938pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green +-blink.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green- +blink.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/le +d/figures/led-green-blink.png used on input line 509. (pdftex.def) Requested size: 178.86702pt x 182.13731pt. Overfull \hbox (4.77844pt too wide) in paragraph at lines 524--537 [][] [] -[81 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-red.png>] +[81 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-blue-r +ed.png>] Overfull \vbox (31.42311pt too high) has occurred while \output is active [] - [82 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green-blink.png>] [83] -Underfull \hbox (badness 10000) in paragraph at lines 616--620 + +[82 </home/fossee/Desktop/floss-scilab-arduino/user-code/led/figures/led-green- +blink.png>] [83] +Underfull \hbox (badness 10000) in paragraph at lines 613--617 [] -Underfull \hbox (badness 10000) in paragraph at lines 621--622 +Underfull \hbox (badness 10000) in paragraph at lines 618--619 [] -Underfull \hbox (badness 10000) in paragraph at lines 635--638 +Underfull \hbox (badness 10000) in paragraph at lines 632--635 [] -[84] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led-blue.py [85]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led-blue-delay.py [86]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led-blue-red.py [87]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led-green-blink.py [88]) [89] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/led-blue.jl [90]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/led-blue-delay.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/led-blue-red.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/led-green-blink.jl [91]) -Overfull \hbox (2.4842pt too wide) in paragraph at lines 843--844 -[]\T1/cmr/m/n/10.95 sComm.close_serial(1) : This closes the pre-de-fined se-rial port which is presently +[84] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led-blue.py +[85]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led-blue-delay. +py [86]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led-blue-red.py +[87]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/python/led-green-blink +.py [88]) [89] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/led-blue.jl) +[90] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/led-blue-delay.j +l) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/led-blue-red.jl) + +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/julia/led-green-blink. +jl) [91] +Overfull \hbox (2.4842pt too wide) in paragraph at lines 840--841 +[]\T1/cmr/m/n/10.95 sComm.close_serial(1) : This closes the pre-de-fined se-ria +l port which is presently [] -[92] (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-blue.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-blue-delay.mo [93]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-blue-red.mo [94]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-green-blink.mo)) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/push.tex [95] [96 +[92] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-blue. +mo) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-blue- +delay.mo [93]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-blue- +red.mo [94]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/led/OpenModelica/led-green +-blink.mo)) (./user-code/push/push.tex [95] [96 ] Chapter 5. -</home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutton-conn.png, id=511, 415.5525pt x 438.63875pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutton-conn.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutton-conn.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutton-conn.png used on input line 63. +</home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutton-co +nn.png, id=511, 415.5525pt x 438.63875pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutt +on-conn.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutto +n-conn.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu +sh/figures/pushbutton-conn.png used on input line 63. (pdftex.def) Requested size: 178.86702pt x 188.80507pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.png, id=512, 453.695pt x 239.294pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.png used on input line 72. +</home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.png, i +d=512, 453.695pt x 239.294pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.p +ng Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.pn +g> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu +sh/figures/switch.png used on input line 72. (pdftex.def) Requested size: 397.48499pt x 209.64827pt. [97] Underfull \vbox (badness 3098) has occurred while \output is active [] - [98 </home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutton-conn.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-led.png, id=522, 453.695pt x 266.596pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-led.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-led.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-led.png used on input line 106. + [98 </home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pushbutt +on-conn.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/ +switch.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-led.pn +g, id=522, 453.695pt x 266.596pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-l +ed.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-le +d.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu +sh/figures/switch-led.png used on input line 106. (pdftex.def) Requested size: 397.48499pt x 233.56786pt. Underfull \vbox (badness 1158) has occurred while \output is active [] - [99 </home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-led.png>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-status/push-button-status.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-status/push-button-status.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/led-push-button/led-push-button.ino) [100] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-status/push-button-status.ino) + [99 </home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/switch-l +ed.png>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-s +tatus/push-button-status.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-s +tatus/push-button-status.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/led-push-butt +on/led-push-button.ino) [100] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/push-button-s +tatus/push-button-status.ino) Overfull \hbox (0.16989pt too wide) in paragraph at lines 174--177 -[]\T1/cmr/m/n/10.95 Turning the LED on or off de-pend-ing on the push-but-ton. Avail- +[]\T1/cmr/m/n/10.95 Turning the LED on or off de-pend-ing on the push-but-ton. +Avail- [] -(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/led-push-button/led-push-button.ino [101]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push-button-status.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push-button-status.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/led-push-button.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push-button-status.sce [102]) + +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/arduino/led-push-butt +on/led-push-button.ino [101]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push-button-st +atus.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push-button-st +atus.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/led-push-butto +n.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/push-button-st +atus.sce [102]) Overfull \hbox (0.145pt too wide) in paragraph at lines 227--230 -\T1/cmr/m/n/10.95 able at \T1/fvm/m/n/10.95 O r i g i n / u s e r - c o d e / p u s h / s c i l a b / l e d - p u s h - b u t t o n . s c e\T1/cmr/m/n/10.95 , see Foot- +\T1/cmr/m/n/10.95 able at \T1/fvm/m/n/10.95 O r i g i n / u s e r - c o d e / p + u s h / s c i l a b / l e d - p u s h - b u t t o n . s c e\T1/cmr/m/n/10.95 , + see Foot- [] -(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/led-push-button.sce) -</home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/push-button-status.PNG, id=536, 264.99pt x 268.00125pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/push-button-status.PNG Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/push-button-status.PNG> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/push-button-status.PNG used on input line 258. + +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/scilab/led-push-butto +n.sce) +</home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/push-button-s +tatus.PNG, id=536, 264.99pt x 268.00125pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/push-but +ton-status.PNG Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/push-butt +on-status.PNG> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu +sh/figures/push-button-status.PNG used on input line 258. (pdftex.def) Requested size: 178.86702pt x 180.9012pt. Overfull \hbox (3.33746pt too wide) in paragraph at lines 276--286 [][] [] -[103] [104 </home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/push-button-status.PNG>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push-button.PNG, id=545, 298.86656pt x 264.99pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push-button.PNG Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push-button.PNG> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push-button.PNG used on input line 301. +[103] [104 </home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/pu +sh-button-status.PNG>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push-butt +on.PNG, id=545, 298.86656pt x 264.99pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push +-button.PNG Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push- +button.PNG> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pu +sh/figures/led-push-button.PNG used on input line 301. (pdftex.def) Requested size: 178.86702pt x 158.59492pt. Overfull \hbox (4.77844pt too wide) in paragraph at lines 318--329 [][] [] -[105 </home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push-button.PNG>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push-button-status.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push-button-status.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/led-push-button.py) [106] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push-button-status.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/led-push-button.py [107]) +[105 </home/fossee/Desktop/floss-scilab-arduino/user-code/push/figures/led-push +-button.PNG>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push-button-st +atus.py) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push-button-st +atus.py) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/led-push-butto +n.py) [106] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/push-button-st +atus.py) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/python/led-push-butto +n.py [107]) Underfull \vbox (badness 10000) has occurred while \output is active [] - [108] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/push-button-status.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/led-push-button.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/push-button-status.jl) [109] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/led-push-button.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/push-button-status.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/push-button-status.mo [110]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/led-push-button.mo [111])) (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/ldr.tex [112] + [108] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/push-button-sta +tus.jl) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/led-push-button +.jl) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/push-button-sta +tus.jl) [109] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/led-push-button +.jl) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/push-but +ton-status.mo) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/push-but +ton-status.mo [110]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/led-push +-button.mo [111])) (./user-code/ldr/ldr.tex [112] Chapter 6. -</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr.jpg, id=572, 106.89937pt x 94.85437pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr.jpg Graphic file (type jpg) +</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr.jpg, id=57 +2, 106.89937pt x 94.85437pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr.jpg G +raphic file (type jpg) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr.jpg used on input line 62. +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ld +r/figures/ldr.jpg used on input line 62. (pdftex.def) Requested size: 178.86702pt x 158.72462pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr_sym.png, id=573, 1009.52156pt x 741.52031pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr_sym.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr_sym.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr_sym.png used on input line 65. +</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr_sym.png, i +d=573, 1009.52156pt x 741.52031pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr_sym.p +ng Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr_sym.pn +g> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ld +r/figures/ldr_sym.png used on input line 65. (pdftex.def) Requested size: 178.86702pt x 131.37468pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-conn.png, id=574, 415.5525pt x 450.68375pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-conn.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-conn.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-conn.png used on input line 71. +</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-conn.png, +id=574, 415.5525pt x 450.68375pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-conn. +png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-conn.p +ng> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ld +r/figures/ldr-conn.png used on input line 71. (pdftex.def) Requested size: 178.86702pt x 193.98965pt. [113 @@ -1144,222 +1700,477 @@ Overfull \hbox (0.60098pt too wide) in paragraph at lines 87--87 Underfull \vbox (badness 3333) has occurred while \output is active [] - [114 </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr.jpg> </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr_sym.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-conn.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR.png, id=583, 455.301pt x 208.78pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR.png Graphic file (type png) + [114 </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr.jpg> + </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr_sym.png> +</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-conn.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR.png, id=58 +3, 455.301pt x 208.78pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR.png G +raphic file (type png) <use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR.png used on input line 102. +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ld +r/figures/LDR.png used on input line 102. (pdftex.def) Requested size: 397.48499pt x 182.27425pt. - [115 </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR-led.png, id=589, 455.301pt x 257.763pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR-led.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR-led.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR-led.png used on input line 125. + [115 </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR.png> +] +</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR-led.png, i +d=589, 455.301pt x 257.763pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR-led.p +ng Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR-led.pn +g> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ld +r/figures/LDR-led.png used on input line 125. (pdftex.def) Requested size: 397.48499pt x 225.03864pt. - (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/arduino/ldr-read/ldr-read.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/arduino/ldr-read/ldr-read.ino) [116 </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/LDR-led.png>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/arduino/ldr-read/ldr-read.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/arduino/ldr-read/ldr-read.ino [117]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/arduino/ldr-led/ldr-led.ino) [118] + +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/arduino/ldr-read/ldr-r +ead.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/arduino/ldr-read/ldr-r +ead.ino) [116 </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ +LDR-led.png>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/arduino/ldr-read/ldr-r +ead.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/arduino/ldr-read/ldr-r +ead.ino [117]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/arduino/ldr-led/ldr-le +d.ino) [118] Overfull \hbox (19.20517pt too wide) in paragraph at lines 227--238 -[]\T1/cmr/m/n/10.95 In this ex-per-i-ment, we will ob-serve the sat-u-ra-tion point of LDR, see Scilab Code 6.2[]. +[]\T1/cmr/m/n/10.95 In this ex-per-i-ment, we will ob-serve the sat-u-ra-tion p +oint of LDR, see Scilab Code 6.2[]. [] -(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/scilab/ldr-read.sce) [119] (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/scilab/ldr-led.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/scilab/ldr-read.sce) +[119] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/scilab/ldr-led.sce) Overfull \hbox (0.34052pt too wide) in paragraph at lines 271--277 -\T1/cmr/m/n/10.95 Next, we shall per-form the above men-tioned ex-per-i-ment, to read LDR val-ues, through +\T1/cmr/m/n/10.95 Next, we shall per-form the above men-tioned ex-per-i-ment, t +o read LDR val-ues, through [] -</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-read-xcos.PNG, id=603, 257.46187pt x 304.13625pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-read-xcos.PNG Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-read-xcos.PNG> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-read-xcos.PNG used on input line 287. +</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-read-xcos. +PNG, id=603, 257.46187pt x 304.13625pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-read- +xcos.PNG Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-read-x +cos.PNG> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ld +r/figures/ldr-read-xcos.PNG used on input line 287. (pdftex.def) Requested size: 178.86702pt x 211.2975pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-led.png, id=604, 769.87625pt x 640.3925pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-led.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-led.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-led.png used on input line 343. +</home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-led.png, i +d=604, 769.87625pt x 640.3925pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-led.p +ng Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-led.pn +g> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/ld +r/figures/ldr-led.png used on input line 343. (pdftex.def) Requested size: 258.36281pt x 214.91635pt. Overfull \hbox (4.77844pt too wide) in paragraph at lines 364--384 [][] [] -[120] [121 </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-read-xcos.PNG>] [122 </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr-led.png>] [123] (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/python/ldr-read.py) [124] (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/python/ldr-led.py) +[120] [121 </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/figures/ldr +-read-xcos.PNG>] [122 </home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/ +figures/ldr-led.png>] +Overfull \hbox (25.70164pt too wide) in paragraph at lines 411--422 +[]\T1/cmr/m/n/10.95 In this ex-per-i-ment, we will ob-serve the sat-u-ra-tion p +oint of LDR, see Python Code 6.2[]. + [] + +[123] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/python/ldr-read.py) +[124] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/python/ldr-led.py) Underfull \vbox (badness 10000) has occurred while \output is active [] - [125] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/led-push-button.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/julia/ldr-read.jl [126]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/julia/ldr-led.jl) [127] (/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/led-push-button.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/OpenModelica/ldr-read.mo [128]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/OpenModelica/ldr-led.mo)) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/dcmotor.tex [129] [130 + [125] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/julia/led-push-button +.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/julia/ldr-read.jl +[126]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/julia/ldr-led.jl) +[127] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/push/OpenModelica/led-push +-button.mo) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/OpenModelica/ldr-read. +mo [128]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/ldr/OpenModelica/ldr-led.m +o)) (./user-code/pot/pot.tex [129] [130 ] Chapter 7. -</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_board.png, id=643, 247.92625pt x 232.87pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_board.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_board.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_board.png used on input line 62. -(pdftex.def) Requested size: 258.36281pt x 242.69075pt. -[131] -</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.png, id=647, 415.5525pt x 467.7475pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.png used on input line 102. -(pdftex.def) Requested size: 178.86702pt x 201.33447pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg, id=648, 2469.97781pt x 1973.12157pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg used on input line 108. -(pdftex.def) Requested size: 258.36281pt x 206.38603pt. - [132 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_board.png>] -Overfull \vbox (9.00647pt too high) has occurred while \output is active [] - - [133 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_description.jpg>] [134] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-clock/dcmotor-clock.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-both/dcmotor-both.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-loop/dcmotor-loop.ino [135]) -Underfull \hbox (badness 10000) in paragraph at lines 221--237 - - [] - -[136] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce) [137] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce) [138] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clock.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-both.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-loop.sce [139]) -</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-clock.png, id=679, 275.52937pt x 290.58563pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-clock.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-clock.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-clock.png used on input line 399. -(pdftex.def) Requested size: 178.86702pt x 188.64784pt. - [140 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-clock.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-both.png, id=683, 292.09125pt x 322.95656pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-both.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-both.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-both.png used on input line 453. -(pdftex.def) Requested size: 178.86702pt x 197.77196pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-loop.png, id=684, 281.55188pt x 307.90031pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-loop.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-loop.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-loop.png used on input line 497. -(pdftex.def) Requested size: 178.86702pt x 195.60847pt. - [141] [142 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-both.png>] [143 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-loop.png>] [144] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clock.py [145]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-both.py) [146] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-loop.py) [147] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-clock.jl [148]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-loop.jl) [149] (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-clock.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-both.mo [150]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmotor-loop.mo [151])) (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/pot.tex [152] -Chapter 8. -</home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/potmeter.png, id=725, 1576.38937pt x 1305.37688pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/potmeter.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/potmeter.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/potmeter.png used on input line 65. +</home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/potmeter.png, +id=643, 1576.38937pt x 1305.37688pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/potmeter. +png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/potmeter.p +ng> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/po +t/figures/potmeter.png used on input line 65. (pdftex.def) Requested size: 178.86702pt x 148.11337pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/schematic.png, id=726, 415.5525pt x 417.56pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/schematic.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/schematic.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/schematic.png used on input line 68. +</home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/schematic.png, + id=644, 415.5525pt x 417.56pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/schematic +.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/schematic. +png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/po +t/figures/schematic.png used on input line 68. (pdftex.def) Requested size: 178.86702pt x 179.73206pt. -[153 - -] [154 </home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/potmeter.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/schematic.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/POT-led-bb.png, id=735, 453.695pt x 243.309pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/POT-led-bb.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/POT-led-bb.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/POT-led-bb.png used on input line 113. +[131] [132 </home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/pot +meter.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/sch +ematic.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/POT-led-bb.png +, id=653, 453.695pt x 243.309pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/POT-led-b +b.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/POT-led-bb +.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/po +t/figures/POT-led-bb.png used on input line 113. (pdftex.def) Requested size: 397.48499pt x 213.16588pt. Overfull \hbox (9.68646pt too wide) in paragraph at lines 112--114 [] [] [] -[155 </home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/POT-led-bb.png>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot-threshold/pot-threshold.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot-threshold/pot-threshold.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot-threshold/pot-threshold.ino [156]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot-threshold.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot-threshold.sce) [157] +[133 </home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/POT-led-b +b.png>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot-threshold/ +pot-threshold.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot-threshold/ +pot-threshold.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/arduino/pot-threshold/ +pot-threshold.ino [134]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot-threshold.s +ce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot-threshold.s +ce) [135] Overfull \hbox (6.93184pt too wide) in paragraph at lines 200--204 -[]\T1/cmr/m/n/10.95 Turning on LEDs de-pend-ing on the po-ten-tiome-ter thresh-old. Avail- +[]\T1/cmr/m/n/10.95 Turning on LEDs de-pend-ing on the po-ten-tiome-ter thresh- +old. Avail- [] -(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot-threshold.sce) -</home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/pot-threshold.PNG, id=747, 548.80031pt x 493.845pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/pot-threshold.PNG Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/pot-threshold.PNG> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/pot-threshold.PNG used on input line 218. + +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/scilab/pot-threshold.s +ce) +</home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/pot-threshold. +PNG, id=665, 548.80031pt x 493.845pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/pot-thres +hold.PNG Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/pot-thresh +old.PNG> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/po +t/figures/pot-threshold.PNG used on input line 218. (pdftex.def) Requested size: 258.36281pt x 232.49149pt. Overfull \hbox (4.77844pt too wide) in paragraph at lines 236--265 [][] [] -[158] [159 </home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/pot-threshold.PNG>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot-threshold.py) [160] (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot-threshold.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot-threshold.py [161]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot-threshold.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot-threshold.jl) +[136] [137 </home/fossee/Desktop/floss-scilab-arduino/user-code/pot/figures/pot +-threshold.PNG>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot-threshold.p +y) [138] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot-threshold.p +y) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/python/pot-threshold.p +y [139]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot-threshold.jl +) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot-threshold.jl +) Overfull \hbox (9.15074pt too wide) in paragraph at lines 318--319 -\T1/cmr/m/n/10.95 where \T1/fvm/m/n/10.95 digiWrite \T1/cmr/m/n/10.95 is used to set the pin 11 high (1) or low (0). We used \T1/fvm/m/n/10.95 sleep(1000) +\T1/cmr/m/n/10.95 where \T1/fvm/m/n/10.95 digiWrite \T1/cmr/m/n/10.95 is used t +o set the pin 11 high (1) or low (0). We used \T1/fvm/m/n/10.95 sleep(1000) [] Overfull \hbox (0.88127pt too wide) in paragraph at lines 325--329 -[]\T1/cmr/m/n/10.95 Turning on LEDs de-pend-ing on the po-ten-tiome-ter thresh-old. Avail- +[]\T1/cmr/m/n/10.95 Turning on LEDs de-pend-ing on the po-ten-tiome-ter thresh- +old. Avail- [] -[162] (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot-threshold.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot-threshold.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot-threshold.mo [163]) +[140] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/julia/pot-threshold.jl +) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot-thres +hold.mo) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot-thres +hold.mo [141]) Overfull \hbox (7.95369pt too wide) in paragraph at lines 348--352 []\T1/cmr/m/n/10.95 Turning on LEDs de-pend-ing on the po-ten-tiome-ter thresh- + [] -(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot-threshold.mo [164])) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/thermistor.tex [165] [166 + +(/home/fossee/Desktop/floss-scilab-arduino/user-code/pot/OpenModelica/pot-thres +hold.mo [142])) (./user-code/thermistor/thermistor.tex [143] [144 ] -Chapter 9. -</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/NTC-bead.jpg, id=777, 139.9629pt x 126.2316pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/NTC-bead.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/NTC-bead.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/NTC-bead.jpg used on input line 70. +Chapter 8. +</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/NTC-bea +d.jpg, id=695, 139.9629pt x 126.2316pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/NT +C-bead.jpg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/NTC +-bead.jpg> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th +ermistor/figures/NTC-bead.jpg used on input line 70. (pdftex.def) Requested size: 178.86702pt x 161.32933pt. -LaTeX Warning: Citation `therm-wiki' on page 167 undefined on input line 70. +LaTeX Warning: Citation `therm-wiki' on page 145 undefined on input line 70. -LaTeX Warning: Citation `therm-wiki' on page 167 undefined on input line 70. +LaTeX Warning: Citation `therm-wiki' on page 145 undefined on input line 70. -</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-sym.png, id=778, 1284.8pt x 913.4125pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-sym.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-sym.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-sym.png used on input line 73. +</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-s +ym.png, id=696, 1284.8pt x 913.4125pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th +erm-sym.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the +rm-sym.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th +ermistor/figures/therm-sym.png used on input line 73. (pdftex.def) Requested size: 119.2467pt x 84.76808pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/THERMISTOR-Diagram-crop.pdf, id=779, 329.23pt x 422.57875pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/THERMISTOR-Diagram-crop.pdf Graphic file (type pdf) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/THERMISTOR-Diagram-crop.pdf> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/THERMISTOR-Diagram-crop.pdf used on input line 83. +</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/THERMIS +TOR-Diagram-crop.pdf, id=697, 329.23pt x 422.57875pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/TH +ERMISTOR-Diagram-crop.pdf Graphic file (type pdf) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/THE +RMISTOR-Diagram-crop.pdf> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th +ermistor/figures/THERMISTOR-Diagram-crop.pdf used on input line 83. (pdftex.def) Requested size: 178.86702pt x 229.58835pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/BUZZER-Diagram-crop.pdf, id=780, 307.1475pt x 366.36874pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/BUZZER-Diagram-crop.pdf Graphic file (type pdf) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/BUZZER-Diagram-crop.pdf> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/BUZZER-Diagram-crop.pdf used on input line 87. +</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/BUZZER- +Diagram-crop.pdf, id=698, 307.1475pt x 366.36874pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/BU +ZZER-Diagram-crop.pdf Graphic file (type pdf) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/BUZ +ZER-Diagram-crop.pdf> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th +ermistor/figures/BUZZER-Diagram-crop.pdf used on input line 87. (pdftex.def) Requested size: 178.86702pt x 213.35492pt. -[167] +[145] Overfull \vbox (30.13353pt too high) has occurred while \output is active [] - [168 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/NTC-bead.jpg> </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-sym.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/THERMISTOR-Diagram-crop.pdf> </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/BUZZER-Diagram-crop.pdf>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermistor.png, id=800, 453.695pt x 236.885pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermistor.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermistor.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermistor.png used on input line 110. + +[146 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/NT +C-bead.jpg> </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/fig +ures/therm-sym.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/thermi +stor/figures/THERMISTOR-Diagram-crop.pdf> </home/fossee/Desktop/floss-scilab-ar +duino/user-code/thermistor/figures/BUZZER-Diagram-crop.pdf>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermis +tor.png, id=720, 453.695pt x 236.885pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th +ermistor.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the +rmistor.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th +ermistor/figures/thermistor.png used on input line 110. (pdftex.def) Requested size: 397.48499pt x 207.53772pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermistor-buzzer.png, id=801, 453.695pt x 240.097pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermistor-buzzer.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermistor-buzzer.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermistor-buzzer.png used on input line 124. +</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermis +tor-buzzer.png, id=721, 453.695pt x 240.097pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th +ermistor-buzzer.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the +rmistor-buzzer.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th +ermistor/figures/thermistor-buzzer.png used on input line 124. (pdftex.def) Requested size: 397.48499pt x 210.35179pt. - [169 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermistor.png>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-read/therm-read.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-read/therm-read.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-read/therm-read.ino) [170 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/thermistor-buzzer.png>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-read/therm-read.ino [171]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-buzzer/therm-buzzer.ino) [172] [173] (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-read.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-buzzer.sce) [174] -</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-read-xcos.png, id=826, 617.30624pt x 548.0475pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-read-xcos.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-read-xcos.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-read-xcos.png used on input line 306. + [147 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/t +hermistor.png>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-r +ead/therm-read.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-r +ead/therm-read.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-r +ead/therm-read.ino) [148 </home/fossee/Desktop/floss-scilab-arduino/user-code/t +hermistor/figures/thermistor-buzzer.png>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-r +ead/therm-read.ino [149]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/arduino/therm-b +uzzer/therm-buzzer.ino) [150] [151] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-re +ad.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/scilab/therm-bu +zzer.sce) [152] +</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-r +ead-xcos.png, id=745, 617.30624pt x 548.0475pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th +erm-read-xcos.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the +rm-read-xcos.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th +ermistor/figures/therm-read-xcos.png used on input line 306. (pdftex.def) Requested size: 194.76982pt x 172.91183pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-read.png, id=827, 632.3625pt x 529.98pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-read.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-read.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-read.png used on input line 339. +</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-r +ead.png, id=746, 632.3625pt x 529.98pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th +erm-read.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the +rm-read.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th +ermistor/figures/therm-read.png used on input line 339. (pdftex.def) Requested size: 194.76982pt x 163.23271pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-buzzer-xcos.png, id=828, 627.34375pt x 530.98375pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-buzzer-xcos.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-buzzer-xcos.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-buzzer-xcos.png used on input line 355. +</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-b +uzzer-xcos.png, id=747, 627.34375pt x 530.98375pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th +erm-buzzer-xcos.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the +rm-buzzer-xcos.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th +ermistor/figures/therm-buzzer-xcos.png used on input line 355. (pdftex.def) Requested size: 258.36281pt x 218.68509pt. - [175 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-read-xcos.png>] + [153 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/t +herm-read-xcos.png>] Overfull \hbox (4.77844pt too wide) in paragraph at lines 373--393 [][] [] -</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-buzzer.png, id=834, 612.2875pt x 589.20125pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-buzzer.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-buzzer.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-buzzer.png used on input line 399. +</home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-b +uzzer.png, id=752, 612.2875pt x 589.20125pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th +erm-buzzer.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/the +rm-buzzer.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/th +ermistor/figures/therm-buzzer.png used on input line 399. (pdftex.def) Requested size: 178.86702pt x 172.12265pt. -[176 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-read.png>] +[154 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th +erm-read.png>] + +LaTeX Warning: Text page 155 contains only floats. + +[155 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/th +erm-buzzer-xcos.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/therm +istor/figures/therm-buzzer.png>] [156] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-re +ad.py [157]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-bu +zzer.py [158]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-rea +d.jl [159]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-buz +zer.jl) [160] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/th +erm-read.mo) [161] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/th +erm-buzzer.mo)) (./user-code/dcmotor/dcmotor.tex [162] +Chapter 9. +</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor_bo +ard.png, id=784, 247.92625pt x 232.87pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot +or_board.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto +r_board.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc +motor/figures/dcmotor_board.png used on input line 62. +(pdftex.def) Requested size: 258.36281pt x 242.69075pt. +[163 + +] +</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schematic. +png, id=789, 415.5525pt x 467.7475pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schem +atic.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schema +tic.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc +motor/figures/schematic.png used on input line 102. +(pdftex.def) Requested size: 178.86702pt x 201.33447pt. +</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_motor_d +escription.jpg, id=790, 2469.97781pt x 1973.12157pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_mo +tor_description.jpg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dc_mot +or_description.jpg> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc +motor/figures/dc_motor_description.jpg used on input line 108. +(pdftex.def) Requested size: 258.36281pt x 206.38603pt. + [164 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmo +tor_board.png>] +Overfull \vbox (9.00647pt too high) has occurred while \output is active [] -LaTeX Warning: Text page 177 contains only floats. -[177 </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-buzzer-xcos.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/figures/therm-buzzer.png>] [178] (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-read.py [179]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/python/therm-buzzer.py [180]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-read.jl [181]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/julia/therm-buzzer.jl) [182] (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-read.mo) [183] (/home/fossee/Desktop/floss-scilab-arduino/user-code/thermistor/OpenModelica/therm-buzzer.mo)) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/servo.tex [184] +[165 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/schem +atic.png> </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/ +dc_motor_description.jpg>] [166] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-cl +ock/dcmotor-clock.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-bo +th/dcmotor-both.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/arduino/dcmotor-lo +op/dcmotor-loop.ino [167]) +Underfull \hbox (badness 10000) in paragraph at lines 221--237 + + [] + +[168] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo +ck.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo +ck.sce) [169] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo +ck.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo +ck.sce) [170] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-clo +ck.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-bot +h.sce) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/scilab/dcmotor-loo +p.sce [171]) +</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-cl +ock.png, id=820, 275.52937pt x 290.58563pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot +or-clock.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto +r-clock.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc +motor/figures/dcmotor-clock.png used on input line 399. +(pdftex.def) Requested size: 178.86702pt x 188.64784pt. + [172 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmo +tor-clock.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-bo +th.png, id=824, 292.09125pt x 322.95656pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot +or-both.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto +r-both.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc +motor/figures/dcmotor-both.png used on input line 453. +(pdftex.def) Requested size: 178.86702pt x 197.77196pt. +</home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmotor-lo +op.png, id=825, 281.55188pt x 307.90031pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmot +or-loop.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figures/dcmoto +r-loop.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/dc +motor/figures/dcmotor-loop.png used on input line 497. +(pdftex.def) Requested size: 178.86702pt x 195.60847pt. + [173] [174 </home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/figure +s/dcmotor-both.png>] [175 </home/fossee/Desktop/floss-scilab-arduino/user-code/ +dcmotor/figures/dcmotor-loop.png>] [176] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-clo +ck.py [177]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-bot +h.py) [178] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/python/dcmotor-loo +p.py) [179] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-cloc +k.jl [180]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-both +.jl) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/julia/dcmotor-loop +.jl) [181] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot +or-clock.mo) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot +or-both.mo [182]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/dcmotor/OpenModelica/dcmot +or-loop.mo [183])) (./user-code/servo/servo.tex [184] Chapter 10. Underfull \vbox (badness 1975) has occurred while \output is active [] @@ -1368,138 +2179,286 @@ Underfull \vbox (badness 1975) has occurred while \output is active [] ] Overfull \hbox (23.49748pt too wide) in paragraph at lines 90--98 -[]\T1/cmr/m/n/10.95 In the first ex-per-i-ment, we will move the ser-vo-mo-tor by $\OT1/cmr/m/n/10.95 30[]$ \T1/cmr/m/n/10.95 us-ing Ar-duino Code 10.1[]. +[]\T1/cmr/m/n/10.95 In the first ex-per-i-ment, we will move the ser-vo-mo-tor +by $\OT1/cmr/m/n/10.95 30[]$ \T1/cmr/m/n/10.95 us-ing Ar-duino Code 10.1[]. [] -[186] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-init/servo-init.ino [187]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-reverse/servo-reverse.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-loop/servo-loop.ino) [188] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-pot/servo-pot.ino) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-init.sce) [189] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-pot.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-pot.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-init.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-reverse.sce [190]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-loop.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-pot.sce) -</home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-init.png, id=888, 265.74281pt x 309.40594pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-init.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-init.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-init.png used on input line 299. +[186] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-init/s +ervo-init.ino [187]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-revers +e/servo-reverse.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-loop/s +ervo-loop.ino) [188] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/arduino/servo-pot/se +rvo-pot.ino) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-init.sc +e) [189] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-pot.sce +) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-pot.sce +) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-init.sc +e) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-reverse +.sce [190]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-loop.sc +e) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/scilab/servo-pot.sce +) +</home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-init.p +ng, id=888, 265.74281pt x 309.40594pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-i +nit.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-in +it.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/se +rvo/figures/servo-init.png used on input line 299. (pdftex.def) Requested size: 178.86702pt x 208.2593pt. [191] -</home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-reverse.png, id=892, 244.66406pt x 281.55188pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-reverse.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-reverse.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-reverse.png used on input line 334. +</home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-revers +e.png, id=892, 244.66406pt x 281.55188pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-r +everse.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-re +verse.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/se +rvo/figures/servo-reverse.png used on input line 334. (pdftex.def) Requested size: 178.86702pt x 205.84047pt. Underfull \vbox (badness 3199) has occurred while \output is active [] - [192 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-init.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-loop.png, id=896, 281.55188pt x 347.04657pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-loop.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-loop.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-loop.png used on input line 372. + [192 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo- +init.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-loop.p +ng, id=896, 281.55188pt x 347.04657pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-l +oop.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-lo +op.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/se +rvo/figures/servo-loop.png used on input line 372. (pdftex.def) Requested size: 178.86702pt x 220.47803pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-pot.png, id=897, 286.06876pt x 292.09125pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-pot.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-pot.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-pot.png used on input line 415. +</home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-pot.pn +g, id=897, 286.06876pt x 292.09125pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-p +ot.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-po +t.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/se +rvo/figures/servo-pot.png used on input line 415. (pdftex.def) Requested size: 178.86702pt x 182.63234pt. - [193 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-reverse.png>] + +[193 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-r +everse.png>] Overfull \hbox (17.60953pt too wide) in paragraph at lines 435--446 [][] [] -[194 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-loop.png>] +[194 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-l +oop.png>] -LaTeX Warning: Reference `sec:py-start' on page 195 undefined on input line 459. +LaTeX Warning: Reference `sec:py-start' on page 195 undefined on input line 459 +. Underfull \vbox (badness 10000) has occurred while \output is active [] - [195 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo-pot.png>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-init.py) [196] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-pot.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-pot.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-init.py [197]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-reverse.py [198]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-loop.py [199]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-pot.py [200]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-init.jl) [201] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-pot.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-pot.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-init.jl) + [195 </home/fossee/Desktop/floss-scilab-arduino/user-code/servo/figures/servo- +pot.png>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-init.py +) [196] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-pot.py) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-pot.py) + +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-init.py +[197]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-reverse +.py [198]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-loop.py +[199]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/python/servo-pot.py +[200]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-init.jl) +[201] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-pot.jl) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-pot.jl) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-init.jl) + Overfull \hbox (2.67752pt too wide) in paragraph at lines 600--604 -[]\T1/cmr/m/n/10.95 Rotating the ser-vo-mo-tor to a spec-i-fied de-gree and re-vers-ing. Avail- +[]\T1/cmr/m/n/10.95 Rotating the ser-vo-mo-tor to a spec-i-fied de-gree and re- +vers-ing. Avail- [] -(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-reverse.jl) [202] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-loop.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-pot.jl) [203] (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-init.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo_pot.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo_pot.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-init.mo [204]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-reverse.mo [205]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-loop.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo_pot.mo [206])) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/modbus.tex [207] [208 + +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-reverse. +jl) [202] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-loop.jl) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/julia/servo-pot.jl) +[203] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-i +nit.mo) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo_p +ot.mo) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo_p +ot.mo) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-i +nit.mo [204]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-r +everse.mo [205]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo-l +oop.mo) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/servo/OpenModelica/servo_p +ot.mo [206])) (./user-code/modbus/modbus.tex [207] [208 ] Chapter 11. [209] -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.png, id=952, 672.5125pt x 224.84pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.png used on input line 71. +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.png, i +d=952, 672.5125pt x 224.84pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.p +ng Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.pn +g> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/fig1.png used on input line 71. (pdftex.def) Requested size: 357.73405pt x 119.60033pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.png, id=953, 360.34625pt x 375.4025pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.png used on input line 79. +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.png, i +d=953, 360.34625pt x 375.4025pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.p +ng Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.pn +g> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/fig2.png used on input line 79. (pdftex.def) Requested size: 178.86702pt x 186.33748pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.png, id=954, 481.04718pt x 214.55156pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.png used on input line 106. +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.png, i +d=954, 481.04718pt x 214.55156pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.p +ng Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.pn +g> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/fig3.png used on input line 106. (pdftex.def) Requested size: 357.73405pt x 159.55464pt. - [210 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1.png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig2.png (PNG copy)>] [211 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig3.png (PNG copy)>] [212] [213] -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-Set-Up.png, id=969, 722.7pt x 542.025pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-Set-Up.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-Set-Up.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-Set-Up.png used on input line 300. + [210 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/fig1. +png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/fig +ures/fig2.png (PNG copy)>] [211 </home/fossee/Desktop/floss-scilab-arduino/user +-code/modbus/figures/fig3.png (PNG copy)>] [212] [213] +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-Set-Up +.png, id=969, 722.7pt x 542.025pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-S +et-Up.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-Se +t-Up.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/Full-Set-Up.png used on input line 300. (pdftex.def) Requested size: 258.36281pt x 193.77246pt. [214] -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-diagram.PNG, id=973, 398.23781pt x 255.95625pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-diagram.PNG Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-diagram.PNG> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-diagram.PNG used on input line 329. +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-diagr +am.PNG, id=973, 398.23781pt x 255.95625pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block- +diagram.PNG Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-d +iagram.PNG> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/block-diagram.PNG used on input line 329. (pdftex.def) Requested size: 258.36281pt x 166.06104pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduino_code_flowchart.png, id=974, 327.2225pt x 480.79625pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduino_code_flowchart.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduino_code_flowchart.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduino_code_flowchart.png used on input line 348. +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduino_cod +e_flowchart.png, id=974, 327.2225pt x 480.79625pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduin +o_code_flowchart.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduino +_code_flowchart.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/arduino_code_flowchart.png used on input line 348. (pdftex.def) Requested size: 258.36281pt x 379.61945pt. - [215 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full-Set-Up.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowchart.png, id=979, 482.55281pt x 362.10281pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowchart.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowchart.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowchart.png used on input line 376. + [215 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/Full- +Set-Up.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowchart.p +ng, id=979, 482.55281pt x 362.10281pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowch +art.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowcha +rt.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/flowchart.png used on input line 376. (pdftex.def) Requested size: 357.73405pt x 268.44914pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-output.png, id=980, 1028.34187pt x 578.16pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-output.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-output.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-output.png used on input line 393. +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-out +put.png, id=980, 1028.34187pt x 578.16pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/curren +t-output.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current +-output.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/current-output.png used on input line 393. (pdftex.def) Requested size: 397.48499pt x 223.4789pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-output-setup.jpg, id=981, 2509.375pt x 1411.2725pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-output-setup.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-output-setup.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-output-setup.jpg used on input line 400. +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-out +put-setup.jpg, id=981, 2509.375pt x 1411.2725pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/curren +t-output-setup.jpg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current +-output-setup.jpg> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/current-output-setup.jpg used on input line 400. (pdftex.def) Requested size: 258.36281pt x 145.29163pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-output.png, id=982, 1028.34187pt x 578.16pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-output.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-output.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-output.png used on input line 412. +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-out +put.png, id=982, 1028.34187pt x 578.16pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltag +e-output.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage +-output.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/voltage-output.png used on input line 412. (pdftex.def) Requested size: 397.48499pt x 223.4789pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-output-setup.jpg, id=983, 2509.375pt x 1411.2725pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-output-setup.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-output-setup.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-output-setup.jpg used on input line 419. +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-out +put-setup.jpg, id=983, 2509.375pt x 1411.2725pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltag +e-output-setup.jpg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage +-output-setup.jpg> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/voltage-output-setup.jpg used on input line 419. (pdftex.def) Requested size: 258.36281pt x 145.29163pt. -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-power-output.png, id=984, 1028.34187pt x 578.16pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-power-output.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-power-output.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-power-output.png used on input line 429. +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-powe +r-output.png, id=984, 1028.34187pt x 578.16pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active +-power-output.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active- +power-output.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/active-power-output.png used on input line 429. (pdftex.def) Requested size: 397.48499pt x 223.4789pt. - [216 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block-diagram.PNG>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-power-output-setup.jpg, id=989, 2509.375pt x 1411.2725pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-power-output-setup.jpg Graphic file (type jpg) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-power-output-setup.jpg> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-power-output-setup.jpg used on input line 436. + +[216 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/block- +diagram.PNG>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-powe +r-output-setup.jpg, id=989, 2509.375pt x 1411.2725pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active +-power-output-setup.jpg Graphic file (type jpg) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active- +power-output-setup.jpg> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/active-power-output-setup.jpg used on input line 436. (pdftex.def) Requested size: 258.36281pt x 145.29163pt. Underfull \vbox (badness 10000) has occurred while \output is active [] - [217 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/arduino_code_flowchart.png>] -</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_value_xcos.png, id=995, 635.37375pt x 455.7025pt> -File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_value_xcos.png Graphic file (type png) -<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_value_xcos.png> -Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_value_xcos.png used on input line 463. + [217 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/ardui +no_code_flowchart.png>] +</home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_value_ +xcos.png, id=995, 635.37375pt x 455.7025pt> +File: /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_v +alue_xcos.png Graphic file (type png) +<use /home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_va +lue_xcos.png> +Package pdftex.def Info: /home/fossee/Desktop/floss-scilab-arduino/user-code/mo +dbus/figures/read_value_xcos.png used on input line 463. (pdftex.def) Requested size: 258.36281pt x 185.30946pt. Underfull \hbox (badness 1259) in paragraph at lines 466--466 -[]\T1/cmr/m/n/10.95 Figure 11.14: |Xcos di-a-gram to read En-ergy Me-ter val-ues. This is what +[]\T1/cmr/m/n/10.95 Figure 11.14: |Xcos di-a-gram to read En-ergy Me-ter val-ue +s. This is what [] @@ -1507,10 +2466,46 @@ Overfull \hbox (16.70493pt too wide) in paragraph at lines 479--491 [][] [] -[218 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowchart.png (PNG copy)>] [219 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-output.png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/current-output-setup.jpg>] +[218 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/flowch +art.png (PNG copy)>] [219 </home/fossee/Desktop/floss-scilab-arduino/user-code/ +modbus/figures/current-output.png (PNG copy)> </home/fossee/Desktop/floss-scila +b-arduino/user-code/modbus/figures/current-output-setup.jpg>] Underfull \vbox (badness 10000) has occurred while \output is active [] - [220 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-output.png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/voltage-output-setup.jpg>] (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/arduino/send_packet.ino [221 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-power-output.png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/active-power-output-setup.jpg>] [222 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/read_value_xcos.png>]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_val.sce) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_current.sci) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_voltage.sci [223]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_active_power.sci) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_current.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_voltage.py [224]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_active_power.py) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readCurrent.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readVoltage.jl [225]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readPower.jl) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readCurrent.mo) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readVoltage.mo [226]) (/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readPower.mo)) (/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.bbl [227] [228 + [220 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/volta +ge-output.png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/user-code/ +modbus/figures/voltage-output-setup.jpg>] +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/arduino/send_packet +.ino [221 </home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/figures/a +ctive-power-output.png (PNG copy)> </home/fossee/Desktop/floss-scilab-arduino/u +ser-code/modbus/figures/active-power-output-setup.jpg>] [222 </home/fossee/Desk +top/floss-scilab-arduino/user-code/modbus/figures/read_value_xcos.png>]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_val.sce +) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_current +.sci) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_voltage +.sci [223]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/scilab/read_active_ +power.sci) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_current +.py) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_voltage +.py [224]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/python/read_active_ +power.py) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readCurrent.j +l) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readVoltage.j +l [225]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/julia/readPower.jl) + +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readCu +rrent.mo) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readVo +ltage.mo [226]) +(/home/fossee/Desktop/floss-scilab-arduino/user-code/modbus/OpenModelica/readPo +wer.mo)) (./floss-arduino.bbl [227] [228 ] Underfull \hbox (badness 10000) in paragraph at lines 4--9 @@ -1519,34 +2514,39 @@ Underfull \hbox (badness 10000) in paragraph at lines 4--9 Underfull \hbox (badness 10000) in paragraph at lines 4--9 -\T1/cmr/m/n/10.95 https://www.scilab.org/community/scilabtec/2009/Use-of-Scilab-for-space- +\T1/cmr/m/n/10.95 https://www.scilab.org/community/scilabtec/2009/Use-of-Scilab +-for-space- [] Overfull \hbox (19.10986pt too wide) in paragraph at lines 28--31 -[]\T1/cmr/m/n/10.95 Arduino uno. https://www.arduino.cc/en/uploads/Main/ArduinoUnoFront240.jpg. +[]\T1/cmr/m/n/10.95 Arduino uno. https://www.arduino.cc/en/uploads/Main/Arduin +oUnoFront240.jpg. [] Overfull \hbox (13.0502pt too wide) in paragraph at lines 33--37 -[]\T1/cmr/m/n/10.95 Arduino mega. https://www.arduino.cc/en/uploads/Main/ArduinoMega2560_R3 +[]\T1/cmr/m/n/10.95 Arduino mega. https://www.arduino.cc/en/uploads/Main/Ardui +noMega2560_R3 [] Overfull \hbox (15.39987pt too wide) in paragraph at lines 49--53 -[]\T1/cmr/m/n/10.95 Candy sort-ing ma-chine. http://beta.ivc.no/wiki/index.php/Skittles_M%26M%27s +[]\T1/cmr/m/n/10.95 Candy sort-ing ma-chine. http://beta.ivc.no/wiki/index.php +/Skittles_M%26M%27s [] [229] Underfull \hbox (badness 1577) in paragraph at lines 95--98 -[]\T1/cmr/m/n/10.95 Juliaio/serialports.jl: Se-ri-al-port io streams in ju-lia backed by py-se-rial. +[]\T1/cmr/m/n/10.95 Juliaio/serialports.jl: Se-ri-al-port io streams in ju-lia +backed by py-se-rial. [] ) \tf@thm=\write13 \openout13 = `floss-arduino.thm'. - [230] (/home/fossee/Desktop/floss-scilab-arduino/floss-arduino.aux) + [230] (./floss-arduino.aux) LaTeX Warning: There were undefined references. @@ -1555,15 +2555,37 @@ LaTeX Warning: There were multiply-defined labels. ) Here is how much of TeX's memory you used: - 9799 strings out of 481239 - 215216 string characters out of 5920377 + 9792 strings out of 481239 + 212749 string characters out of 5920377 742688 words of memory out of 5000000 - 24327 multiletter control sequences out of 15000+600000 + 24329 multiletter control sequences out of 15000+600000 554670 words of font info for 69 fonts, out of 8000000 for 9000 1143 hyphenation exceptions out of 8191 - 50i,11n,53p,509b,1826s stack positions out of 5000i,500n,10000p,200000b,80000s -{/usr/share/texmf/fonts/enc/dvips/cm-super/cm-super-ts1.enc}{/usr/share/texmf/fonts/enc/dvips/cm-super/cm-super-t1.enc}{/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc}</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy6.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy8.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy9.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/bera/fvmr8a.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfbx0900.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfbx1095.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfbx1200.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfbx1440.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfbx2074.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfbx2488.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfrm0600.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfrm0800.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfrm0900.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfrm1000.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfrm1095.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfsi1095.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfss1095.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfti1095.pfb> -Output written on /home/fossee/Desktop/floss-scilab-arduino/floss-arduino.pdf (254 pages, 26605982 bytes). + 50i,11n,53p,467b,1826s stack positions out of 5000i,500n,10000p,200000b,80000s +{/usr/share/texmf/fonts/enc/dvips/cm-super/cm-super-ts1.enc}{/usr/share/texmf +/fonts/enc/dvips/cm-super/cm-super-t1.enc}{/usr/share/texlive/texmf-dist/fonts/ +enc/dvips/base/8r.enc}</usr/share/texlive/texmf-dist/fonts/type1/public/amsfont +s/cm/cmex10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/c +mmi10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.p +fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></us +r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/ +texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb></usr/share/texlive/ +texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf- +dist/fonts/type1/public/amsfonts/cm/cmsy6.pfb></usr/share/texlive/texmf-dist/fo +nts/type1/public/amsfonts/cm/cmsy8.pfb></usr/share/texlive/texmf-dist/fonts/typ +e1/public/amsfonts/cm/cmsy9.pfb></usr/share/texlive/texmf-dist/fonts/type1/publ +ic/bera/fvmr8a.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfbx0900.pfb>< +/usr/share/texmf/fonts/type1/public/cm-super/sfbx1095.pfb></usr/share/texmf/fon +ts/type1/public/cm-super/sfbx1200.pfb></usr/share/texmf/fonts/type1/public/cm-s +uper/sfbx1440.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfbx2074.pfb></ +usr/share/texmf/fonts/type1/public/cm-super/sfbx2488.pfb></usr/share/texmf/font +s/type1/public/cm-super/sfrm0600.pfb></usr/share/texmf/fonts/type1/public/cm-su +per/sfrm0800.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfrm0900.pfb></u +sr/share/texmf/fonts/type1/public/cm-super/sfrm1000.pfb></usr/share/texmf/fonts +/type1/public/cm-super/sfrm1095.pfb></usr/share/texmf/fonts/type1/public/cm-sup +er/sfsi1095.pfb></usr/share/texmf/fonts/type1/public/cm-super/sfss1095.pfb></us +r/share/texmf/fonts/type1/public/cm-super/sfti1095.pfb> +Output written on floss-arduino.pdf (254 pages, 26607709 bytes). PDF statistics: 1134 PDF objects out of 1200 (max. 8388607) 660 compressed objects within 7 object streams diff --git a/floss-arduino.lot b/floss-arduino.lot index cd54887..1a1cece 100644 --- a/floss-arduino.lot +++ b/floss-arduino.lot @@ -16,16 +16,16 @@ \contentsline {table}{\numberline {6.1}{\ignorespaces Xcos parameters to read LDR\relax }}{121}% \contentsline {table}{\numberline {6.2}{\ignorespaces Xcos parameters to read LDR and regulate blue LED\relax }}{123}% \addvspace {10\p@ } -\contentsline {table}{\numberline {7.1}{\ignorespaces A numbering convention used in the DC motor breakout board\relax }}{137}% -\contentsline {table}{\numberline {7.2}{\ignorespaces Parameters for DC motor initialization\relax }}{137}% -\contentsline {table}{\numberline {7.3}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{141}% -\contentsline {table}{\numberline {7.4}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{142}% -\contentsline {table}{\numberline {7.5}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{144}% +\contentsline {table}{\numberline {7.1}{\ignorespaces Xcos parameters to turn on different LEDs depending on the potentiometer value\relax }}{138}% \addvspace {10\p@ } -\contentsline {table}{\numberline {8.1}{\ignorespaces Xcos parameters to turn on different LEDs depending on the potentiometer value\relax }}{160}% +\contentsline {table}{\numberline {8.1}{\ignorespaces Xcos parameters to read thermistor\relax }}{154}% +\contentsline {table}{\numberline {8.2}{\ignorespaces Xcos parameters to read thermistor and switch the buzzer\relax }}{156}% \addvspace {10\p@ } -\contentsline {table}{\numberline {9.1}{\ignorespaces Xcos parameters to read thermistor\relax }}{176}% -\contentsline {table}{\numberline {9.2}{\ignorespaces Xcos parameters to read thermistor and switch the buzzer\relax }}{178}% +\contentsline {table}{\numberline {9.1}{\ignorespaces A numbering convention used in the DC motor breakout board\relax }}{169}% +\contentsline {table}{\numberline {9.2}{\ignorespaces Parameters for DC motor initialization\relax }}{169}% +\contentsline {table}{\numberline {9.3}{\ignorespaces Xcos parameters to drive the DC motor for a specified time\relax }}{173}% +\contentsline {table}{\numberline {9.4}{\ignorespaces Xcos parameters to drive the DC motor in forward and reverse directions\relax }}{174}% +\contentsline {table}{\numberline {9.5}{\ignorespaces Xcos parameters to drive the DC motor in a loop\relax }}{176}% \addvspace {10\p@ } \contentsline {table}{\numberline {10.1}{\ignorespaces Connecting a typical servomotor to Arduino Uno\ board\relax }}{186}% \contentsline {table}{\numberline {10.2}{\ignorespaces Parameters to rotate the servomotor by $30^\circ $\relax }}{192}% diff --git a/floss-arduino.pdf b/floss-arduino.pdf Binary files differindex 0ed938c..a249f49 100644 --- a/floss-arduino.pdf +++ b/floss-arduino.pdf diff --git a/floss-arduino.pyd b/floss-arduino.pyd index a09de43..b13dd9b 100644 --- a/floss-arduino.pyd +++ b/floss-arduino.pyd @@ -12,14 +12,14 @@ \contentsline {section}{\numberline {6.{1}}Read and display the LDR values}{124}% \contentsline {section}{\numberline {6.{2}}Turning the blue LED on and off}{125}% \addvspace {10pt} -\contentsline {section}{\numberline {7.{1}}Rotating the DC motor}{145}% -\contentsline {section}{\numberline {7.{2}}Rotating the DC motor in both directions}{146}% -\contentsline {section}{\numberline {7.{3}}Rotating the DC motor in both directions in a loop}{146}% +\contentsline {section}{\numberline {7.{1}}Turning on LEDs depending on the potentiometer threshold}{139}% \addvspace {10pt} -\contentsline {section}{\numberline {8.{1}}Turning on LEDs depending on the potentiometer threshold}{161}% +\contentsline {section}{\numberline {8.{1}}Read and display the thermistor values}{157}% +\contentsline {section}{\numberline {8.{2}}Turning the buzzer on and off using thermistor values}{158}% \addvspace {10pt} -\contentsline {section}{\numberline {9.{1}}Read and display the thermistor values}{179}% -\contentsline {section}{\numberline {9.{2}}Turning the buzzer on and off using thermistor values}{180}% +\contentsline {section}{\numberline {9.{1}}Rotating the DC motor}{177}% +\contentsline {section}{\numberline {9.{2}}Rotating the DC motor in both directions}{178}% +\contentsline {section}{\numberline {9.{3}}Rotating the DC motor in both directions in a loop}{178}% \addvspace {10pt} \contentsline {section}{\numberline {10.{1}}Rotating the servomotor to a specified degree}{197}% \contentsline {section}{\numberline {10.{2}}Rotating the servomotor to a specified degree and reversing}{198}% diff --git a/floss-arduino.synctex.gz b/floss-arduino.synctex.gz Binary files differdeleted file mode 100644 index 356c3d2..0000000 --- a/floss-arduino.synctex.gz +++ /dev/null diff --git a/floss-arduino.tex b/floss-arduino.tex index 4d0c072..abebada 100644 --- a/floss-arduino.tex +++ b/floss-arduino.tex @@ -88,9 +88,9 @@ \newcommand{\chapref}[1]{Chapter~\ref{#1}} \newcommand{\secref}[1]{Sec.~\ref{#1}} \newcommand{\sciref}[1]{Scilab~Code~\ref{#1}} -\newcommand{\pyref}[1]{Python-Code-\ref{#1}} % added for python -\newcommand{\juliaref}[1]{Julia-Code-\ref{#1}} % added for julia -\newcommand{\OpenModelicaref}[1]{OpenModelica-Code-\ref{#1}} % added for OpenModelica +\newcommand{\pyref}[1]{Python~Code~\ref{#1}} % added for python +\newcommand{\juliaref}[1]{Julia~Code~\ref{#1}} % added for julia +\newcommand{\OpenModelicaref}[1]{OpenModelica~Code~\ref{#1}} % added for OpenModelica \newcommand{\ardref}[1]{Arduino~Code~\ref{#1}} \newcommand{\mypageref}[1]{Page~\pageref{#1}} \newcommand{\fnref}[1]{Footnote~\ref{#1}} @@ -140,9 +140,9 @@ \input{user-code/led/led.tex} \input{user-code/push/push.tex} \input{user-code/ldr/ldr.tex} -\input{user-code/dcmotor/dcmotor.tex} \input{user-code/pot/pot.tex} \input{user-code/thermistor/thermistor.tex} +\input{user-code/dcmotor/dcmotor.tex} \input{user-code/servo/servo.tex} \input{user-code/modbus/modbus.tex} %\input{texfiles/servo.tex} diff --git a/floss-arduino.thm b/floss-arduino.thm index 11ece59..eab2e3a 100644 --- a/floss-arduino.thm +++ b/floss-arduino.thm @@ -51,41 +51,41 @@ \contentsline {juliamass}{{Julia Code}{6.{2}}{}}{127}% \contentsline {OpenModelicamass}{{OpenModelica Code}{6.{1}}{}}{128}% \contentsline {OpenModelicamass}{{OpenModelica Code}{6.{2}}{}}{129}% -\contentsline {egmass}{{Exercise}{7.{1}}{}}{134}% -\contentsline {ardmass}{{Arduino Code}{7.{1}}{}}{135}% -\contentsline {ardmass}{{Arduino Code}{7.{2}}{}}{135}% -\contentsline {ardmass}{{Arduino Code}{7.{3}}{}}{135}% -\contentsline {egmass}{{Exercise}{7.{2}}{}}{138}% -\contentsline {codemass}{{Scilab Code}{7.{1}}{}}{139}% -\contentsline {codemass}{{Scilab Code}{7.{2}}{}}{139}% -\contentsline {codemass}{{Scilab Code}{7.{3}}{}}{139}% -\contentsline {egmass}{{Exercise}{7.{3}}{}}{141}% -\contentsline {pymass}{{Python Code}{7.{1}}{}}{145}% -\contentsline {pymass}{{Python Code}{7.{2}}{}}{146}% -\contentsline {pymass}{{Python Code}{7.{3}}{}}{146}% -\contentsline {juliamass}{{Julia Code}{7.{1}}{}}{148}% -\contentsline {juliamass}{{Julia Code}{7.{2}}{}}{149}% -\contentsline {juliamass}{{Julia Code}{7.{3}}{}}{149}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{7.{1}}{}}{150}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{7.{2}}{}}{150}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{7.{3}}{}}{151}% -\contentsline {ardmass}{{Arduino Code}{8.{1}}{}}{156}% -\contentsline {codemass}{{Scilab Code}{8.{1}}{}}{158}% -\contentsline {pymass}{{Python Code}{8.{1}}{}}{161}% -\contentsline {juliamass}{{Julia Code}{8.{1}}{}}{163}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{1}}{}}{164}% -\contentsline {egmass}{{Exercise}{9.{1}}{}}{171}% -\contentsline {ardmass}{{Arduino Code}{9.{1}}{}}{171}% -\contentsline {ardmass}{{Arduino Code}{9.{2}}{}}{172}% -\contentsline {egmass}{{Exercise}{9.{2}}{}}{173}% -\contentsline {codemass}{{Scilab Code}{9.{1}}{}}{174}% -\contentsline {codemass}{{Scilab Code}{9.{2}}{}}{174}% -\contentsline {pymass}{{Python Code}{9.{1}}{}}{179}% -\contentsline {pymass}{{Python Code}{9.{2}}{}}{180}% -\contentsline {juliamass}{{Julia Code}{9.{1}}{}}{181}% -\contentsline {juliamass}{{Julia Code}{9.{2}}{}}{182}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{1}}{}}{183}% -\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{2}}{}}{184}% +\contentsline {ardmass}{{Arduino Code}{7.{1}}{}}{134}% +\contentsline {codemass}{{Scilab Code}{7.{1}}{}}{136}% +\contentsline {pymass}{{Python Code}{7.{1}}{}}{139}% +\contentsline {juliamass}{{Julia Code}{7.{1}}{}}{141}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{7.{1}}{}}{142}% +\contentsline {egmass}{{Exercise}{8.{1}}{}}{149}% +\contentsline {ardmass}{{Arduino Code}{8.{1}}{}}{149}% +\contentsline {ardmass}{{Arduino Code}{8.{2}}{}}{150}% +\contentsline {egmass}{{Exercise}{8.{2}}{}}{151}% +\contentsline {codemass}{{Scilab Code}{8.{1}}{}}{152}% +\contentsline {codemass}{{Scilab Code}{8.{2}}{}}{152}% +\contentsline {pymass}{{Python Code}{8.{1}}{}}{157}% +\contentsline {pymass}{{Python Code}{8.{2}}{}}{158}% +\contentsline {juliamass}{{Julia Code}{8.{1}}{}}{159}% +\contentsline {juliamass}{{Julia Code}{8.{2}}{}}{160}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{1}}{}}{161}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{8.{2}}{}}{162}% +\contentsline {egmass}{{Exercise}{9.{1}}{}}{166}% +\contentsline {ardmass}{{Arduino Code}{9.{1}}{}}{167}% +\contentsline {ardmass}{{Arduino Code}{9.{2}}{}}{167}% +\contentsline {ardmass}{{Arduino Code}{9.{3}}{}}{167}% +\contentsline {egmass}{{Exercise}{9.{2}}{}}{170}% +\contentsline {codemass}{{Scilab Code}{9.{1}}{}}{171}% +\contentsline {codemass}{{Scilab Code}{9.{2}}{}}{171}% +\contentsline {codemass}{{Scilab Code}{9.{3}}{}}{171}% +\contentsline {egmass}{{Exercise}{9.{3}}{}}{173}% +\contentsline {pymass}{{Python Code}{9.{1}}{}}{177}% +\contentsline {pymass}{{Python Code}{9.{2}}{}}{178}% +\contentsline {pymass}{{Python Code}{9.{3}}{}}{178}% +\contentsline {juliamass}{{Julia Code}{9.{1}}{}}{180}% +\contentsline {juliamass}{{Julia Code}{9.{2}}{}}{181}% +\contentsline {juliamass}{{Julia Code}{9.{3}}{}}{181}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{1}}{}}{182}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{2}}{}}{182}% +\contentsline {OpenModelicamass}{{OpenModelica Code}{9.{3}}{}}{183}% \contentsline {egmass}{{Exercise}{10.{1}}{}}{187}% \contentsline {ardmass}{{Arduino Code}{10.{1}}{}}{187}% \contentsline {ardmass}{{Arduino Code}{10.{2}}{}}{188}% diff --git a/floss-arduino.toc b/floss-arduino.toc index 73e0a01..9056f4f 100644 --- a/floss-arduino.toc +++ b/floss-arduino.toc @@ -115,65 +115,65 @@ \contentsline {section}{\numberline {6.8}Interfacing the LDR through OpenModelica}{127}% \contentsline {subsection}{\numberline {6.8.1}Interfacing the LDR}{127}% \contentsline {subsection}{\numberline {6.8.2}OpenModelica Code}{128}% -\contentsline {chapter}{\numberline {7}Controlling a DC motor}{131}% +\contentsline {chapter}{\numberline {7}Interfacing a Potentiometer}{131}% \contentsline {section}{\numberline {7.1}Preliminaries}{131}% -\contentsline {section}{\numberline {7.2}Controlling the DC motor from Arduino}{133}% -\contentsline {subsection}{\numberline {7.2.1}Controlling the DC motor}{133}% -\contentsline {subsection}{\numberline {7.2.2}Arduino Code}{135}% -\contentsline {section}{\numberline {7.3}Controlling the DC motor from Scilab}{136}% -\contentsline {subsection}{\numberline {7.3.1}Initialization}{136}% -\contentsline {subsection}{\numberline {7.3.2}Rotation for a specified time}{137}% -\contentsline {subsection}{\numberline {7.3.3}Using the capabilities of Scilab}{138}% -\contentsline {subsection}{\numberline {7.3.4}Scilab Code}{139}% -\contentsline {section}{\numberline {7.4}Controlling the DC Motor from Xcos}{140}% -\contentsline {section}{\numberline {7.5}Controlling the DC Motor from Python}{143}% -\contentsline {subsection}{\numberline {7.5.1}Controlling the DC Motor}{143}% -\contentsline {subsection}{\numberline {7.5.2}Python Code}{145}% -\contentsline {section}{\numberline {7.6}Controlling the DC Motor from Julia}{148}% -\contentsline {subsection}{\numberline {7.6.1}Controlling the DC Motor}{148}% -\contentsline {subsection}{\numberline {7.6.2}Julia Code}{148}% -\contentsline {section}{\numberline {7.7}Controlling the DC Motor from OpenModelica}{149}% -\contentsline {subsection}{\numberline {7.7.1}Controlling the DC Motor}{149}% -\contentsline {subsection}{\numberline {7.7.2}OpenModelica Code}{150}% -\contentsline {chapter}{\numberline {8}Interfacing a Potentiometer}{153}% -\contentsline {section}{\numberline {8.1}Preliminaries}{153}% -\contentsline {section}{\numberline {8.2}Connecting a potentiometer with Arduino Uno\ using a breadboard}{154}% -\contentsline {section}{\numberline {8.3}Reading the potentiometer from the Arduino IDE}{155}% -\contentsline {subsection}{\numberline {8.3.1}Reading the potentiometer}{155}% -\contentsline {subsection}{\numberline {8.3.2}Arduino Code}{156}% -\contentsline {section}{\numberline {8.4}Reading the potentiometer from Scilab}{157}% -\contentsline {subsection}{\numberline {8.4.1}Reading the potentiometer}{157}% -\contentsline {subsection}{\numberline {8.4.2}Scilab Code}{158}% -\contentsline {section}{\numberline {8.5}Reading the potentiometer from Xcos}{158}% -\contentsline {paragraph}{Exercise:}{159}% -\contentsline {section}{\numberline {8.6}Reading the potentiometer from Python}{159}% -\contentsline {subsection}{\numberline {8.6.1}Reading the potentiometer}{159}% -\contentsline {subsection}{\numberline {8.6.2}Python Code}{161}% -\contentsline {section}{\numberline {8.7}Reading the potentiometer from Julia}{162}% -\contentsline {subsection}{\numberline {8.7.1}Reading the potentiometer}{162}% -\contentsline {subsection}{\numberline {8.7.2}Julia Code}{163}% -\contentsline {section}{\numberline {8.8}Reading the potentiometer from OpenModelica}{163}% -\contentsline {subsection}{\numberline {8.8.1}Reading the potentiometer}{163}% -\contentsline {subsection}{\numberline {8.8.2}OpenModelica Code}{164}% -\contentsline {chapter}{\numberline {9}Interfacing a Thermistor}{167}% -\contentsline {section}{\numberline {9.1}Preliminaries}{167}% -\contentsline {section}{\numberline {9.2}Connecting a thermistor with Arduino Uno\ using a breadboard}{168}% -\contentsline {section}{\numberline {9.3}Interfacing the Thermistor from the Arduino IDE}{170}% -\contentsline {subsection}{\numberline {9.3.1}Interfacing the Thermistor}{170}% -\contentsline {subsection}{\numberline {9.3.2}Arduino Code}{171}% -\contentsline {section}{\numberline {9.4}Interfacing the Thermistor from Scilab}{172}% -\contentsline {subsection}{\numberline {9.4.1}Interfacing the Thermistor}{172}% -\contentsline {subsection}{\numberline {9.4.2}Scilab Code}{174}% -\contentsline {section}{\numberline {9.5}Interfacing the Thermistor from Xcos}{175}% -\contentsline {section}{\numberline {9.6}Interfacing the Thermistor from Python}{178}% -\contentsline {subsection}{\numberline {9.6.1}Interfacing the Thermistor}{178}% -\contentsline {subsection}{\numberline {9.6.2}Python Code}{179}% -\contentsline {section}{\numberline {9.7}Interfacing the Thermistor from Julia}{181}% -\contentsline {subsection}{\numberline {9.7.1}Interfacing the Thermistor}{181}% -\contentsline {subsection}{\numberline {9.7.2}Julia Code}{181}% -\contentsline {section}{\numberline {9.8}Interfacing the Thermistor from OpenModelica}{182}% -\contentsline {subsection}{\numberline {9.8.1}Interfacing the Thermistor}{182}% -\contentsline {subsection}{\numberline {9.8.2}OpenModelica Code}{183}% +\contentsline {section}{\numberline {7.2}Connecting a potentiometer with Arduino Uno\ using a breadboard}{132}% +\contentsline {section}{\numberline {7.3}Reading the potentiometer from the Arduino IDE}{133}% +\contentsline {subsection}{\numberline {7.3.1}Reading the potentiometer}{133}% +\contentsline {subsection}{\numberline {7.3.2}Arduino Code}{134}% +\contentsline {section}{\numberline {7.4}Reading the potentiometer from Scilab}{135}% +\contentsline {subsection}{\numberline {7.4.1}Reading the potentiometer}{135}% +\contentsline {subsection}{\numberline {7.4.2}Scilab Code}{136}% +\contentsline {section}{\numberline {7.5}Reading the potentiometer from Xcos}{136}% +\contentsline {paragraph}{Exercise:}{137}% +\contentsline {section}{\numberline {7.6}Reading the potentiometer from Python}{137}% +\contentsline {subsection}{\numberline {7.6.1}Reading the potentiometer}{137}% +\contentsline {subsection}{\numberline {7.6.2}Python Code}{139}% +\contentsline {section}{\numberline {7.7}Reading the potentiometer from Julia}{140}% +\contentsline {subsection}{\numberline {7.7.1}Reading the potentiometer}{140}% +\contentsline {subsection}{\numberline {7.7.2}Julia Code}{141}% +\contentsline {section}{\numberline {7.8}Reading the potentiometer from OpenModelica}{141}% +\contentsline {subsection}{\numberline {7.8.1}Reading the potentiometer}{141}% +\contentsline {subsection}{\numberline {7.8.2}OpenModelica Code}{142}% +\contentsline {chapter}{\numberline {8}Interfacing a Thermistor}{145}% +\contentsline {section}{\numberline {8.1}Preliminaries}{145}% +\contentsline {section}{\numberline {8.2}Connecting a thermistor with Arduino Uno\ using a breadboard}{146}% +\contentsline {section}{\numberline {8.3}Interfacing the Thermistor from the Arduino IDE}{148}% +\contentsline {subsection}{\numberline {8.3.1}Interfacing the Thermistor}{148}% +\contentsline {subsection}{\numberline {8.3.2}Arduino Code}{149}% +\contentsline {section}{\numberline {8.4}Interfacing the Thermistor from Scilab}{150}% +\contentsline {subsection}{\numberline {8.4.1}Interfacing the Thermistor}{150}% +\contentsline {subsection}{\numberline {8.4.2}Scilab Code}{152}% +\contentsline {section}{\numberline {8.5}Interfacing the Thermistor from Xcos}{153}% +\contentsline {section}{\numberline {8.6}Interfacing the Thermistor from Python}{156}% +\contentsline {subsection}{\numberline {8.6.1}Interfacing the Thermistor}{156}% +\contentsline {subsection}{\numberline {8.6.2}Python Code}{157}% +\contentsline {section}{\numberline {8.7}Interfacing the Thermistor from Julia}{159}% +\contentsline {subsection}{\numberline {8.7.1}Interfacing the Thermistor}{159}% +\contentsline {subsection}{\numberline {8.7.2}Julia Code}{159}% +\contentsline {section}{\numberline {8.8}Interfacing the Thermistor from OpenModelica}{160}% +\contentsline {subsection}{\numberline {8.8.1}Interfacing the Thermistor}{160}% +\contentsline {subsection}{\numberline {8.8.2}OpenModelica Code}{161}% +\contentsline {chapter}{\numberline {9}Controlling a DC motor}{163}% +\contentsline {section}{\numberline {9.1}Preliminaries}{163}% +\contentsline {section}{\numberline {9.2}Controlling the DC motor from Arduino}{165}% +\contentsline {subsection}{\numberline {9.2.1}Controlling the DC motor}{165}% +\contentsline {subsection}{\numberline {9.2.2}Arduino Code}{167}% +\contentsline {section}{\numberline {9.3}Controlling the DC motor from Scilab}{168}% +\contentsline {subsection}{\numberline {9.3.1}Initialization}{168}% +\contentsline {subsection}{\numberline {9.3.2}Rotation for a specified time}{169}% +\contentsline {subsection}{\numberline {9.3.3}Using the capabilities of Scilab}{170}% +\contentsline {subsection}{\numberline {9.3.4}Scilab Code}{171}% +\contentsline {section}{\numberline {9.4}Controlling the DC Motor from Xcos}{172}% +\contentsline {section}{\numberline {9.5}Controlling the DC Motor from Python}{175}% +\contentsline {subsection}{\numberline {9.5.1}Controlling the DC Motor}{175}% +\contentsline {subsection}{\numberline {9.5.2}Python Code}{177}% +\contentsline {section}{\numberline {9.6}Controlling the DC Motor from Julia}{180}% +\contentsline {subsection}{\numberline {9.6.1}Controlling the DC Motor}{180}% +\contentsline {subsection}{\numberline {9.6.2}Julia Code}{180}% +\contentsline {section}{\numberline {9.7}Controlling the DC Motor from OpenModelica}{181}% +\contentsline {subsection}{\numberline {9.7.1}Controlling the DC Motor}{181}% +\contentsline {subsection}{\numberline {9.7.2}OpenModelica Code}{182}% \contentsline {chapter}{\numberline {10}Interfacing a Servomotor}{185}% \contentsline {section}{\numberline {10.1}Preliminaries}{185}% \contentsline {section}{\numberline {10.2}Controlling the Servometer through the Arduino IDE}{186}% diff --git a/tools/julia/ArduinoTools.jl b/tools/julia/ArduinoTools.jl new file mode 100644 index 0000000..7137294 --- /dev/null +++ b/tools/julia/ArduinoTools.jl @@ -0,0 +1,189 @@ +module ArduinoTools + +using SerialPorts + + +function connectBoard(baudrate::Int64) # Automatically detects SerialPort and opens it + arr = list_serialports() # with given baudrate + port = arr[1] + ser = SerialPort(port,baudrate) # Caution: works in most cases... If doesn't, + sleep(2) # Use the openSerial() function + return ser +end + +# function openSerial(port::ASCIIString, baudrate::Int64) # starts serial communication +# ser = SerialPorts.SerialPort(port,baudrate) +# sleep(2) +# return ser +# end + +function closeSerial(ser::SerialPorts.SerialPort) # closes serial port + SerialPorts.close(ser) +end + +# function Write(ser::SerialPorts.SerialPort, str::ASCIIString) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +# function Write(ser::SerialPorts.SerialPort, str::UTF8String) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +function Read(ser::SerialPorts.SerialPort, bytes::Int64) # reads 'bytes' number of bytes from serial port + SerialPorts.read(ser,bytes) +end + +function ReadAvailable(ser::SerialPorts.SerialPort) # reads all available bytes from serial port + SerialPorts.readavailable(ser) +end + +function nbAvailable(ser::SerialPorts.SerialPort) # returns number of bytes available for reading + SerialPorts.nb_available(ser) +end + +function listSerialPorts() # returns array of serial port names on computer + SerialPorts.list_serialports() +end + +function pinMode(file_des::SerialPorts.SerialPort , pin_no::Int64 , mode::String) + # isascii(mode) && throw("Mode needs to be ascii") #This will throw an error if mode is not ascii + # m = uppercase(mode) # Prevent errors due to case differences + if mode == "INPUT" str = "Da"*string(Char(48+pin_no))*"0" end # Dan0 for INPUT + if mode == "OUTPUT" str = "Da"*string(Char(48+pin_no))*"1" end # Dan1 for OUTPUT + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 0 str = "Dw"*string(Char(48+pin_no))*"1" end # Dwn1 for HIGH + if val == 0 str = "Dw"*string(Char(48+pin_no))*"0" end # Dwn0 for LOW + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "Dr"*string(Char(48+pin_no)) # Drn to read digital pin n + str = ascii(str) # Convert UTF8String to ASCIIString + write(file_des,str) + sleep(0.01) # Delay the next step by 10 milliseconds + c = read(file_des,1) # Read one byte from SerialPort + n = parse(Int,c) # Convert the received string into integer + return n # Return the integer +end + +function analogWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 255 val = 255 end # Make sure val isn't beyond limits + if val < 0 val = 0 end + c = Char(val) # Conversion of val into character + d = string(c) # Converting character to string + s = "W"*string(Char(48+pin_no))*d # Wnm for analog value m on pin n + write(file_des,s) +end + +function analogRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "A"*string(Char(48+pin_no)) #"An" for analog value on pin n + write(file_des,str) + sleep(0.1) # Delay next step by 100 milliseconds + n = bytesavailable(file_des) # Get number of bytes in input buffer + s = read(file_des, n) # Read n bytes from SerialPort + iolit = IOBuffer(s) + num = read(iolit, Int16) + # num = reinterpret(Int16, s) + # println(sizeof(num)) + # println(num[1]) + # @printf("value = %d", Int(num)) + # close(iolit) + + # typeof(s) + # k = parse(Int,s) # Convert String to integer + return num # Return the integer +end + +function DCMotorSetup(file_des::SerialPorts.SerialPort, driver_type::Int64, motor_no::Int64, pin1::Int64, pin2::Int64) + println("Initializing motor") + if (driver_type == 1) # adafruit + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 2) # L298 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 3) # L293 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"0" + end + write(file_des,code_sent) + sleep(0.1) # sleep for a tenth of a second + s = readavailable(file_des) # read all available bytes from input buffer + if s == "OK" + println("Motor Setup Successful") + else + println("Motor Setup unsuccessful") + end +end # end function + +function DCMotorRun(file_des::SerialPorts.SerialPort, motor_no::Int64, speed::Int64) + sgn = sign(speed) # Checking sign of speed to set direction + if sgn >= 0 + direction = "1" + else + direction = "0" + end + speed = abs(speed) # Dropping the sign + if speed > 255 speed = 255 end # Make sure speed is not beyond limit + code_sent = "M"*string(motor_no)*direction*string(Char(speed)) + write(file_des,code_sent) +end # end function + +function DCMotorRelease(file_des::SerialPorts.SerialPort, motor_no::Int64) + code_sent = "M"*string(motor_no)*"1"*string(Char(0)) + write(file_des,code_sent) # Stops the motor first + sleep(0.1) # Delay of 0.1 second + code_sent = "M"*string(motor_no)*"r" + write(file_des,code_sent) # Releases the motor +end + +function ServoAttach(file_des::SerialPorts.SerialPort, servo_no::Int64) + println("Initializing servo") + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function ServoMove(file_des::SerialPorts.SerialPort, servo_no::Int64, val::Int64) + if val < 0 val = 0 end + if val >180 val = 180 end + pin = "Sw"*string(servo_no)*string(Char(val)) + write(file_des,pin) +end + +function ServoDetach(file_des::SerialPorts.SerialPort, servo_no::Int64) + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function MPUReadin(file_des::SerialPorts.SerialPort) + cmd = "F" + write(file_des,cmd) + analog_times = [] + sleep(0.03) + s = readavailable(file_des) + sarr = split(s,"/") + for i in 1:length(sarr) + push!(analog_times,parse(Int,sarr[i])) + end + return analog_times +end + +export connectBoard,openSerial,closeSerial,Write,Read,ReadAvailable,nbAvailable,listSerialPorts,pinMode,digiWrite,digiRead,analogWrite,analogRead,DCMotorSetup,DCMotorRun,DCMotorRelease,ServoAttach,ServoMove,ServoDetach,MPUReadin + +end # module diff --git a/tools/julia/test_firmware.jl b/tools/julia/test_firmware.jl new file mode 100644 index 0000000..1af3d76 --- /dev/null +++ b/tools/julia/test_firmware.jl @@ -0,0 +1,12 @@ +using SerialPorts
+include("ArduinoTools.jl")
+
+h = ArduinoTools.connectBoard(115200)
+
+for i = 1:3
+ write(h,"v")
+ s = read(h, 2)
+ println(s)
+end
+
+close(h)
diff --git a/tools/linux/help/en_US/master_help.xml b/tools/linux/help/en_US/master_help.xml deleted file mode 100644 index 8b16f9f..0000000 --- a/tools/linux/help/en_US/master_help.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE book [ -<!--Begin Entities--> -<!ENTITY a46ed7e3d4b1e37252a514eca6d7212dd SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/ANALOG_READ_SB.xml"> -<!ENTITY a36babd141e29ebb88b6c303405e5ad38 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/ANALOG_WRITE_SB.xml"> -<!ENTITY a4ec612e97ba53849378d4654eea3a7f4 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/ARDUINO_SETUP.xml"> -<!ENTITY a5309e3975e59e638876844b46810f067 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/DCMOTOR_SB.xml"> -<!ENTITY a2d59680e9d1f8b184604fb9cbc79c5ab SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/DIGITAL_READ_SB.xml"> -<!ENTITY a0de2a2fe2dcd659d5955c317903966d8 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/DIGITAL_WRITE_SB.xml"> -<!ENTITY a22e730a45a64d497dc30fc2c8cad1b39 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/ENCODER_SB.xml"> -<!ENTITY a881a8565166854469a8f8ca17b7232d5 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/INTERRUPT_SB.xml"> -<!ENTITY a2a5dfaa997d129a4f7618accbf6365a1 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/SERVO_WRITE_SB.xml"> -<!ENTITY a36cf16195073d4661eadcf5e27ebc69c SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/TIME_SAMPLE.xml"> -<!ENTITY a15169de94cf704c5363736ffa4a0a71c SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/close_serial.xml"> -<!ENTITY a06420e032a93d8c14b75952ad8424e3e SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_analog_in.xml"> -<!ENTITY a67908b24d8f50362c0bb7f85adc866f3 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_analog_in_volt.xml"> -<!ENTITY aa2a9ccdef330fddd88ba9b1ccff466e8 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_analog_out.xml"> -<!ENTITY a081c4712d303e006eb6df3cb34af9db2 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_analog_out_volt.xml"> -<!ENTITY accb193db0abb9fb96db8a0da5248f4e4 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_arduino_a_control.xml"> -<!ENTITY aea8bfc94400bca07ed23140f989e4631 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_arduino_d_control.xml"> -<!ENTITY ab3431985f6afeb52131c61a3f6dc910c SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_arduino_meter.xml"> -<!ENTITY a4f95e9a262a484a02abf5a0d702fdf53 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_dcmotor_release.xml"> -<!ENTITY a9bd456b2aee34d190f1fb9fc46722ab1 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_dcmotor_run.xml"> -<!ENTITY a6f3858474729d26105d4e721e8964f48 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_dcmotor_setup.xml"> -<!ENTITY ac0398bf2b02c2e6ef89e1c91c57a7ff4 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_digital_in.xml"> -<!ENTITY a91b4578860ac12a7ff19043d20c490a8 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_digital_out.xml"> -<!ENTITY a5d9dc9a5be680939d34309d12116de42 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_servo_attach.xml"> -<!ENTITY a7f89fa53bc7274aadc573b71bdb97961 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_servo_detach.xml"> -<!ENTITY af3c0af6313a1a665ced39188177d00f5 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/cmd_servo_move.xml"> -<!ENTITY afe8079e815c0118313d8399715881425 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/linux/help/en_US/open_serial.xml"> -<!--End Entities--> -]> -<book version="5.0-subset Scilab" xml:lang="en_US" - xmlns="http://docbook.org/ns/docbook" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:xi="http://www.w3.org/2001/XInclude" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns:mml="http://www.w3.org/1998/Math/MathML" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns:db="http://docbook.org/ns/docbook"> - <info xml:id='arduino_toolbox_manual'> - <title>Arduino toolbox</title> - </info> - -<part xml:id='section_b8a7072c46d32c1ee288fe3b9d921bcb'> -<title>Arduino toolbox</title> -&a46ed7e3d4b1e37252a514eca6d7212dd; -&a36babd141e29ebb88b6c303405e5ad38; -&a4ec612e97ba53849378d4654eea3a7f4; -&a5309e3975e59e638876844b46810f067; -&a2d59680e9d1f8b184604fb9cbc79c5ab; -&a0de2a2fe2dcd659d5955c317903966d8; -&a22e730a45a64d497dc30fc2c8cad1b39; -&a881a8565166854469a8f8ca17b7232d5; -&a2a5dfaa997d129a4f7618accbf6365a1; -&a36cf16195073d4661eadcf5e27ebc69c; -&a15169de94cf704c5363736ffa4a0a71c; -&a06420e032a93d8c14b75952ad8424e3e; -&a67908b24d8f50362c0bb7f85adc866f3; -&aa2a9ccdef330fddd88ba9b1ccff466e8; -&a081c4712d303e006eb6df3cb34af9db2; -&accb193db0abb9fb96db8a0da5248f4e4; -&aea8bfc94400bca07ed23140f989e4631; -&ab3431985f6afeb52131c61a3f6dc910c; -&a4f95e9a262a484a02abf5a0d702fdf53; -&a9bd456b2aee34d190f1fb9fc46722ab1; -&a6f3858474729d26105d4e721e8964f48; -&ac0398bf2b02c2e6ef89e1c91c57a7ff4; -&a91b4578860ac12a7ff19043d20c490a8; -&a5d9dc9a5be680939d34309d12116de42; -&a7f89fa53bc7274aadc573b71bdb97961; -&af3c0af6313a1a665ced39188177d00f5; -&afe8079e815c0118313d8399715881425; -</part> -</book> diff --git a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS Binary files differdeleted file mode 100644 index 1fe91ee..0000000 --- a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS +++ /dev/null diff --git a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB b/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB deleted file mode 100644 index 18e134e..0000000 --- a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB +++ /dev/null @@ -1 +0,0 @@ -eÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿuÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ÷_ÿÿÿÿÿÙÙÿÿý—ÿÿÿÿÿÿÿÌ%—ÿÿÿÿÿÿÿÿ÷_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ0ŸÿÿÿÿÿÿÿÿóIÿÿÿÿÿÿÿÿÿÿÿý×ÿÿÿÿÿö_Ùö_ÿÿÿÿÿÿý×ÿuÿuÿÿÿÿÿÿÿÍ'ÿýÕåÿ@Õ£2!Ñמ0“ ôeuÝ6_dß0µº2'¹“¶W_š0‡C™.0‡Aq|`\fdáqž¡qˆÂÒ0\oñ±|a±?óKóf/1‹ó<³‹Æ…Ëüòó†…/0³K9³ËÏ,òÆÆ…ÐeÅ¡‘!±!±qkF‹Æ¥«óƨHgèJ8³/ú£ÿŒ.¡K¦(Òªº0ºÿ»¼Âþ¿Ì/üÒÌ/üÂñbêª(⪺ªª¿ìÂÍÊÌ*0ªª0ª4ª¯þªªêªª¬Òÿ¯2©’ª©’ª™ÿÿ5‹êêª2(ʪªª©’¦/óKÿÿÿÿÿÿÿÿüßÿ/ÿÿÿÿÿÿÿÿÿÿÿóÿý€
\ No newline at end of file diff --git a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS b/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS Binary files differdeleted file mode 100644 index 0b0df57..0000000 --- a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS +++ /dev/null diff --git a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA b/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA deleted file mode 100644 index b8e3d48..0000000 --- a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA +++ /dev/null @@ -1,2 +0,0 @@ -JavaSearch 1.0 -TMAP bs=2048 rt=1 fl=-1 id1=660 id2=1 diff --git a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP Binary files differdeleted file mode 100644 index 27a1a7b..0000000 --- a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP +++ /dev/null diff --git a/tools/openmodelica/linux/Arduino.mo b/tools/openmodelica/linux/Arduino.mo new file mode 100644 index 0000000..5caf94a --- /dev/null +++ b/tools/openmodelica/linux/Arduino.mo @@ -0,0 +1,1775 @@ +package Arduino + extends Arduino.SerialCommunication.Icons.GenericICPackage; + + package SerialCommunication "Serial Communication Package for Arduino" + extends Arduino.SerialCommunication.Icons.FunctionLayerIcon; + import ModelicaReference.Operators; + + package Functions + extends Modelica.Icons.Package; + import Modelica; + + function open_serial "Command to initialize the serial port which is connected to Arduino" + extends Modelica.Icons.Function; + input Integer handle, port, baudrate; + output Integer OK; + + external OK = open_serial(handle, port, baudrate) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>open_serial</b>(handle,port,baudrate); +</pre></blockquote> +<h4>Description</h4> +<p> +Establishes a serial communication using port number \"port\".To connect to the Arduino board, check the port number from the device manager or check it from the Arduino software. +</p> +</html>")); + end open_serial; + + function read_serial "read characters from serial port" + extends Modelica.Icons.Function; + input Integer handle; + input Integer size; + output Integer r_OK; + protected + Integer buf[size + 1]; + //String buf; + + external r_OK = read_serial(handle, buf, size) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>read_serial</b>(handle,size); +</pre></blockquote> +<h4>Description</h4> +<p>The translation setting of openserial can come in the way, affecting the number of characters effectively read. If that is the case, omitting the parameter n might be a bad idea, as scilab can hang. This would happen if the input stream contains CR or LF characters which are filtered out: in such cases serialstatus counts them, but readserial does not see them and keeps wating (if the blocking mode of openserial was true) until the total number is received. +</p> +</html>")); + end read_serial; + + //algorithm + //Modelica.Utilities.Streams.print(String(buf)); + + function write_serial "write to the serial port" + extends Modelica.Icons.Function; + input Integer handle; + input String str; + input Integer size; + output Integer w_OK; + + external w_OK = write_serial(handle, str, size) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>write_serial</b>(handle,str,size); +</pre></blockquote> +<h4>Description</h4> +<p>No end of line character is appended to the string; the user might have to add it if the device being talked to requires it. The Tcl command puts -nonewline is used. In addition, the translation mode of openserial can come into way. +</p> +</html>")); + end write_serial; + + function close_serial "Command to close the serial port which is connected to Arduino" + extends Modelica.Icons.Function; + input Integer handle; + output Integer c_OK; + + external c_OK = close_serial(handle) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>close_serial</b>(handle); +</pre></blockquote> +<h4>Description</h4> +<p>Closes the port for serial communication specified by \"handle\".It is important to close the serial port after use, else the port would be busy and restart of Scilab might required to connect to it again. +</p> +</html>")); + end close_serial; + + function status_serial "get status of the serial port" + extends Modelica.Icons.Function; + input Integer handle; + output Integer stat_OK; + protected + Integer bytes[2]; + + external stat_OK = status_serial(handle, bytes) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>status_serial</b>(handle); +</pre></blockquote> +<h4>Description</h4> +<p>Provides status of serial communication channel specified by \"handle\".Get some information about the number of characters present in the input and output buffers of the serial port, and about the status lines (DTS, CTS, etc.).The translation setting of openserial can come in the way. If the input stream contains CR or LF characters which are filtered out, openserial counts them but readserial does not see them. +</p> +</html>")); + end status_serial; + + function cmd_digital_out "Command to sent out digital signal to a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no, val; + output Integer digital_w_OK; + + external digital_w_OK = cmd_digital_out(h, pin_no, val) annotation( + Library = "Digital"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>cmd_digital_out</b>(handle,pin_no,value); +</pre></blockquote> +<h4>Description</h4> +<p>The Arduino board has a set of logical ports (digital) that are used for writing or reading data from a component. +To map a UNO, ports 2-13 are available (0 and 1 are used for serial transmission). For MEGA board, ports 2-53 are available. The port takes the low logic level (0) or logic high (1) which corresponds to the reference voltage. +</p> +</html>")); + end cmd_digital_out; + + function cmd_digital_in "Command to read in digital signal from a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no; + output Integer digital_in; + + external digital_in = cmd_digital_in(h, pin_no) annotation( + Library = "Digital"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>cmd_digital_in</b>(handle,pin_no); +</pre></blockquote> +<h4>Description</h4> +<p>The Arduino board has a set of logical ports (digital) that are used for writing or reading data from a component. +To map a UNO, ports 2-13 are available (0 and 1 are used for serial transmission). For MEGA board, ports 2-53 are available. The port takes the low logic level (0) or logic high (1) which corresponds to the reference voltage. +</p> +</html>")); + end cmd_digital_in; + + function delay "Provides delay.Suspends Openmodelica." + extends Modelica.Icons.Function; + input Integer t; + + external delay(t) annotation( + Library = "delay"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>delay</b>(milliseconds); + </pre></blockquote> + <h4>Description</h4> + <p>Delay process for specified number of miliseconds specified by the argument. The actual suspension time may be longer because of other activities in the system, or because of the time spent in processing the call. + </p> + </html>")); + end delay; + + function cmd_analog_in "Command to read in analog signal from a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no; + output Integer val; + + external val = cmd_analog_in(h, pin_no) annotation( + Library = "Analog"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>cmd_analog_in</b>(handle,pin_no); +</pre></blockquote> +<h4>Description</h4> +<p>Arduino UNO board has 6 analog input ports (A0 to A5), the Arduino Mega board has 16 analog input ports (A0 to A15). The 10 bits channels convert the analog input from 0 to 5 volts, to a digital value between 0 and 1023. +</p> +</html>")); + end cmd_analog_in; + + function cmd_analog_out "Command to sent out analog signal to a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no; + input Real val; + output Integer analog_w_OK; + + external analog_w_OK = cmd_analog_out(h, pin_no, val) annotation( + Library = "Analog"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>cmd_analog_out</b>(handle,pin_no,val); +</pre></blockquote> +<h4>Description</h4> +<p>The analog outputs of the Arduino Uno is available at the pins 3,5,6,9,10 and 11, while on the Mega board, the outputs are on pins 1-13 and 44-46. It is a bit misleading to use the term 'analog output', because in order to generate this output while minimizing energy losses, the Arduino uses PWM (Pulse Width Modulation) available on these ports. By varying the duty cycle of the PWM is altered the average voltage across the component connected to this port, which has the effect of having a analog output voltage. +The input port accepts the value from 0 to 255 which is correspoding to the duty cycle of 0 to 100%. In other words, sending 0 to the block will generate 0 V output at the port, 127 generates 2.5V and 255 generates 5V. (the port is 8 bits, so the resolutions of output would be 2^8 =256). +</p> +</html>")); + end cmd_analog_out; + + function cmd_analog_in_volt "Command to read in analog signal from a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no; + output Integer val; + + external val = cmd_analog_in_volt(h, pin_no) annotation( + Library = "Analogv"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_analog_in_volt</b>(handle,pin_no); + </pre></blockquote> + <h4>Description</h4> + <p>Arduino UNO board has 6 analog input ports (A0 to A5), the Arduino Mega board has 16 analog input ports (A0 to A15). The 10 bits channels convert the analog input from 0 to 5 volts, to a digital value between 0 and 1023. This function scale the reading to 0-5 so the user could get the measured voltage directly. + </p> + </html>")); + end cmd_analog_in_volt; + + function cmd_analog_out_volt "Command to sent out analog signal to a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no; + input Real val; + output Integer analog_v_wOK; + + external analog_v_wOK = cmd_analog_out_volt(h, pin_no, val) annotation( + Library = "Analogv"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_analog_out_volt</b>(handle,pin_no,val); + </pre></blockquote> + <h4>Description</h4> + <p>The analog outputs of the Arduino Uno is available at the pins 3,5,6,9,10 and 11, while on the Mega board, the outputs are on pins 1-13 and 44-46. It is a bit misleading to use the term 'analog output', because in order to generate this output while minimizing energy losses, the Arduino uses PWM (Pulse Width Modulation) available on these ports. By varying the duty cycle of the PWM is altered the average voltage across the component connected to this port, which has the effect of having a analog output voltage. + </p> + </html>")); + end cmd_analog_out_volt; + + function cmd_dcmotor_setup "Command to setup pins to control DC motor" + extends Modelica.Icons.Function; + input Integer handle, driver_type, motor_no, pin1, pin2; + + external cmd_dcmotor_setup(handle, driver_type, motor_no, pin1, pin2) annotation( + Library = "DCMotor"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_dcmotor_setup</b>(handle,driver_type,motor_no,pin_no1,pin_no2); + </pre></blockquote> + <h4>Description</h4> + <p>Arduino board does not deliver enough power, so it is necessary to use a H-bridge circuit/IC to control the motor. There are several types of H-bridge IC that do not all operate on the same principle. For example, the L298 requires the use of a PWM signal with current sense. The L293 uses two PWM to set the speed and direction. Ready-to-use Shields are also available. + Remember that the PWM is 8-bit (0 to 255). The input of the block could accept any value, but it would saturate at +- 255. + </p> + </html>")); + end cmd_dcmotor_setup; + + function cmd_dcmotor_run "Command to run DC motor after setting up" + extends Modelica.Icons.Function; + input Integer handle, motor_no, val; + + external cmd_dcmotor_run(handle, motor_no, val) annotation( + Library = "DCMotor"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_dcmotor_run</b>(handle,motor_no,value); + </pre></blockquote> + <h4>Description</h4> + <p>Arduino board does not deliver enough power, so it is necessary to use a H-bridge circuit/IC to control the motor. There are several types of H-bridge IC that do not all operate on the same principle. For example, the L298 requires the use of a PWM signal with current sense. The L293 uses two PWM to set the speed and direction. Ready-to-use Shields are also available. + Remember that the PWM is 8-bit (0 to 255). The input of the block could accept any value, but it would saturate at +- 255. + </p> + </html>")); + end cmd_dcmotor_run; + + function cmd_dcmotor_release "Command to release pins which have setup for DC motor" + extends Modelica.Icons.Function; + input Integer handle, motor_no; + + external cmd_dcmotor_release(handle, motor_no) annotation( + Library = "DCMotor"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_dcmotor_release</b>(handle,motor_no); + </pre></blockquote> + <h4>Description</h4> + <p>Arduino board does not deliver enough power, so it is necessary to use a H-bridge circuit/IC to control the motor. There are several types of H-bridge IC that do not all operate on the same principle. For example, the L298 requires the use of a PWM signal with current sense. The L293 uses two PWM to set the speed and direction. Ready-to-use Shields are also available. + Remember that the PWM is 8-bit (0 to 255). The input of the block could accept any value, but it would saturate at +- 255. + </p> + </html>")); + end cmd_dcmotor_release; + + function cmd_servo_attach "Command to attach servo motor to Arduino" + extends Modelica.Icons.Function; + input Integer handle, servo_no; + + external cmd_servo_attach(handle, servo_no) annotation( + Library = "ServoMotor"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_servo_attach</b>(handle,servo_no); + </pre></blockquote> + <h4>Description</h4> + <p>A servomotor is an rotary actuator consist of an electric motor, gears, a potentiometer and an analogue or digital electronics for control. The servomotor usualy used for a position control application (or speed for continuous rotation servos). + The user must give the command of the position setpoint or desired speed. This command is sent to the actuator in pulses spaced by 10 to 20 ms. The coding of these pulses is made such that a pulse of 1.5 ms corresponding to the centered position (rest), a pulse of 1 ms corresponds to an angle of 90° in the anticlockwise direction, and a pulse 2 ms corresponds to an angle of 90° clockwise. All other pulse widths give intermediate values​​. + A servomotor for continuous rotation, the pulse width control the rotational speed and the direction. It is recommended to use a voltage regulator to power the servomotor instead of using the Arduino board power. For simplicity, the function takes an input commnad in degrees from 0 to 180. Two actuators can be controlled with this toolbox. (modified version of 3 motors available) + </p> + </html>")); + end cmd_servo_attach; + + function cmd_servo_move "Command to run servo motor which has been setup" + extends Modelica.Icons.Function; + input Integer handle, servo_no, val; + + external cmd_servo_move(handle, servo_no, val) annotation( + Library = "ServoMotor"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_servo_move</b>(handle,servo_no,value); + </pre></blockquote> + <h4>Description</h4> + <p>A servomotor is an rotary actuator consist of an electric motor, gears, a potentiometer and an analogue or digital electronics for control. The servomotor usualy used for a position control application (or speed for continuous rotation servos). + The user must give the command of the position setpoint or desired speed. This command is sent to the actuator in pulses spaced by 10 to 20 ms. The coding of these pulses is made such that a pulse of 1.5 ms corresponding to the centered position (rest), a pulse of 1 ms corresponds to an angle of 90° in the anticlockwise direction, and a pulse 2 ms corresponds to an angle of 90° clockwise. All other pulse widths give intermediate values​​. + A servomotor for continuous rotation, the pulse width control the rotational speed and the direction. It is recommended to use a voltage regulator to power the servomotor instead of using the Arduino board power. For simplicity, the function takes an input commnad in degrees from 0 to 180. Two actuators can be controlled with this toolbox. (modified version of 3 motors available) + </p> + </html>")); + end cmd_servo_move; + + function cmd_servo_detach "Command to release the pin which has been setup for servo motor" + extends Modelica.Icons.Function; + input Integer handle, servo_no; + + external cmd_servo_attach(handle, servo_no) annotation( + Library = "ServoMotor"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_servo_detach</b>(handle,servo_no); + </pre></blockquote> + <h4>Description</h4> + <p>A servomotor is an rotary actuator consist of an electric motor, gears, a potentiometer and an analogue or digital electronics for control. The servomotor usualy used for a position control application (or speed for continuous rotation servos). + The user must give the command of the position setpoint or desired speed. This command is sent to the actuator in pulses spaced by 10 to 20 ms. The coding of these pulses is made such that a pulse of 1.5 ms corresponding to the centered position (rest), a pulse of 1 ms corresponds to an angle of 90° in the anticlockwise direction, and a pulse 2 ms corresponds to an angle of 90° clockwise. All other pulse widths give intermediate values​​. + A servomotor for continuous rotation, the pulse width control the rotational speed and the direction. It is recommended to use a voltage regulator to power the servomotor instead of using the Arduino board power. For simplicity, the function takes an input commnad in degrees from 0 to 180. Two actuators can be controlled with this toolbox. (modified version of 3 motors available) + </p> + </html>")); + end cmd_servo_detach; + + function ieeesingle2num "ieee-745 floating point converter" + extends Modelica.Icons.Function; + input String hexa; + output Real y; + + external y = ieeesingle2num(hexa) annotation( + Library = "ieeesingle2num"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>ieeesingle2num</b>(hexa); +</pre></blockquote> +<h4>Description</h4> +<p>Converts an hexadecimal integer to ieee single precision format + </p> +</html>")); + end ieeesingle2num; + + function math_floor "Floor function" + extends Modelica.Icons.Function; + input Real x; + output Integer y; + + external y = mfloor(x) annotation( + Library = "floor"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>math_floor</b>(x); + </pre></blockquote> + <h4>Description</h4> + <p>Returns the greatest integer less than or equal to x + </p> + </html>")); + end math_floor; + + function getArduinoVersion "Returns the Arduino version used" + extends Modelica.Icons.Function; + output String arduinoVersion(fixed = true); + algorithm + arduinoVersion := "1.1"; + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.<b>getArduinoVersion</b>(); + </pre></blockquote> + <h4>Description</h4> + <p>Gives the version of the arduino used. + </p> + </html>")); + end getArduinoVersion; + + function cmd_encoder_init "Initiates the encoder" + extends Modelica.Icons.Function; + input Integer h, encoder_mode, pin_no1, pin_no2; + + external cmd_encoder_init(h, encoder_mode, pin_no1, pin_no2) annotation( + Library = "Encoder"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.<b>cmd_encoder_init</b>(handle,encoder_mode,pin_no1,pin_no2); + </pre></blockquote> + <h4>Description</h4> + <p>Used to read encoder signal from one or more channels + </p> + </html>")); + end cmd_encoder_init; + + //Incomplete + + package MDD_Servo + extends Modelica.Icons.Package; + + class Init + extends ExternalObject; + + function constructor "Return device handle" + extends .Modelica.Icons.Function; + import Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions; + import Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types; + import sComm = Arduino.SerialCommunication.Functions; + import Arduino.SerialCommunication.Functions.MDD_Servo; + input sComm.Types.Servo_no servo_no; + output sComm.Functions.MDD_Servo.Init servo; + + external "C" servo = MDD_avr_servo_initialize(servo_no) annotation( + Include = "#include \"/home/manas/OpenModelica/Resources/Include/MDDAVRServo.h\""); + end constructor; + + function destructor "Destructor" + extends .Modelica.Icons.Function; + import Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types; + import sComm = Arduino.SerialCommunication.Functions; + import Arduino.SerialCommunication.Functions.MDD_Servo; + input sComm.Types.Servo_no servo_no "Device handle"; + + external "C" MDD_avr_servo_finalize(servo_no) annotation( + Include = "#include \"/home/manas/OpenModelica/Resources/Include/MDDAVRServo.h\""); + end destructor; + end Init; + + function Move + extends Modelica.Icons.Function; + import sComm = Arduino.SerialCommunication.Functions; + input sComm.Functions.MDD_Servo.Init servo; + input Integer value; + + external "C" MDD_avr_servo_move(servo, value) annotation( + Include = "#include \"/home/manas/OpenModelica/Resources/Include/MDDAVRServo.h\""); + end Move; + end MDD_Servo; + end Functions; + + package Examples + extends Modelica.Icons.ExamplesPackage; + + package led + extends Modelica.Icons.ExamplesPackage; + + model led_blue "Turn on Blue LED" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + sComm.delay(2000); + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn ON the blue LED"; + end if; + strm.print(String(time)); + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end led_blue; + + model led_blue_delay "Turn on Blue LED for a period of 2 seconds" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + sComm.delay(2000); + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn the blue LED"; + sComm.delay(2000) "let the blue LED be on for two seconds"; + digital_out := sComm.cmd_digital_out(1, 9, 0) "turn off blue LED"; + sComm.delay(2000) "let the blue LED be off for two seconds"; + end if; + strm.print(String(time)); + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end led_blue_delay; + + model led_blue_red "Turn on Red & Blue LED" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + sComm.delay(2000); + digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn the blue LED"; + digital_out := sComm.cmd_digital_out(1, 11, 1) "This will turn the red LED"; + sComm.delay(5000) "Delay for 5 seconds"; + digital_out := sComm.cmd_digital_out(1, 9, 0) "This turns off the blue Led"; + sComm.delay(3000) "Delay for 3 seconds"; + digital_out := sComm.cmd_digital_out(1, 11, 0) "This turns off the red Led"; + end if; + strm.print(String(time)); + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end led_blue_red; + + model led_green_blink "This will turn on and turn off the green LED for every second for 5 times" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + sComm.delay(1000); + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + for i in 1:10 loop + digital_out := sComm.cmd_digital_out(1, 10, 0) "This will turn off the green LED"; + sComm.delay(1000) "Delay for 1 second"; + digital_out := sComm.cmd_digital_out(1, 10, 1) "This turns the green Led"; + sComm.delay(1000) "Delay for 1 second"; + end for; + end if; + strm.print(String(time)); + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end led_green_blink; + end led; + + package push + extends Modelica.Icons.ExamplesPackage; + + model led_push_button "Conrolling LED with PushButton" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_in(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + digital_in := sComm.cmd_digital_in(1, 12) "Read from digital pin 12"; + if digital_in == 0 then + strm.print("LOW"); + digital_out := sComm.cmd_digital_out(1, 9, 0) "This will turn OFF the blue LED"; + sComm.delay(200); + else + strm.print("HIGH"); + digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn ON the blue LED"; + sComm.delay(200); + end if; + end if; +//for i in 1:1000 loop +//end for; +//strm.print(String(time)); + when terminal() then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-6, Interval = 0.01)); + end led_push_button; + + model push_button_status "Checking Status of PushButton" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_in(fixed = false); + // Integer digital_out(start = 0, fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + digital_in := sComm.cmd_digital_in(1, 12); + if digital_in == 0 then + strm.print("LOW"); + sComm.delay(200); + else + strm.print("HIGH"); + sComm.delay(200); + end if; + end if; +// digital_out := sComm.cmd_digital_out(1, 9, 0) "This will turn OFF the blue LED"; +// digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn ON the blue LED"; +//for i in 1:1000 loop +//end for; + when terminal() then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//sComm.cmd_arduino_meter(digital_in); + annotation( + experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-6, Interval = 0.01)); + end push_button_status; + end push; + + package ldr + extends Modelica.Icons.ExamplesPackage; + + model ldr_led "LED indicating light sensor readings" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer analog_in(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + sComm.delay(2000); + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + analog_in := sComm.cmd_analog_in(1, 5) "read analog pin 5 (ldr)"; + strm.print(String(analog_in)); + if analog_in < 300 then + digital_out := sComm.cmd_digital_out(1, 9, 1) "Turn ON LED"; + else + digital_out := sComm.cmd_digital_out(1, 9, 0) "Turn OFF LED"; + end if; + sComm.delay(200); + end if; +//for i in 1:500 loop +//end for; +//strm.print(String(time)); + when terminal() then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//Run for 500 iterations +//Setting Threshold value of 300 + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 0.02)); + end ldr_led; + + model ldr_read "Reading light intensity using ldr" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer analog_in(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + sComm.delay(2000); + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + analog_in := sComm.cmd_analog_in(1, 5) "read analog pin 5 (ldr)"; + strm.print("LDR Readings at time " + String(time) + " : " + String(analog_in)); + sComm.delay(500); + end if; +//for i in 1:10 loop +//end for; + when terminal() then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//Run for 10 iterations + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 1)); + end ldr_read; + end ldr; + + package pot + extends Modelica.Icons.ExamplesPackage; + + model pot_threshold + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer analog_in(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + sComm.delay(1000); + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + analog_in := sComm.cmd_analog_in(1, 2) "read analog pin 2"; + strm.print("Potentiometer Readings:" + String(analog_in)); + if analog_in >= 0 and analog_in < 320 then + digital_out := sComm.cmd_digital_out(1, 11, 1) "Turn ON LED"; + sComm.delay(1000); + digital_out := sComm.cmd_digital_out(1, 11, 0) "Turn OFF LED"; + elseif analog_in >= 320 and analog_in <= 900 then + digital_out := sComm.cmd_digital_out(1, 10, 1) "Turn ON LED"; + sComm.delay(1000); + digital_out := sComm.cmd_digital_out(1, 10, 0) "Turn OFF LED"; + elseif analog_in > 900 and analog_in <= 1023 then + digital_out := sComm.cmd_digital_out(1, 9, 1) "Turn ON LED"; + sComm.delay(1000); + digital_out := sComm.cmd_digital_out(1, 9, 0) "Turn OFF LED"; + end if; + end if; +//for i in 1:10 loop +//end for; + when terminal() then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//Run for 10 iterations +//Threshold 1 +//Threshold 2 + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 0.01)); + end pot_threshold; + end pot; + + package thermistor + extends Modelica.Icons.ExamplesPackage; + + model therm_buzzer "Sound buzzer depending on thermistor readings" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer analog_in(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + sComm.delay(2000); + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + analog_in := sComm.cmd_analog_in(1, 4) "read analog pin 4"; + if analog_in > 500 then + digital_out := sComm.cmd_digital_out(1, 3, 1) "Turn ON Buzzer"; + else + digital_out := sComm.cmd_digital_out(1, 3, 0) "Turn OFF Buzzer"; + end if; + sComm.delay(200); + end if; +//for i in 1:500 loop +//end for; +//Run for 500 iterations +//Setting Threshold value of 500 + when terminal() then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 0.02)); + end therm_buzzer; + + model therm_read "Thermistor Readings" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer analog_in(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + sComm.delay(2000); + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + analog_in := sComm.cmd_analog_in(1, 4) "read analog pin 5 (ldr)"; + strm.print("Thermistor Readings " + " : " + String(analog_in)); + sComm.delay(500); + end if; +//for i in 1:20 loop +//end for; + when terminal() then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//Run for 20 iterations + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 0.5)); + end therm_read; + end thermistor; + + package dcmotor + extends Modelica.Icons.ExamplesPackage; + + model dcmotor_clock "Rotate DC Motor clockwise" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "COM port is 0 and baud rate is 115200"; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + sComm.delay(2000); + sComm.cmd_dcmotor_setup(1, 3, 1, 9, 10) "Setup DC motor of type 3 (L293D), motor 1, pin 9 and 10"; + sComm.cmd_dcmotor_run(1, 1, 100) "Motor 1 runs at PWM 100"; + sComm.delay(3000) "This is allowed to continue for 3 seconds"; + sComm.cmd_dcmotor_release(1, 1) "Motor 1 is released"; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end dcmotor_clock; + + model dcmotor_both "Rotate DC Motor in both directions" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "COM port is 0 and baud rate is 115200"; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + sComm.delay(2000); + sComm.cmd_dcmotor_setup(1, 3, 1, 9, 10) "Setup DC motor of type 3 (L293D), motor 1, pin 9 and 10"; + sComm.cmd_dcmotor_run(1, 1, 255) "Motor 1 runs at PWM 100"; + sComm.delay(3000) "for 3 seconds"; + sComm.cmd_dcmotor_run(1, 1, -255) "Motor 1 runs at PWM -100 in reverse direction"; + sComm.delay(2000) "for 2 seconds"; + sComm.cmd_dcmotor_release(1, 1) "Motor 1 is released"; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end dcmotor_both; + + model dcmotor_loop "Rotate DC Motor in both directions in a loop" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "COM port is 0 and baud rate is 115200"; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + for i in 1:4 loop + sComm.cmd_dcmotor_setup(1, 3, 1, 9, 10) "Setup DC motor of type 3 (L293D), motor 1, pins 9 and 10"; + sComm.cmd_dcmotor_run(1, 1, 100) "Motor 1 runs at PWM 100"; + sComm.delay(2000) "for 3 seconds"; + sComm.cmd_dcmotor_run(1, 1, 0) "Halt the motor"; + sComm.delay(2000) "for 2 seconds"; + sComm.cmd_dcmotor_run(1, 1, -100) "Run it at PWM 100 in reverse direction"; + sComm.delay(2000) "for 2 seconds"; + sComm.cmd_dcmotor_release(1, 1) "Motor 1 is released"; + end for; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end dcmotor_loop; + end dcmotor; + + package servo + extends Modelica.Icons.ExamplesPackage; + + model servo_init "Rotate Servo Motor by 30 degrees.After the roataion reset it by 0" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "COM port is 0 and baud rate is 115200"; + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + sComm.delay(2000); + sComm.cmd_servo_attach(1, 1) "To attach the motor to pin 9 of servo1"; + sComm.cmd_servo_move(1, 1, 0) "tell servo to rotate by 30 degrees"; + sComm.delay(3000); + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 5, Tolerance = 1e-6, Interval = 5)); + end servo_init; + + model servo_loop "Rotate servo motor by 20 degrees 10 times" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + Integer angle(fixed = true); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "COM port is 0 and baud rate is 115200"; + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + sComm.delay(2000); + sComm.cmd_servo_attach(1, 1) "Attach motor to pin 9. 1 means pin 9."; + sComm.delay(2000); + angle := 20 "Angle by which it has to move"; + for i in 1:10 loop + sComm.cmd_servo_move(1, 1, angle * i) "tell servo to rotate by 20 degrees"; + sComm.delay(1000) "waits for a sec"; + end for; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//sComm.cmd_servo_detach(1, 1) "Detach the motor"; + annotation( + experiment(StartTime = 0, StopTime = 5, Tolerance = 1e-6, Interval = 5)); + end servo_loop; + + model servo_reverse + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "COM port is 0 and baud rate is 115200"; + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + sComm.delay(2000); + sComm.cmd_servo_attach(1, 1) "Attach the motor to pin 9. 1 means 9"; + sComm.cmd_servo_move(1, 1, 90) "Move the servo to 90 degree"; + sComm.delay(1000) "be there for one second"; + sComm.cmd_servo_move(1, 1, 45) "Move the servo to 45 degree"; + sComm.delay(1000) "be there for one second"; + sComm.delay(1000); + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//sComm.cmd_servo_detach(1, 1) "Detach the motor"; + annotation( + experiment(StartTime = 0, StopTime = 5, Tolerance = 1e-6, Interval = 5)); + end servo_reverse; + + model servo_pot "Control Servo Motor using Potentiometer" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + Integer analog_in(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 115200) "COM port is 0 and baud rate is 115200"; + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + sComm.delay(2000); + sComm.cmd_servo_attach(1, 1) "Attach the motor to pin 9"; + sComm.delay(2000); + for i in 1:5000 loop + analog_in := sComm.cmd_analog_in(1, 2) "Read potentiometer value"; + analog_in := sComm.math_floor(analog_in * (180 / 1023)) "Scale Potentiometer value to 0-180"; + sComm.cmd_servo_move(1, 1, analog_in) "Command the servo motor"; + sComm.delay(1000) "sleep for 500 milliseconds"; + strm.print("Potentiometer Reading at time" + String(time) + " : " + String(analog_in)); + end for; + end if; + sComm.cmd_servo_detach(1, 1) "Detach the motor"; + sComm.delay(5000); + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//5,000 itterations + annotation( + experiment(StartTime = 0, StopTime = 5, Tolerance = 1e-6, Interval = 5)); + end servo_pot; + end servo; + + package modbus + extends Modelica.Icons.ExamplesPackage; + + function read_voltage + extends Modelica.Icons.Function; + + external read_voltage() annotation( + Library = "Modbus"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Examples.modbus.<b>read_voltage</b>(); + </pre></blockquote> + <h4>Description</h4> + <p> + </p> + </html>")); + end read_voltage; + + function read_current + extends Modelica.Icons.Function; + + external read_voltage() annotation( + Library = "Modbus"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Examples.modbus.<b>read_current</b>(); + </pre></blockquote> + <h4>Description</h4> + <p> + </p> + </html>")); + end read_current; + + function read_val + extends Modelica.Icons.Function; + input Integer addr_byte; + output Real p; + + external p = read_val(addr_byte) annotation( + Library = "Modbus"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Examples.modbus.<b>read_val</b>(address_byte); + </pre></blockquote> + <h4>Description</h4> + <p> + </p> + </html>")); + end read_val; + + function read_active_power + extends Modelica.Icons.Function; + + external read_active_power() annotation( + Library = "Modbus"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Examples.modbus.<b>read_active_power</b>(); + </pre></blockquote> + <h4>Description</h4> + <p> + </p> + </html>")); + end read_active_power; + + model modbus_test + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import modbus = Arduino.SerialCommunication.Examples.modbus; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 0, 9600); + modbus.read_voltage(); + modbus.read_current(); + modbus.read_active_power(); + c_ok := sComm.close_serial(1); + end when; + end modbus_test; + end modbus; + end Examples; + + package MDD_Examples "Interfacing arduino with OpenModelica using Modelica Device Drivers" + extends Modelica.Icons.ExamplesPackage; + + package MDD_led + extends Modelica.Icons.ExamplesPackage; + + model MDD_led_blue "" + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-44, 66}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {39, 41}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {39, -21}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = true) annotation( + Placement(visible = true, transformation(origin = {-41, -21}, extent = {{-15, -17}, {15, 17}}, rotation = 0))); + equation + connect(booleanExpression1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{-24, -20}, {14, -20}, {14, -20}, {16, -20}}, color = {255, 0, 255})); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.MDD_Examples.MDD_led.<b>MDD-led_blue</b>(); + </pre></blockquote> + <h4>Description</h4> + <p> + </p> + </html>")); + end MDD_led_blue; + + model MDD_led_blue_delay + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {31, 41}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {41, -17}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = if time < 5 then true else false) annotation( + Placement(visible = true, transformation(origin = {-27, -16}, extent = {{-21, -16}, {21, 16}}, rotation = 0))); + equation + connect(booleanExpression1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{-4, -16}, {20, -16}}, color = {255, 0, 255})); + end MDD_led_blue_delay; + + model MDD_led_blink + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-45, 71}, extent = {{-23, -23}, {23, 23}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'5', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {42, -22}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {23, 71}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = mod(time, 2) >= 1) annotation( + Placement(visible = true, transformation(origin = {-24, -21}, extent = {{-16, -15}, {16, 15}}, rotation = 0))); + equation + connect(booleanExpression1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{-6, -21}, {16, -21}, {16, -22}, {18, -22}}, color = {255, 0, 255})); + end MDD_led_blink; + + model MDD_led_blue_red + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-47, 47}, extent = {{-21, -21}, {21, 21}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {38, -16}, extent = {{-16, -16}, {16, 16}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {40, 44}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean2(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'3', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {38, -62}, extent = {{-16, -16}, {16, 16}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = if time < 5 then true else false) annotation( + Placement(visible = true, transformation(origin = {-32, -16}, extent = {{-18, -14}, {18, 14}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression2(y = if time < 8 then true else false) annotation( + Placement(visible = true, transformation(origin = {-32, -62}, extent = {{-18, -16}, {18, 16}}, rotation = 0))); + equation + connect(digitalWriteBoolean2.u, booleanExpression2.y) annotation( + Line(points = {{18, -62}, {-12, -62}, {-12, -62}, {-12, -62}}, color = {255, 0, 255})); + connect(booleanExpression2.y, digitalWriteBoolean2.u) annotation( + Line(points = {{-12, -62}, {18, -62}, {18, -62}, {18, -62}}, color = {255, 0, 255})); + connect(booleanExpression1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{-12, -16}, {18, -16}, {18, -16}, {18, -16}}, color = {255, 0, 255})); + end MDD_led_blue_red; + + model MDD_led_green_blink + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'2', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {46, -30}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {39, 39}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = mod(time, 2) >= 1) annotation( + Placement(visible = true, transformation(origin = {-17, -30}, extent = {{-15, -14}, {15, 14}}, rotation = 0))); + equation + connect(booleanExpression1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{0, -30}, {24, -30}, {24, -30}, {24, -30}}, color = {255, 0, 255})); + end MDD_led_green_blink; + + model MDD_traffic_light "" + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega16) annotation( + Placement(visible = true, transformation(origin = {-44, 42}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1) annotation( + Placement(visible = true, transformation(origin = {39, 41}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'4', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.A) annotation( + Placement(visible = true, transformation(origin = {39, -21}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = true) annotation( + Placement(visible = true, transformation(origin = {-41, -21}, extent = {{-15, -17}, {15, 17}}, rotation = 0))); + equation + connect(booleanExpression1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{-24, -20}, {14, -20}, {14, -20}, {16, -20}}, color = {255, 0, 255})); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.MDD_Examples.MDD_led.<b>MDD-led_blue</b>(); + </pre></blockquote> + <h4>Description</h4> + <p> + </p> + </html>")); + end MDD_traffic_light; + end MDD_led; + + package MDD_push + extends Modelica.Icons.ExamplesPackage; + + model MDD_led_push_button + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-46, 62}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {39, 41}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalReadBoolean digitalReadBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'4', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {-44, -28}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {62, -28}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.LogicalSwitch logicalSwitch1 annotation( + Placement(visible = true, transformation(origin = {8, -28}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = true) annotation( + Placement(visible = true, transformation(origin = {-32, 18}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression2(y = false) annotation( + Placement(visible = true, transformation(origin = {-32, -70}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(booleanExpression2.y, logicalSwitch1.u3) annotation( + Line(points = {{-20, -70}, {-16, -70}, {-16, -36}, {-4, -36}, {-4, -36}}, color = {255, 0, 255})); + connect(booleanExpression1.y, logicalSwitch1.u1) annotation( + Line(points = {{-20, 18}, {-14, 18}, {-14, -20}, {-4, -20}, {-4, -20}}, color = {255, 0, 255})); + connect(logicalSwitch1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{20, -28}, {50, -28}, {50, -28}, {50, -28}}, color = {255, 0, 255})); + connect(digitalReadBoolean1.y, logicalSwitch1.u2) annotation( + Line(points = {{-32, -28}, {-4, -28}}, color = {255, 0, 255})); + end MDD_led_push_button; + + model MDD_push_button_status + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-43, 43}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {20, 42}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalReadBoolean digitalReadBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'4', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {-39, -19}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Interaction.Show.BooleanValue booleanValue1(use_activePort = true) annotation( + Placement(visible = true, transformation(origin = {31, -19}, extent = {{-15, -17}, {15, 17}}, rotation = 0))); + equation + connect(digitalReadBoolean1.y, booleanValue1.activePort) annotation( + Line(points = {{-18, -18}, {14, -18}, {14, -18}, {14, -18}}, color = {255, 0, 255})); + end MDD_push_button_status; + + model pushTest1 + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalReadBoolean digitalReadBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'4', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {-60, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {60, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.LogicalSwitch logicalSwitch1 annotation( + Placement(visible = true, transformation(origin = {-2, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1 annotation( + Placement(visible = true, transformation(origin = {-44, 62}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression2(y = true) annotation( + Placement(visible = true, transformation(origin = {-46, -58}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(logicalSwitch1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{10, -2}, {48, -2}, {48, -2}, {48, -2}}, color = {255, 0, 255})); + connect(digitalReadBoolean1.y, logicalSwitch1.u2) annotation( + Line(points = {{-48, -2}, {-14, -2}, {-14, -2}, {-14, -2}}, color = {255, 0, 255})); + connect(booleanExpression2.y, logicalSwitch1.u3) annotation( + Line(points = {{-34, -58}, {-24, -58}, {-24, -10}, {-14, -10}, {-14, -10}}, color = {255, 0, 255})); + connect(booleanExpression1.y, logicalSwitch1.u1) annotation( + Line(points = {{-32, 62}, {-28, 62}, {-28, 6}, {-14, 6}, {-14, 6}}, color = {255, 0, 255})); + annotation( + uses(Modelica_DeviceDrivers(version = "1.5.0"), Modelica(version = "3.2.2"))); + end pushTest1; + end MDD_push; + + package MDD_ldr + extends Modelica.Icons.ExamplesPackage; + + model MDD_ldr_led + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-45, 65}, extent = {{-21, -21}, {21, 21}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {38, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {79, -23}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = true) annotation( + Placement(visible = true, transformation(origin = {-60, 12}, extent = {{-14, -16}, {14, 16}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression2 annotation( + Placement(visible = true, transformation(origin = {-59, -79}, extent = {{-13, -17}, {13, 17}}, rotation = 0))); + Modelica.Blocks.Logical.LogicalSwitch logicalSwitch1 annotation( + Placement(visible = true, transformation(origin = {28, -22}, extent = {{-16, -16}, {16, 16}}, rotation = 0))); + Modelica.Blocks.Logical.GreaterThreshold greaterThreshold1(threshold = 600) annotation( + Placement(visible = true, transformation(origin = {-21, -23}, extent = {{-11, -11}, {11, 11}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A5, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 1024, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-72, -22}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + equation + connect(adc.y, greaterThreshold1.u) annotation( + Line(points = {{-50, -22}, {-34, -22}}, color = {0, 0, 127})); + connect(greaterThreshold1.y, logicalSwitch1.u2) annotation( + Line(points = {{-8, -22}, {8, -22}, {8, -22}, {8, -22}}, color = {255, 0, 255})); + connect(logicalSwitch1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{46, -22}, {58, -22}, {58, -22}, {58, -22}}, color = {255, 0, 255})); + connect(booleanExpression1.y, logicalSwitch1.u1) annotation( + Line(points = {{-44, 12}, {8, 12}, {8, -10}, {8, -10}}, color = {255, 0, 255})); + connect(booleanExpression2.y, logicalSwitch1.u3) annotation( + Line(points = {{-44, -78}, {6, -78}, {6, -34}, {8, -34}}, color = {255, 0, 255})); + end MDD_ldr_led; + + model MDD_ldr_read + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-37, 39}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {50, 38}, extent = {{-22, -22}, {22, 22}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A5, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 1024, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-39, -17}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica.Blocks.Interaction.Show.RealValue realValue1(use_numberPort = true) annotation( + Placement(visible = true, transformation(origin = {30, -17}, extent = {{-18, -17}, {18, 17}}, rotation = 0))); + equation + connect(adc.y, realValue1.numberPort) annotation( + Line(points = {{-20, -17}, {7, -17}}, color = {0, 0, 127})); + end MDD_ldr_read; + end MDD_ldr; + + package MDD_pot + extends Modelica.Icons.ExamplesPackage; + + model MDD_pot_threshold "" + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-79, 79}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {80, 80}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica.Blocks.Logical.Switch switch11 annotation( + Placement(visible = true, transformation(origin = {2, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.Switch switch12 annotation( + Placement(visible = true, transformation(origin = {10, -64}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.Greater greater1 annotation( + Placement(visible = true, transformation(origin = {42, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.Greater greater2 annotation( + Placement(visible = true, transformation(origin = {36, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {82, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean2(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'2', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {82, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean3(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'3', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {82, -64}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.GreaterEqualThreshold greaterEqualThreshold1(threshold = 0) annotation( + Placement(visible = true, transformation(origin = {-42, 44}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.GreaterEqualThreshold greaterEqualThreshold2(threshold = 320) annotation( + Placement(visible = true, transformation(origin = {-42, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.GreaterEqualThreshold greaterEqualThreshold3(threshold = 900) annotation( + Placement(visible = true, transformation(origin = {-40, -64}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.RealExpression realExpression1(y = 0) annotation( + Placement(visible = true, transformation(origin = {-40, -92}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.RealExpression realExpression2(y = 1) annotation( + Placement(visible = true, transformation(origin = {-44, 84}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.Switch switch1 annotation( + Placement(visible = true, transformation(origin = {0, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Math.RealToBoolean realToBoolean1(threshold = 0.5) annotation( + Placement(visible = true, transformation(origin = {44, -64}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A2, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 1024, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-88, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Interaction.Show.RealValue realValue1(significantDigits = 5, use_numberPort = true) annotation( + Placement(visible = true, transformation(origin = {-74, -84}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(adc.y, realValue1.numberPort) annotation( + Line(points = {{-76, 0}, {-74, 0}, {-74, -70}, {-94, -70}, {-94, -84}, {-86, -84}, {-86, -84}}, color = {0, 0, 127})); + connect(adc.y, greaterEqualThreshold1.u) annotation( + Line(points = {{-76, 0}, {-70, 0}, {-70, 46}, {-54, 46}}, color = {0, 0, 127})); + connect(greaterEqualThreshold1.y, switch1.u2) annotation( + Line(points = {{-31, 46}, {-24, 46}, {-24, 70}, {-12, 70}}, color = {255, 0, 255})); + connect(adc.y, greaterEqualThreshold3.u) annotation( + Line(points = {{-76, 0}, {-70, 0}, {-70, -64}, {-52, -64}, {-52, -64}}, color = {0, 0, 127})); + connect(adc.y, greaterEqualThreshold2.u) annotation( + Line(points = {{-76, 0}, {-54, 0}, {-54, 0}, {-54, 0}}, color = {0, 0, 127})); + connect(realToBoolean1.y, digitalWriteBoolean3.u) annotation( + Line(points = {{56, -64}, {70, -64}, {70, -64}, {70, -64}}, color = {255, 0, 255})); + connect(switch12.y, realToBoolean1.u) annotation( + Line(points = {{22, -64}, {32, -64}, {32, -64}, {32, -64}}, color = {0, 0, 127})); + connect(realExpression1.y, switch1.u3) annotation( + Line(points = {{-28, -92}, {-16, -92}, {-16, 62}, {-12, 62}, {-12, 62}}, color = {0, 0, 127})); + connect(realExpression2.y, switch1.u1) annotation( + Line(points = {{-32, 84}, {-20, 84}, {-20, 78}, {-12, 78}, {-12, 78}}, color = {0, 0, 127})); + connect(switch1.y, greater2.u1) annotation( + Line(points = {{12, 70}, {22, 70}, {22, 70}, {24, 70}}, color = {0, 0, 127})); + connect(greater1.y, digitalWriteBoolean2.u) annotation( + Line(points = {{54, 0}, {70, 0}}, color = {255, 0, 255})); + connect(switch11.y, greater2.u2) annotation( + Line(points = {{14, 0}, {18, 0}, {18, 62}, {24, 62}, {24, 62}}, color = {0, 0, 127})); + connect(switch11.y, greater1.u1) annotation( + Line(points = {{14, 0}, {30, 0}}, color = {0, 0, 127})); + connect(switch12.y, greater1.u2) annotation( + Line(points = {{22, -64}, {22, -64}, {22, -8}, {30, -8}, {30, -8}}, color = {0, 0, 127})); + connect(greaterEqualThreshold2.y, switch11.u2) annotation( + Line(points = {{-30, 0}, {-10, 0}, {-10, 0}, {-10, 0}}, color = {255, 0, 255})); + connect(greater2.y, digitalWriteBoolean1.u) annotation( + Line(points = {{48, 70}, {56, 70}, {56, 40}, {70, 40}, {70, 40}}, color = {255, 0, 255})); + connect(realExpression2.y, switch12.u1) annotation( + Line(points = {{-32, 84}, {-20, 84}, {-20, -56}, {-2, -56}, {-2, -56}}, color = {0, 0, 127})); + connect(realExpression2.y, switch11.u1) annotation( + Line(points = {{-32, 84}, {-20, 84}, {-20, 8}, {-10, 8}, {-10, 8}}, color = {0, 0, 127})); + connect(realExpression1.y, switch11.u3) annotation( + Line(points = {{-28, -92}, {-16, -92}, {-16, -8}, {-10, -8}, {-10, -8}}, color = {0, 0, 127})); + connect(realExpression1.y, switch12.u3) annotation( + Line(points = {{-28, -92}, {-16, -92}, {-16, -72}, {-2, -72}, {-2, -72}}, color = {0, 0, 127})); + connect(greaterEqualThreshold3.y, switch12.u2) annotation( + Line(points = {{-28, -64}, {-2, -64}, {-2, -64}, {-2, -64}}, color = {255, 0, 255})); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.MDD_Examples.MDD_pot.<b>MDD_pot_threshold</b>(); + </pre></blockquote> + <h4>Description</h4> + <p>Voltage reference used to represent 10 bit precision(1024) of ADC along with prescaling by by 128.Internal voltage reference is applied to adc. + </p> + </html>")); + end MDD_pot_threshold; + end MDD_pot; + + package MDD_thermistor + extends Modelica.Icons.ExamplesPackage; + + model MDD_therm_read + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {40, 42}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A4, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 1024, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-40, -20}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica.Blocks.Interaction.Show.RealValue realValue1(use_numberPort = true) annotation( + Placement(visible = true, transformation(origin = {39, -21}, extent = {{-15, -19}, {15, 19}}, rotation = 0))); + equation + connect(adc.y, realValue1.numberPort) annotation( + Line(points = {{-18, -20}, {20, -20}, {20, -20}, {22, -20}}, color = {0, 0, 127})); + end MDD_therm_read; + + model MDD_therm_buzzer + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-61, 61}, extent = {{-21, -21}, {21, 21}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A4, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 1024, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-68, 1.77636e-15}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {41, 61}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Interaction.Show.RealValue realValue1(use_numberPort = true) annotation( + Placement(visible = true, transformation(origin = {12, -56}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'3', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.D) annotation( + Placement(visible = true, transformation(origin = {78, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.LogicalSwitch logicalSwitch1 annotation( + Placement(visible = true, transformation(origin = {40, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = false) annotation( + Placement(visible = true, transformation(origin = {10, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression2(y = true) annotation( + Placement(visible = true, transformation(origin = {10, 32}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.GreaterEqualThreshold greaterEqualThreshold1(threshold = 550) annotation( + Placement(visible = true, transformation(origin = {-4, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(greaterEqualThreshold1.y, logicalSwitch1.u2) annotation( + Line(points = {{8, 0}, {28, 0}, {28, 0}, {28, 0}}, color = {255, 0, 255})); + connect(adc.y, greaterEqualThreshold1.u) annotation( + Line(points = {{-46, 0}, {-16, 0}, {-16, 0}, {-16, 0}}, color = {0, 0, 127})); + connect(adc.y, realValue1.numberPort) annotation( + Line(points = {{-46, 0}, {-32, 0}, {-32, -56}, {0, -56}}, color = {0, 0, 127})); + connect(logicalSwitch1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{52, 0}, {66, 0}, {66, 0}, {66, 0}}, color = {255, 0, 255})); + connect(booleanExpression2.y, logicalSwitch1.u1) annotation( + Line(points = {{22, 32}, {24, 32}, {24, 8}, {28, 8}, {28, 8}}, color = {255, 0, 255})); + connect(booleanExpression1.y, logicalSwitch1.u3) annotation( + Line(points = {{22, -32}, {24, -32}, {24, -8}, {28, -8}, {28, -8}}, color = {255, 0, 255})); + end MDD_therm_buzzer; + end MDD_thermistor; + + package MDD_dcmotor + extends Modelica.Icons.ExamplesPackage; + + model MDD_dcmotor_clock + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {39, 41}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.B}) annotation( + Placement(visible = true, transformation(origin = {51, -3}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = if time < 5 then 255 else 0) annotation( + Placement(visible = true, transformation(origin = {-40, -3}, extent = {{-16, -13}, {16, 13}}, rotation = 0))); + equation + connect(pwm.u[1], integerExpression1.y) annotation( + Line(points = {{28, -3}, {-22, -3}}, color = {255, 127, 0}, thickness = 0.5)); + end MDD_dcmotor_clock; + + model MDD_dcmotor_both + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {56, 60}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.A}) annotation( + Placement(visible = true, transformation(origin = {54, 1.77636e-15}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = if mod(time, 5) >= 2.5 then 100 else 0) annotation( + Placement(visible = true, transformation(origin = {-41, 3.55271e-15}, extent = {{-23, -20}, {23, 20}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression2(y = if mod(time, 5) < 2.5 then 100 else 0) annotation( + Placement(visible = true, transformation(origin = {-39, -48}, extent = {{-23, -20}, {23, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm1(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.B}) annotation( + Placement(visible = true, transformation(origin = {54, -48}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + equation + connect(integerExpression2.y, pwm1.u[1]) annotation( + Line(points = {{-14, -48}, {28, -48}, {28, -48}, {30, -48}}, color = {255, 127, 0})); + connect(integerExpression1.y, pwm.u[1]) annotation( + Line(points = {{-16, 0}, {28, 0}, {28, 0}, {30, 0}}, color = {255, 127, 0})); + end MDD_dcmotor_both; + + model MDD_dcmotor_loop + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 62}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {40, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.A}) annotation( + Placement(visible = true, transformation(origin = {44, 16}, extent = {{-16, -16}, {16, 16}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm1(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.B}) annotation( + Placement(visible = true, transformation(origin = {44, -30}, extent = {{-16, -16}, {16, 16}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = if mod(time, 6) < 3 then 255 else 0) annotation( + Placement(visible = true, transformation(origin = {-53, 16}, extent = {{-17, -16}, {17, 16}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression2(y = if mod(time, 6) > 3 then 255 else 0) annotation( + Placement(visible = true, transformation(origin = {-52, -30}, extent = {{-16, -14}, {16, 14}}, rotation = 0))); + equation + connect(integerExpression2.y, pwm1.u[1]) annotation( + Line(points = {{-34, -30}, {24, -30}}, color = {255, 127, 0})); + connect(integerExpression1.y, pwm.u[1]) annotation( + Line(points = {{-34, 16}, {24, 16}}, color = {255, 127, 0})); + end MDD_dcmotor_loop; + end MDD_dcmotor; + + package MDD_servo + extends Modelica.Icons.ExamplesPackage; + + model MDD_servo_init + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 58}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {59, 59}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.A}) annotation( + Placement(visible = true, transformation(origin = {44, -6}, extent = {{-28, -28}, {28, 28}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = 30) annotation( + Placement(visible = true, transformation(origin = {-57, -6}, extent = {{-23, -18}, {23, 18}}, rotation = 0))); + equation + connect(integerExpression1.y, pwm.u[1]) annotation( + Line(points = {{-32, -6}, {10, -6}}, color = {255, 127, 0})); + end MDD_servo_init; + + model MDD_servo_loop + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-41, 41}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {39, 41}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.A}) annotation( + Placement(visible = true, transformation(origin = {80, -8}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.MathInteger.TriggeredAdd triggeredAdd1(use_reset = false, use_set = false) annotation( + Placement(visible = true, transformation(origin = {10, -8}, extent = {{-6, -6}, {6, 6}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = 10) annotation( + Placement(visible = true, transformation(origin = {-34, -8}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = if mod(time, 0.2) > 0.1 then true else false) annotation( + Placement(visible = true, transformation(origin = {-22, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(booleanExpression1.y, triggeredAdd1.trigger) annotation( + Line(points = {{-10, -32}, {6, -32}, {6, -16}, {6, -16}}, color = {255, 0, 255})); + connect(integerExpression1.y, triggeredAdd1.u) annotation( + Line(points = {{-22, -8}, {2, -8}, {2, -8}, {2, -8}}, color = {255, 127, 0})); + connect(triggeredAdd1.y, pwm.u[1]) annotation( + Line(points = {{17, -8}, {68, -8}}, color = {255, 127, 0})); + end MDD_servo_loop; + + model MDD_servo_pot + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {39, 61}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A2, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 180, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-52, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.A}) annotation( + Placement(visible = true, transformation(origin = {48, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Math.RealToInteger realToInteger1 annotation( + Placement(visible = true, transformation(origin = {-6, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(adc.y, realToInteger1.u) annotation( + Line(points = {{-40, -10}, {-18, -10}, {-18, -10}, {-18, -10}, {-18, -10}}, color = {0, 0, 127})); + connect(realToInteger1.y, pwm.u[1]) annotation( + Line(points = {{6, -10}, {36, -10}, {36, -10}, {36, -10}}, color = {255, 127, 0})); + end MDD_servo_pot; + + model MDD_servo_reverse + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.01, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-59, 61}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {55, 61}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = if time < 0.2 then 22 else 15) annotation( + Placement(visible = true, transformation(origin = {-44, 0}, extent = {{-22, -22}, {22, 22}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.A}) annotation( + Placement(visible = true, transformation(origin = {44, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(integerExpression1.y, pwm.u[1]) annotation( + Line(points = {{-20, 0}, {32, 0}}, color = {255, 127, 0})); + end MDD_servo_reverse; + end MDD_servo; + + package MDD_modbus + extends Modelica.Icons.ExamplesPackage; + + model MDD_read_val + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-45, 67}, extent = {{-15, -15}, {15, 15}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {28, 68}, extent = {{-12, -12}, {12, 12}}, rotation = 0))); + Modelica.Blocks.MathInteger.MultiSwitch multiSwitch1(expr = {86, 88, 78}, nu = 3, use_pre_as_default = true, y_default = 0) annotation( + Placement(visible = true, transformation(origin = {-32.6577, -10}, extent = {{-10.0019, -22}, {30.0056, 22}}, rotation = 0))); + Modelica.Blocks.Interaction.Show.RealValue realValue1 annotation( + Placement(visible = true, transformation(origin = {60, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Blocks.Read_Val read_Val1 annotation( + Placement(visible = true, transformation(origin = {26, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(read_Val1.y, realValue1.numberPort) annotation( + Line(points = {{38, -10}, {48, -10}, {48, -10}, {48, -10}}, color = {0, 0, 127})); + connect(multiSwitch1.y, read_Val1.u) annotation( + Line(points = {{-2, -10}, {14, -10}, {14, -10}, {14, -10}}, color = {255, 127, 0})); + end MDD_read_val; + end MDD_modbus; + end MDD_Examples; + + package Blocks + extends Modelica.Icons.Package; + + model Read_Val + extends Modelica.Blocks.Interfaces.SISO; + import Modelica_DeviceDrivers.EmbeddedTargets.AVR; + import sComm = Arduino.SerialCommunication.Functions; + outer Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu; + annotation( + defaultComponentName = "Read_Val", + Icon(graphics = {Text(extent = {{-95, -95}, {95, 95}}, textString = "Read_Val", fontName = "Arial")})); + end Read_Val; + end Blocks; + + package Icons "Collection of icons used for library components" + extends Modelica.Icons.IconsPackage; + + partial package GenericICPackage "Icon with a generic IC" + annotation( + Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}), graphics = {Bitmap(extent = {{-95, -95}, {95, 95}}, fileName = "Resources/Images/Icons/tqfp32.png", rotation = 0)}), + Documentation(info = "<html> + <p> + This partial class is intended to design a <em>default icon for microcontrollers</em>. + </p> + </html>")); + end GenericICPackage; + + partial block GenericIC "Icon with a generic IC" + annotation( + Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}), graphics = {Bitmap(extent = {{-95, -95}, {95, 95}}, fileName = "Resources/Images/Icons/tqfp32.png", rotation = 0)}), + Documentation(info = "<html> + <p> + This partial class is intended to design a <em>default icon for microcontrollers</em>. + </p> + </html>")); + end GenericIC; + + partial package FunctionLayerIcon "Icon for packages that represent the function layer" + extends Modelica.Icons.Package; + annotation( + Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Text(lineColor = {128, 128, 128}, extent = {{-90, -90}, {90, 90}}, textString = "f"), Ellipse(lineColor = {128, 128, 128}, extent = {{-80, -80}, {80, 80}})}), + Documentation(info = "<html> + <p>This icon indicates Modelica functions.</p> + </html>")); + end FunctionLayerIcon; + annotation( + preferredView = "info", + Documentation(info = "<html> + <p> + A collection of basic icons to be used for different elements of the library. + </p> + </html>")); + end Icons; + annotation( + Documentation(info = "<html> +<h4>Description</h4> +<p> +A serial communication package for hardware interfacing. +</p> +</html>")); + end SerialCommunication; + annotation( + uses(Modelica_DeviceDrivers(version = "1.5.0"), Modelica(version = "3.2.2"))); +end Arduino;
\ No newline at end of file diff --git a/tools/openmodelica/linux/Instructions.txt b/tools/openmodelica/linux/Instructions.txt new file mode 100644 index 0000000..3c8a081 --- /dev/null +++ b/tools/openmodelica/linux/Instructions.txt @@ -0,0 +1,14 @@ +Compiling sources: +gcc -c -Wall -fPIC filename.c +gcc -shared -fPIC -o libfilename.so file1.o file2.o .... + +MDD: +Executing Blink example within MOdelica_DeviceDrivers EmbeddedTargets Package:- +Put the runMDDAvr.mos file in a (build) directory and execute following commands on the command line: + +omc --simCodeTarget=ExperimentalEmbeddedC runMDDAvr.mos + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections Blink_main.c -o Blink -I /path_to_MDD/Modelica_DeviceDrivers/Resources/Include -I /usr/include/omc/c + +avr-objcopy -O ihex -R .eeprom Blink Blink.hex +avrdude -F -V -c arduino -p ATMEGA328P -P /dev/ttyACM0 -b 115200 -U flash:w:Blink.hex diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both Binary files differnew file mode 100644 index 0000000..49bd982 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both.hex b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both.hex new file mode 100644 index 0000000..6092d32 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both.hex @@ -0,0 +1,121 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C942C0140
+:100020000C9451000C9451000C9451000C94FB0062
+:100030000C9451000C9451000C94CA000C94510083
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E4E5F7E002C0F3
+:1000800005900D92A831B107D9F711E0A8E1B1E0D0
+:1000900001C01D92AD31B107E1F70E94A4010C949B
+:1000A000A8030C940000CF92DF92EF92FF92CF93BF
+:1000B000DF93EC01C880D980EA80FB80C701B601DC
+:1000C0000E9479029B01AC01C701B6010E94D301D5
+:1000D0006B017C0120E030E040E05FE30E944103DF
+:1000E00087FD03C084E690E002C080E090E09D833D
+:1000F0008C8320E030E040E05FE3C701B6010E945E
+:10010000380287FF03C084E690E002C080E090E000
+:100110009F838E838E899F898230910561F0833021
+:10012000910599F00197C9F416BC80916E00826028
+:1001300080936E0016C0109285001092840080910A
+:100140006F00826080936F000CC01092B2008091AB
+:10015000700082608093700004C081E090E00E9493
+:10016000A80378949FB7F89480911A019FBF8823C1
+:10017000C9F310921A01EE85FF858C818083EA898C
+:10018000FB898E818083DF91CF91FF90EF90DF908C
+:10019000CF9008951F920F920FB60F9211242F93B4
+:1001A0003F938F939F93809118019091190101962D
+:1001B000909319018093180180911A01813091F078
+:1001C000209118013091190180911B0190911C011F
+:1001D0002817390738F081E080931A01109219012D
+:1001E000109218019F918F913F912F910F900FBE08
+:1001F0000F901F9018951F920F920FB60F92112417
+:100200002F933F938F939F938091180190911901A1
+:100210000196909319018093180180911A01813001
+:1002200091F0209118013091190180911B0190915A
+:100230001C012817390738F081E080931A011092C9
+:100240001901109218019F918F913F912F910F905A
+:100250000FBE0F901F9018951F920F920FB60F921E
+:1002600011242F933F938F939F9380911801909126
+:1002700019010196909319018093180180911A0138
+:10028000813091F0209118013091190180911B016A
+:1002900090911C012817390738F081E080931A01EA
+:1002A00010921901109218019F918F913F912F91F7
+:1002B0000F900FBE0F901F901895CF93DF93FC0106
+:1002C000C1E8D0E088818D60888322E030E0318B06
+:1002D000208B229A40E850E0DA018C9181628C9365
+:1002E0008AE890E0DC0111961C921E921C92938B7E
+:1002F000828B88818D60888335872487219ADA01F3
+:100300008C9181688C93A8E8B0E011961C921E92A3
+:100310001C92B787A68785B5836085BD81E090E094
+:10032000958B848B2AE030E030931C0120931B01D5
+:1003300024B5226024BD29EF27BD978B868B80E0F2
+:1003400090E0DF91CF910895CF92DF92EF92FF92EC
+:1003500080E091E00E945D01C12CD12C760160E02B
+:1003600070E0CB0160930001709301018093020162
+:100370009093030180E091E00E9453008FEFC81A30
+:10038000D80AE80AF80AC701B6010E943C022FE623
+:1003900032E143E05BE30E94450320E030E0A90145
+:1003A0000E94D401DFCF5058BB27AA270ED018C116
+:1003B00009D130F00ED120F031F49F3F11F41EF43A
+:1003C000FEC00EF4E095E7FBCBC0E92F1AD180F315
+:1003D000BA17620773078407950718F071F49EF542
+:1003E00049C10EF4E0950B2EBA2FA02D0B01B901D7
+:1003F00090010C01CA01A0011124FF27591B99F09B
+:10040000593F50F4503E68F11A16F040A22F232FA6
+:10041000342F4427585FF3CF469537952795A795F6
+:10042000F0405395C9F77EF41F16BA0B620B730B9D
+:10043000840BBAF09150A1F0FF0FBB1F661F771F0E
+:10044000881FC2F70EC0BA0F621F731F841F48F4C3
+:10045000879577956795B795F7959E3F08F0B3CF49
+:100460009395880F08F09927EE0F97958795089533
+:1004700053D008F481E00895E89409C097FB3EF456
+:1004800090958095709561957F4F8F4F9F4F9923E1
+:10049000A9F0F92F96E9BB279395F695879577955F
+:1004A0006795B795F111F8CFFAF4BB0F11F460FF1F
+:1004B0001BC06F5F7F4F8F4F9F4F16C0882311F077
+:1004C00096E911C0772321F09EE8872F762F05C08B
+:1004D000662371F096E8862F70E060E02AF09A9526
+:1004E000660F771F881FDAF7880F9695879597F91B
+:1004F0000895A9D080F09F3740F491110EF0BBC051
+:1005000060E070E080E89FEB089526F41B16611D03
+:10051000711D811D2BC045C0990F0008550FAA0BF6
+:10052000E0E8FEEF16161706E807F907C0F0121606
+:100530001306E407F50798F0621B730B840B950B09
+:1005400039F40A2661F0232B242B252B21F408955E
+:100550000A2609F4A140A6958FEF811D811D0895FB
+:1005600097F99F6780E870E060E00895882371F450
+:10057000772321F09850872B762F07C0662311F43C
+:1005800099270DC09051862B70E060E02AF09A9573
+:10059000660F771F881FDAF7880F9695879597F96A
+:1005A00008959F3F31F0915020F487957795679596
+:1005B000B795880F911D9695879597F908959FEFA8
+:1005C00080EC089500240A941616170618060906EA
+:1005D000089500240A9412161306140605060895B9
+:1005E000092E0394000C11F4882352F0BB0F40F441
+:1005F000BF2B11F460FF04C06F5F7F4F8F4F9F4F81
+:10060000089557FD9058440F551F59F05F3F71F002
+:100610004795880F97FB991F61F09F3F79F0879569
+:100620000895121613061406551FF2CF4695F1DFF2
+:1006300008C0161617061806991FF1CF8695710582
+:10064000610508940895E5DFA0F0BEE7B91788F4C6
+:10065000BB279F3860F41616B11D672F782F8827A7
+:10066000985FF7CF869577956795B11D93959639E5
+:10067000C8F30895E894BB2766277727CB0197F93D
+:1006800008954ADF08F48FEF08950BD0A9CF9ADFC1
+:1006900028F09FDF18F0952309F062CF90CF112446
+:1006A000EACFAFDFA0F3959FD1F3950F50E0551F30
+:1006B000629FF001729FBB27F00DB11D639FAA27B7
+:1006C000F00DB11DAA1F649F6627B00DA11D661F06
+:1006D000829F2227B00DA11D621F739FB00DA11D27
+:1006E000621F839FA00D611D221F749F3327A00DE1
+:1006F000611D231F849F600D211D822F762F6A2F7D
+:1007000011249F5750408AF0E1F088234AF0EE0F01
+:10071000FF1FBB1F661F771F881F91505040A9F70E
+:100720009E3F510570F01CCFA6CF5F3FECF3983E83
+:10073000DCF3869577956795B795F795E7959F5F75
+:10074000C1F7FE2B880F911D9695879597F908950F
+:04075000F894FFCF4B
+:1007540000000000000000000AD7233C0000000055
+:0807640000000000000000008D
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both.sh b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both.sh new file mode 100644 index 0000000..762735b --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_dcmotor_both.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_dcmotor_both.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections dcmotor_both_main.c -o dcmotor_both -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom dcmotor_both dcmotor_both.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:dcmotor_both.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both_main.c b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both_main.c new file mode 100644 index 0000000..dbf03a2 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_both_main.c @@ -0,0 +1,217 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct dcmotor_both_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct dcmotor_both_fmi2Component_s { + fmi2Real currentTime; + fmi2Integer fmi2IntegerVars[2]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[6]; +} dcmotor_both_fmi2Component; + +dcmotor_both_fmi2Component dcmotor_both_component = { + .fmi2IntegerVars = { + 0 /*pwm._u[1]*/, + 0 /*pwm1._u[1]*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value) +{ + MDD_avr_pwm_set(om_pwm, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted) +{ + void* om_pwm; + om_pwm = MDD_avr_pwm_init(om_timer, om_pin, om_initialValue, om_inverted); + return om_pwm; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm) +{ + MDD_avr_pwm_close(om_pwm); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component dcmotor_both_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &dcmotor_both_component; +} + +fmi2Status dcmotor_both_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status dcmotor_both_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[2] /* pwm1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[3] /* pwm1._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[2] /* pwm1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 2, 0, fmi2False); + comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 1, 0, fmi2False); + comp->extObjs[4] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[5] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[4] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + return fmi2OK; +} + +fmi2Status dcmotor_both_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status dcmotor_both_functionODE(fmi2Component comp) +{ +} + +static fmi2Status dcmotor_both_functionOutputs(fmi2Component comp) +{ + comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */ = ((om_mod(comp->currentTime,1.0))>=(0.5)) ? (100) : (0); /* equation 4 */ + comp->fmi2IntegerVars[1] /* pwm1._u[1] DISCRETE */ = ((om_mod(comp->currentTime,1.0))<(0.5)) ? (100) : (0); /* equation 5 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[5] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[3] /* pwm1._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, comp->fmi2IntegerVars[1] /* pwm1._u[1] DISCRETE */); +} + +fmi2Status dcmotor_both_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + dcmotor_both_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = dcmotor_both_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + dcmotor_both_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + dcmotor_both_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + dcmotor_both_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = dcmotor_both_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock Binary files differnew file mode 100644 index 0000000..0e58a0e --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock.hex b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock.hex new file mode 100644 index 0000000..f752eb8 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock.hex @@ -0,0 +1,101 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94E50088
+:100020000C9451000C9451000C9451000C94B400A9
+:100030000C9451000C9451000C9483000C945100CA
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0ECE1F6E002C0F0
+:1000800005900D92A231B107D9F711E0A2E1B1E0DC
+:1000900001C01D92A731B107E1F70E9445010C9400
+:1000A0000C030C9400008230910561F083309105BF
+:1000B00099F00197C9F416BC80916E00826080931C
+:1000C0006E0016C0109285001092840080916F001F
+:1000D000826080936F000CC01092B200809170001B
+:1000E00082608093700004C081E090E00E940C0365
+:1000F00078949FB7F894809114019FBF8823C9F327
+:100100001092140108951F920F920FB60F921124AE
+:100110002F933F938F939F9380911201909113019E
+:100120000196909313018093120180911401813004
+:1001300091F020911201309113018091150190915D
+:1001400016012817390738F081E0809314011092C6
+:100150001301109212019F918F913F912F910F9057
+:100160000FBE0F901F9018951F920F920FB60F920F
+:1001700011242F933F938F939F938091120190911D
+:100180001301019690931301809312018091140141
+:10019000813091F02091120130911301809115016D
+:1001A000909116012817390738F081E080931401E7
+:1001B00010921301109212019F918F913F912F91F4
+:1001C0000F900FBE0F901F9018951F920F920FB6B1
+:1001D0000F9211242F933F938F939F93809112013D
+:1001E00090911301019690931301809312018091D5
+:1001F0001401813091F0209112013091130180910E
+:100200001501909116012817390738F081E0809385
+:10021000140110921301109212019F918F913F913E
+:100220002F910F900FBE0F901F901895FC01A1E821
+:10023000B0E08C918D608C9382E090E09387828710
+:10024000229AA0E8B0E08C9181628C93AAE8B0E099
+:1002500011961C921E921C92B587A48785B5836067
+:1002600085BD81E090E0978786872AE030E0309373
+:1002700016012093150124B5226024BD29EF27BD66
+:10028000918B808B80E090E00895CF92DF92EF9287
+:10029000FF9280E091E00E941601C12CD12C7601E2
+:1002A00060E070E0CB0160930001709301018093E6
+:1002B00002019093030120E030E040E85FE30E94F8
+:1002C000F30187FF03C08FEF90E002C080E090E071
+:1002D0009093050180930401809110019091110188
+:1002E0000E945300E0910C01F0910D0180910401F6
+:1002F00080838FEFC81AD80AE80AF80AC701B60146
+:100300000E94F7012FE632E143E05BE30E94A9027D
+:1003100020E030E0A9010E948F01C5CF5058BB27D3
+:10032000AA270ED0DCC0CDD030F0D2D020F031F4EE
+:100330009F3F11F41EF4C2C00EF4E095E7FBB8C075
+:10034000E92FDED080F3BA17620773078407950799
+:1003500018F071F49EF5F6C00EF4E0950B2EBA2F4E
+:10036000A02D0B01B90190010C01CA01A0011124BB
+:10037000FF27591B99F0593F50F4503E68F11A1667
+:10038000F040A22F232F342F4427585FF3CF4695F8
+:1003900037952795A795F0405395C9F77EF41F161A
+:1003A000BA0B620B730B840BBAF09150A1F0FF0FE4
+:1003B000BB1F661F771F881FC2F70EC0BA0F621FD0
+:1003C000731F841F48F4879577956795B795F795C0
+:1003D0009E3F08F0B3CF9395880F08F09927EE0F52
+:1003E00097958795089540D008F481E00895E894A2
+:1003F00009C097FB3EF490958095709561957F4F6D
+:100400008F4F9F4F9923A9F0F92F96E9BB2793951A
+:10041000F695879577956795B795F111F8CFFAF42A
+:10042000BB0F11F460FF1BC06F5F7F4F8F4F9F4F5B
+:1004300016C0882311F096E911C0772321F09EE8B9
+:10044000872F762F05C0662371F096E8862F70E01F
+:1004500060E02AF09A95660F771F881FDAF7880FF9
+:100460009695879597F90895990F0008550FAA0B4F
+:10047000E0E8FEEF16161706E807F907C0F01216B7
+:100480001306E407F50798F0621B730B840B950BBA
+:1004900039F40A2661F0232B242B252B21F408950F
+:1004A0000A2609F4A140A6958FEF811D811D0895AC
+:1004B00097F99F6780E870E060E008959FEF80EC17
+:1004C000089500240A9416161706180609060895BA
+:1004D00000240A9412161306140605060895092E20
+:1004E0000394000C11F4882352F0BB0F40F4BF2B8F
+:1004F00011F460FF04C06F5F7F4F8F4F9F4F0895CF
+:1005000057FD9058440F551F59F05F3F71F04795C4
+:10051000880F97FB991F61F09F3F79F087950895A9
+:10052000121613061406551FF2CF4695F1DF08C0C8
+:10053000161617061806991FF1CF869571056105E5
+:1005400008940895E894BB2766277727CB0197F98D
+:1005500008950BD0C4CFB5DF28F0BADF18F095238B
+:1005600009F0A6CFABCF1124EECFCADFA0F3959F41
+:10057000D1F3950F50E0551F629FF001729FBB278A
+:10058000F00DB11D639FAA27F00DB11DAA1F649F36
+:100590006627B00DA11D661F829F2227B00DA11DE9
+:1005A000621F739FB00DA11D621F839FA00D611D6F
+:1005B000221F749F3327A00D611D231F849F600D90
+:1005C000211D822F762F6A2F11249F5750408AF0C9
+:1005D000E1F088234AF0EE0FFF1FBB1F661F771F55
+:1005E000881F91505040A9F79E3F510570F060CF91
+:1005F000AACF5F3FECF3983EDCF38695779567953D
+:10060000B795F795E7959F5FC1F7FE2B880F911D72
+:0C0610009695879597F90895F894FFCF10
+:10061C0000000000FF000AD7233C0000000000008F
+:02062C000000CC
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock.sh b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock.sh new file mode 100644 index 0000000..9ef5c4d --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_dcmotor_clock.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_dcmotor_clock.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections dcmotor_clock_main.c -o dcmotor_clock -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom dcmotor_clock dcmotor_clock.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:dcmotor_clock.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock_main.c b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock_main.c new file mode 100644 index 0000000..ae3eff7 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_clock_main.c @@ -0,0 +1,213 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct dcmotor_clock_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct dcmotor_clock_fmi2Component_s { + fmi2Real currentTime; + fmi2Integer fmi2IntegerVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[4]; +} dcmotor_clock_fmi2Component; + +dcmotor_clock_fmi2Component dcmotor_clock_component = { + .fmi2IntegerVars = { + 255 /*pwm._u[1]*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value) +{ + MDD_avr_pwm_set(om_pwm, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted) +{ + void* om_pwm; + om_pwm = MDD_avr_pwm_init(om_timer, om_pin, om_initialValue, om_inverted); + return om_pwm; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm) +{ + MDD_avr_pwm_close(om_pwm); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component dcmotor_clock_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &dcmotor_clock_component; +} + +fmi2Status dcmotor_clock_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status dcmotor_clock_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 2, 0, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + return fmi2OK; +} + +fmi2Status dcmotor_clock_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status dcmotor_clock_functionODE(fmi2Component comp) +{ +} + +static fmi2Status dcmotor_clock_functionOutputs(fmi2Component comp) +{ + comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */ = ((comp->currentTime)<(1.0)) ? (255) : (0); /* equation 3 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */); +} + +fmi2Status dcmotor_clock_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + dcmotor_clock_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = dcmotor_clock_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + dcmotor_clock_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + dcmotor_clock_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + dcmotor_clock_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = dcmotor_clock_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop Binary files differnew file mode 100644 index 0000000..36d8f3b --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop.hex b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop.hex new file mode 100644 index 0000000..119035b --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop.hex @@ -0,0 +1,135 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94380134
+:100020000C9451000C9451000C9451000C94070155
+:100030000C9451000C9451000C94D6000C94510077
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E8E3F8E002C0F0
+:1000800005900D92A831B107D9F711E0A8E1B1E0D0
+:1000900001C01D92AD31B107E1F70E94AE010C9491
+:1000A0001A040C940000CF92DF92EF92FF92CF934C
+:1000B000DF93EC01C880D980EA80FB8020E030E04B
+:1000C00040EC50E4C701B6010E9446020E94EB02D8
+:1000D00020E030E040EC50E40E94B7039B01AC010B
+:1000E000C701B6010E94DD016B017C0120E030E018
+:1000F00040E450E40E94420287FF03C08FEF90E08B
+:1001000002C080E090E09D838C8320E030E040E4FA
+:1001100050E4C701B6010E94B30318161CF48FEF18
+:1001200090E002C080E090E09F838E838E899F895B
+:100130008230910561F08330910599F00197C9F4FF
+:1001400016BC80916E00826080936E0016C0109283
+:1001500085001092840080916F00826080936F0010
+:100160000CC01092B2008091700082608093700089
+:1001700004C081E090E00E941A0478949FB7F8943C
+:1001800080911A019FBF8823C9F310921A01EE854E
+:10019000FF858C818083EA89FB898E818083DF9152
+:1001A000CF91FF90EF90DF90CF9008951F920F9224
+:1001B0000FB60F9211242F933F938F939F938091AB
+:1001C00018019091190101969093190180931801DB
+:1001D00080911A01813091F020911801309119011C
+:1001E00080911B0190911C012817390738F081E09C
+:1001F00080931A0110921901109218019F918F910A
+:100200003F912F910F900FBE0F901F9018951F9246
+:100210000F920FB60F9211242F933F938F939F93BA
+:100220008091180190911901019690931901809382
+:10023000180180911A01813091F0209118013091BC
+:10024000190180911B0190911C012817390738F082
+:1002500081E080931A0110921901109218019F9168
+:100260008F913F912F910F900FBE0F901F90189577
+:100270001F920F920FB60F9211242F933F938F93DB
+:100280009F93809118019091190101969093190103
+:100290008093180180911A01813091F0209118010A
+:1002A0003091190180911B0190911C012817390789
+:1002B00038F081E080931A01109219011092180110
+:1002C0009F918F913F912F910F900FBE0F901F9094
+:1002D0001895CF93DF93FC01C1E8D0E088818D6051
+:1002E000888382E090E0918B808B229A40E850E0F6
+:1002F000DA012C9121622C932AE830E0D901119681
+:100300001C921E921C92338B228B28812D60288395
+:1003100095878487219ADA012C9121682C93A8E88B
+:10032000B0E011961C921E921C92B787A68725B545
+:10033000236025BD21E030E0358B248B90931C0198
+:1003400080931B0184B5826084BD89EF87BD378BA4
+:10035000268B80E090E0DF91CF910895CF92DF92DD
+:10036000EF92FF9280E091E00E946901C12CD12CB4
+:10037000760160E070E0CB016093000170930101B1
+:10038000809302019093030180E091E00E9453006A
+:100390008FEFC81AD80AE80AF80AC701B6010E9406
+:1003A000AE022FE632E143E05BE30E94B70320E0B8
+:1003B00030E0A9010E94DE01DFCF5058BB27AA27F9
+:1003C0000ED080C171D130F076D120F031F49F3F52
+:1003D00011F41EF466C10EF4E095E7FB33C1E92F7A
+:1003E00082D180F3BA17620773078407950718F064
+:1003F00071F49EF5B1C10EF4E0950B2EBA2FA02D2D
+:100400000B01B90190010C01CA01A0011124FF27C1
+:10041000591B99F0593F50F4503E68F11A16F040BC
+:10042000A22F232F342F4427585FF3CF46953795BB
+:100430002795A795F0405395C9F77EF41F16BA0B80
+:10044000620B730B840BBAF09150A1F0FF0FBB1F2E
+:10045000661F771F881FC2F70EC0BA0F621F731F77
+:10046000841F48F4879577956795B795F7959E3FD4
+:1004700008F0B3CF9395880F08F09927EE0F979562
+:1004800087950895BBD008F481E008950CD01AC177
+:1004900012D140F009D130F021F45F3F19F0D2C001
+:1004A00051115BC1FEC01FD198F39923C9F35523A5
+:1004B000B1F3951B550BBB27AA2762177307840757
+:1004C00038F09F5F5F4F220F331F441FAA1FA9F30D
+:1004D00033D00E2E3AF0E0E830D091505040E695FF
+:1004E000001CCAF729D0FE2F27D0660F771F881F60
+:1004F000BB1F261737074807AB07B0E809F0BB0B4F
+:10050000802DBF01FF2793585F4F2AF09E3F510572
+:1005100068F098C022C15F3FECF3983EDCF386950B
+:1005200077956795B795F7959F5FC9F7880F911DE8
+:100530009695879597F90895E1E0660F771F881FD4
+:10054000BB1F621773078407BA0720F0621B730B87
+:10055000840BBA0BEE1F88F7E0950895E89409C064
+:1005600097FB3EF490958095709561957F4F8F4FE6
+:100570009F4F9923A9F0F92F96E9BB279395F695FC
+:10058000879577956795B795F111F8CFFAF4BB0F7A
+:1005900011F460FF1BC06F5F7F4F8F4F9F4F16C0DE
+:1005A000882311F096E911C0772321F09EE8872F68
+:1005B000762F05C0662371F096E8862F70E060E024
+:1005C0002AF09A95660F771F881FDAF7880F96959D
+:1005D000879597F90895A9D080F09F3740F491113D
+:1005E0000EF0BBC060E070E080E89FEB089526F459
+:1005F0001B16611D711D811D2BC045C0990F000880
+:10060000550FAA0BE0E8FEEF16161706E807F907E4
+:10061000C0F012161306E407F50798F0621B730B7F
+:10062000840B950B39F40A2661F0232B242B252B00
+:1006300021F408950A2609F4A140A6958FEF811DA3
+:10064000811D089597F99F6780E870E060E0089544
+:10065000882371F4772321F09850872B762F07C0D9
+:10066000662311F499270DC09051862B70E060E04D
+:100670002AF09A95660F771F881FDAF7880F9695EC
+:10068000879597F908959F3F31F0915020F4879511
+:1006900077956795B795880F911D9695879597F9EA
+:1006A00008959FEF80EC089500240A94161617060B
+:1006B00018060906089500240A9412161306140653
+:1006C00005060895092E0394000C11F4882352F0B6
+:1006D000BB0F40F4BF2B11F460FF04C06F5F7F4F6E
+:1006E0008F4F9F4F089557FD9058440F551F59F055
+:1006F0005F3F71F04795880F97FB991F61F09F3F0F
+:1007000079F087950895121613061406551FF2CF37
+:100710004695F1DF08C0161617061806991FF1CF87
+:1007200086957105610508940895E5DFA0F0BEE7A0
+:10073000B91788F4BB279F3860F41616B11D672FD0
+:10074000782F8827985FF7CF869577956795B11DA5
+:1007500093959639C8F30895E894BB2766277727C1
+:10076000CB0197F908954ADF08F48FEF08950BD075
+:10077000A9CF9ADF28F09FDF18F0952309F062CF08
+:1007800090CF1124EACFAFDFA0F3959FD1F3950F5F
+:1007900050E0551F629FF001729FBB27F00DB11D05
+:1007A000639FAA27F00DB11DAA1F649F6627B00D95
+:1007B000A11D661F829F2227B00DA11D621F739F7E
+:1007C000B00DA11D621F839FA00D611D221F749F8C
+:1007D0003327A00D611D231F849F600D211D822FD3
+:1007E000762F6A2F11249F5750408AF0E1F088231A
+:1007F0004AF0EE0FFF1FBB1F661F771F881F915027
+:100800005040A9F79E3F510570F01CCFA6CF5F3F27
+:10081000ECF3983EDCF3869577956795B795F79559
+:10082000E7959F5FC1F7FE2B880F911D96958795E1
+:0808300097F90895F894FFCF39
+:1008380000000000000000006F12033B00000000F1
+:080848000000000000000000A8
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop.sh b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop.sh new file mode 100644 index 0000000..38ca771 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_dcmotor_loop.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_dcmotor_loop.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections dcmotor_loop_main.c -o dcmotor_loop -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom dcmotor_loop dcmotor_loop.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:dcmotor_loop.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop_main.c b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop_main.c new file mode 100644 index 0000000..581a9d6 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/dcmotor_loop_main.c @@ -0,0 +1,217 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct dcmotor_loop_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct dcmotor_loop_fmi2Component_s { + fmi2Real currentTime; + fmi2Integer fmi2IntegerVars[2]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[6]; +} dcmotor_loop_fmi2Component; + +dcmotor_loop_fmi2Component dcmotor_loop_component = { + .fmi2IntegerVars = { + 0 /*pwm._u[1]*/, + 0 /*pwm1._u[1]*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value) +{ + MDD_avr_pwm_set(om_pwm, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted) +{ + void* om_pwm; + om_pwm = MDD_avr_pwm_init(om_timer, om_pin, om_initialValue, om_inverted); + return om_pwm; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm) +{ + MDD_avr_pwm_close(om_pwm); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component dcmotor_loop_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &dcmotor_loop_component; +} + +fmi2Status dcmotor_loop_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status dcmotor_loop_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[2] /* pwm1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[3] /* pwm1._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[2] /* pwm1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 2, 0, fmi2False); + comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 1, 0, fmi2False); + comp->extObjs[4] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[5] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[4] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + return fmi2OK; +} + +fmi2Status dcmotor_loop_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status dcmotor_loop_functionODE(fmi2Component comp) +{ +} + +static fmi2Status dcmotor_loop_functionOutputs(fmi2Component comp) +{ + comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */ = ((om_mod(comp->currentTime,6.0))<(3.0)) ? (255) : (0); /* equation 4 */ + comp->fmi2IntegerVars[1] /* pwm1._u[1] DISCRETE */ = ((om_mod(comp->currentTime,6.0))>(3.0)) ? (255) : (0); /* equation 5 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[5] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[3] /* pwm1._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, comp->fmi2IntegerVars[1] /* pwm1._u[1] DISCRETE */); +} + +fmi2Status dcmotor_loop_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + dcmotor_loop_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = dcmotor_loop_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + dcmotor_loop_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + dcmotor_loop_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + dcmotor_loop_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = dcmotor_loop_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_both.mos b/tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_both.mos new file mode 100644 index 0000000..c776b9a --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_both.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_dcmotor.MDD_dcmotor_both, fileNamePrefix="dcmotor_both"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_clock.mos b/tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_clock.mos new file mode 100644 index 0000000..4f2e6ed --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_clock.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_dcmotor.MDD_dcmotor_clock, fileNamePrefix="dcmotor_clock"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_loop.mos b/tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_loop.mos new file mode 100644 index 0000000..05800fc --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/dcmotor/runMDD_dcmotor_loop.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_dcmotor.MDD_dcmotor_loop, fileNamePrefix="dcmotor_loop"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/ldr/ldr_led b/tools/openmodelica/linux/MDD_build/ldr/ldr_led Binary files differnew file mode 100644 index 0000000..08ef23c --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/ldr/ldr_led diff --git a/tools/openmodelica/linux/MDD_build/ldr/ldr_led.hex b/tools/openmodelica/linux/MDD_build/ldr/ldr_led.hex new file mode 100644 index 0000000..cc58777 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/ldr/ldr_led.hex @@ -0,0 +1,120 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C9431013B
+:100020000C9451000C9451000C9451000C9400015C
+:100030000C9451000C9451000C94CF000C9451007E
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E4E4F7E002C0F4
+:1000800005900D92AE31B107D9F711E0AEE1B1E0C4
+:1000900001C01D92A332B107E1F70E948B010C94BD
+:1000A000A0030C9400000F931F93CF93DF93EC01F8
+:1000B00080917C00857E856080937C0080917A00B1
+:1000C000806480937A0080917A0086FDFCCF6091F5
+:1000D00078007091790080E090E00E94870220E033
+:1000E00030E040E854E40E94190320E030EC4FE790
+:1000F00054E40E941F026C837D838E839F8301E002
+:1001000010E02E853F85488959890E9415031816ED
+:1001100014F000E010E01D870C878C8D9D8D8230DF
+:10012000910561F08330910599F00197C9F416BCEF
+:1001300080916E00826080936E0016C010928500E0
+:100140001092840080916F00826080936F000CC0D9
+:100150001092B2008091700082608093700004C0A1
+:1001600081E090E00E94A00378949FB7F89480917A
+:1001700020019FBF8823C9F310922001E88DF98DDB
+:100180008C859D85892B19F08081826002C08081D9
+:100190008D7F8083DF91CF911F910F9108951F92E2
+:1001A0000F920FB60F9211242F933F938F939F932B
+:1001B00080911E0190911F01019690931F018093E1
+:1001C0001E0180912001813091F020911E0130911B
+:1001D0001F0180912101909122012817390738F0E1
+:1001E00081E08093200110921F0110921E019F91C7
+:1001F0008F913F912F910F900FBE0F901F901895E8
+:100200001F920F920FB60F9211242F933F938F934B
+:100210009F9380911E0190911F01019690931F0161
+:1002200080931E0180912001813091F020911E0168
+:1002300030911F01809121019091220128173907E7
+:1002400038F081E08093200110921F0110921E016E
+:100250009F918F913F912F910F900FBE0F901F9004
+:1002600018951F920F920FB60F9211242F933F9360
+:100270008F939F9380911E0190911F0101969093FF
+:100280001F0180931E0180912001813091F0209107
+:100290001E0130911F0180912101909122012817A8
+:1002A000390738F081E08093200110921F011092ED
+:1002B0001E019F918F913F912F910F900FBE0F9034
+:1002C0001F901895FC01ACE7B0E08C91806C8C938A
+:1002D000AAE7B0E08C9187688C93178A168A219AD6
+:1002E00085E290E0918F808F85B5836085BD81E048
+:1002F00090E0938F828F22E030E0309322012093B0
+:10030000210124B5226024BD29EF27BD958F848F5C
+:1003100080E090E00895CF92DF92EF92FF9280E02C
+:1003200091E00E946201C12CD12C760160E070E066
+:10033000CB016093000170930101809302019093BF
+:10034000030180E091E00E9453008FEFC81AD80AA1
+:10035000E80AF80AC701B6010E9487022FE632E1D7
+:1003600043E05BE30E94190320E030E0A9010E9412
+:10037000BB01DFCF5058BB27AA270ED01CC10DD11F
+:1003800030F012D120F031F49F3F11F41EF402C17D
+:100390000EF4E095E7FBF8C0E92F1ED180F3BA1701
+:1003A000620773078407950718F071F49EF536C14C
+:1003B0000EF4E0950B2EBA2FA02D0B01B901900180
+:1003C0000C01CA01A0011124FF27591B99F0593FC4
+:1003D00050F4503E68F11A16F040A22F232F342F0C
+:1003E0004427585FF3CF469537952795A795F0405A
+:1003F0005395C9F77EF41F16BA0B620B730B840B6F
+:10040000BAF09150A1F0FF0FBB1F661F771F881F26
+:10041000C2F70EC0BA0F621F731F841F48F487957E
+:1004200077956795B795F7959E3F08F0B3CF93956D
+:10043000880F08F09927EE0F9795879508950CD0AF
+:10044000BAC0B2D040F0A9D030F021F45F3F19F02B
+:100450009BC05111E4C09EC0BFD098F39923C9F34B
+:100460005523B1F3951B550BBB27AA2762177307BA
+:10047000840738F09F5F5F4F220F331F441FAA1F6E
+:10048000A9F333D00E2E3AF0E0E830D0915050402E
+:10049000E695001CCAF729D0FE2F27D0660F771FDC
+:1004A000881FBB1F261737074807AB07B0E809F0BE
+:1004B000BB0B802DBF01FF2793585F4F2AF09E3F53
+:1004C000510568F061C0ABC05F3FECF3983EDCF3D0
+:1004D000869577956795B795F7959F5FC9F7880FCC
+:1004E000911D9695879597F90895E1E0660F771F1E
+:1004F000881FBB1F621773078407BA0720F0621BAF
+:10050000730B840BBA0BEE1F88F7E0950895E894FF
+:1005100009C097FB3EF490958095709561957F4F4B
+:100520008F4F9F4F9923A9F0F92F96E9BB279395F9
+:10053000F695879577956795B795F111F8CFFAF409
+:10054000BB0F11F460FF1BC06F5F7F4F8F4F9F4F3A
+:1005500016C0882311F096E911C0772321F09EE898
+:10056000872F762F05C0662371F096E8862F70E0FE
+:1005700060E02AF09A95660F771F881FDAF7880FD8
+:100580009695879597F9089597F99F6780E870E0A9
+:1005900060E008959FEF80EC089500240A941616F9
+:1005A000170618060906089500240A941216130661
+:1005B000140605060895092E0394000C11F48823EF
+:1005C00052F0BB0F40F4BF2B11F460FF04C06F5F0B
+:1005D0007F4F8F4F9F4F089557FD9058440F551FE1
+:1005E00059F05F3F71F04795880F97FB991F61F0B5
+:1005F0009F3F79F087950895121613061406551F2C
+:10060000F2CF4695F1DF08C0161617061806991F97
+:10061000F1CF86957105610508940895E894BB278C
+:1006200066277727CB0197F9089566D008F48FEFF6
+:1006300008950BD0C0CFB1DF28F0B6DF18F09523B6
+:1006400009F0A2CFA7CF1124EACFC6DFA0F3959F70
+:10065000D1F3950F50E0551F629FF001729FBB27A9
+:10066000F00DB11D639FAA27F00DB11DAA1F649F55
+:100670006627B00DA11D661F829F2227B00DA11D08
+:10068000621F739FB00DA11D621F839FA00D611D8E
+:10069000221F749F3327A00D611D231F849F600DAF
+:1006A000211D822F762F6A2F11249F5750408AF0E8
+:1006B000E1F088234AF0EE0FFF1FBB1F661F771F74
+:1006C000881F91505040A9F79E3F510570F05CCFB4
+:1006D000A6CF5F3FECF3983EDCF386957795679560
+:1006E000B795F795E7959F5FC1F7FE2B880F911D92
+:1006F0009695879597F90895990F0008550FAA0BBD
+:10070000E0E8FEEF16161706E807F907C0F0121624
+:100710001306E407F50798F0621B730B840B950B27
+:1007200039F40A2661F0232B242B252B21F408957C
+:100730000A2609F4A140A6958FEF811D811D089519
+:04074000F894FFCF5B
+:1007440000000000000000000000000000000000A5
+:0E07540016446F12033B00000000000000007E
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/ldr/ldr_led.sh b/tools/openmodelica/linux/MDD_build/ldr/ldr_led.sh new file mode 100644 index 0000000..48dfad2 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/ldr/ldr_led.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_ldr_led.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_ldr_led.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections ldr_led_main.c -o ldr_led -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom ldr_led ldr_led.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:ldr_led.hex +if [ $? -ne 0 ]; then + exit 1 +fi diff --git a/tools/openmodelica/linux/MDD_build/ldr/ldr_led.sh~ b/tools/openmodelica/linux/MDD_build/ldr/ldr_led.sh~ new file mode 100644 index 0000000..48dfad2 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/ldr/ldr_led.sh~ @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_ldr_led.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_ldr_led.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections ldr_led_main.c -o ldr_led -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom ldr_led ldr_led.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:ldr_led.hex +if [ $? -ne 0 ]; then + exit 1 +fi diff --git a/tools/openmodelica/linux/MDD_build/ldr/ldr_led_main.c b/tools/openmodelica/linux/MDD_build/ldr/ldr_led_main.c new file mode 100644 index 0000000..3b4bcd7 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/ldr/ldr_led_main.c @@ -0,0 +1,243 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct ldr_led_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct ldr_led_fmi2Component_s { + fmi2Real currentTime; + fmi2Real fmi2RealVars[1]; + fmi2Boolean fmi2BooleanVars[3]; + fmi2Real fmi2RealParameter[2]; + void* extObjs[4]; +} ldr_led_fmi2Component; + +ldr_led_fmi2Component ldr_led_component = { + .fmi2RealVars = { + 0.0 /*adc._y*/, + }, + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + fmi2False /*booleanExpression2._y*/, + fmi2False /*digitalWriteBoolean1._u*/, + }, + .fmi2RealParameter = { + 600.0 /*greaterThreshold1._threshold*/, + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +static const char * const OMCLIT0 = "ElectricPotential"; +static const char * const OMCLIT1 = "V"; +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" +#include "MDDAVRAnalog.h" + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution) +{ + fmi2Real om_value; + om_value = MDD_avr_analog_read(om_analogPort, om_vref, om_voltageResolution); + return om_value; +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage) +{ + void* om_avr; + om_avr = MDD_avr_analog_init(om_divisionFactor, om_referenceVoltage); + return om_avr; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr) +{ + MDD_avr_analog_close(om_avr); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component ldr_led_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &ldr_led_component; +} + +fmi2Status ldr_led_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status ldr_led_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* adc._analog EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Analog.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(comp, 7, 4); + comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + return fmi2OK; +} + +fmi2Status ldr_led_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status ldr_led_functionODE(fmi2Component comp) +{ +} + +static fmi2Status ldr_led_functionOutputs(fmi2Component comp) +{ + comp->fmi2RealVars[0] /* adc._y variable */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(comp, 6, 1024.0, 10); /* equation 6 */ + comp->fmi2BooleanVars[2] /* digitalWriteBoolean1._u DISCRETE */ = (comp->fmi2RealVars[0] /* adc._y variable */)>(comp->fmi2RealParameter[0] /* greaterThreshold1._threshold PARAM */); /* equation 7 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, comp->fmi2BooleanVars[2] /* digitalWriteBoolean1._u DISCRETE */); +} + +fmi2Status ldr_led_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + ldr_led_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = ldr_led_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + ldr_led_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + ldr_led_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + ldr_led_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = ldr_led_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/ldr/ldr_read.sh b/tools/openmodelica/linux/MDD_build/ldr/ldr_read.sh new file mode 100644 index 0000000..ead2010 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/ldr/ldr_read.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_ldr_read.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_ldr_read.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections ldr_read_main.c -o ldr_read -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom ldr_read ldr_read.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:ldr_read.hex +if [ $? -ne 0 ]; then + exit 1 +fi diff --git a/tools/openmodelica/linux/MDD_build/ldr/ldr_read.sh~ b/tools/openmodelica/linux/MDD_build/ldr/ldr_read.sh~ new file mode 100644 index 0000000..f9c21db --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/ldr/ldr_read.sh~ @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_ldr_read.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_ldr_read.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections ldr_read_main.c -o ldr_read -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom ldr_read ldr_read.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:ldr_read.hex +if [ $? -ne 0 ]; then + exit 1 +fi diff --git a/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_led.mos b/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_led.mos new file mode 100644 index 0000000..ff9d4a1 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_led.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/sumeet/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/sumeet/MDD_Arduino/linux-version-4/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_ldr.MDD_ldr_led, fileNamePrefix="ldr_led"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_led.mos~ b/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_led.mos~ new file mode 100644 index 0000000..76aef31 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_led.mos~ @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_ldr.MDD_ldr_led, fileNamePrefix="ldr_led"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_read.mos b/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_read.mos new file mode 100644 index 0000000..ff9d4a1 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_read.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/sumeet/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/sumeet/MDD_Arduino/linux-version-4/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_ldr.MDD_ldr_led, fileNamePrefix="ldr_led"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_read.mos~ b/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_read.mos~ new file mode 100644 index 0000000..76aef31 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/ldr/runMDD_ldr_read.mos~ @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_ldr.MDD_ldr_led, fileNamePrefix="ldr_led"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/led/MDD_led_blink.hex b/tools/openmodelica/linux/MDD_build/led/MDD_led_blink.hex new file mode 100644 index 0000000..89858ca --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/MDD_led_blink.hex @@ -0,0 +1,114 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C942A0142
+:100020000C9451000C9451000C9451000C94F90064
+:100030000C9451000C9451000C94C8000C94510085
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E4EFF6E002C0EA
+:1000800005900D92A031B107D9F711E0A0E1B1E0E0
+:1000900001C01D92A531B107E1F70E9478010C94CF
+:1000A00078030C940000CF92DF92EF92FF920F93AF
+:1000B0001F93CF93DF93EC01C880D980EA80FB8047
+:1000C00020E030E040E05FE3C701B6010E94F102AA
+:1000D0000E9449029B01AC010E94A8019B01AC0156
+:1000E000C701B6010E94A70101E010E020E030E066
+:1000F00040E85FE30E94ED0287FF02C000E010E0ED
+:100100001D830C838E859F858230910561F083303D
+:10011000910599F00197C9F416BC80916E00826038
+:1001200080936E0016C0109285001092840080911A
+:100130006F00826080936F000CC01092B2008091BB
+:10014000700082608093700004C081E090E00E94A3
+:10015000780378949FB7F894809112019FBF882309
+:10016000C9F310921201EA85FB858C819D81892B50
+:1001700019F08081806202C080818F7D8083DF9151
+:10018000CF911F910F91FF90EF90DF90CF90089546
+:100190001F920F920FB60F9211242F933F938F93BC
+:1001A0009F938091100190911101019690931101FC
+:1001B0008093100180911201813091F02091100103
+:1001C0003091110180911301909114012817390782
+:1001D00038F081E080931201109211011092100109
+:1001E0009F918F913F912F910F900FBE0F901F9075
+:1001F00018951F920F920FB60F9211242F933F93D1
+:100200008F939F938091100190911101019690938B
+:1002100011018093100180911201813091F02091A1
+:100220001001309111018091130190911401281750
+:10023000390738F081E08093120110921101109279
+:1002400010019F918F913F912F910F900FBE0F90B2
+:100250001F9018951F920F920FB60F9211242F9393
+:100260003F938F939F93809110019091110101967C
+:10027000909311018093100180911201813091F0CF
+:10028000209110013091110180911301909114017E
+:100290002817390738F081E080931201109211017C
+:1002A000109210019F918F913F912F910F900FBE4F
+:1002B0000F901F901895FC0185B5836085BD81E086
+:1002C00090E09587848722E030E0309314012093FA
+:1002D000130124B5226024BD29EF27BD97878687A7
+:1002E000259A85E290E09387828780E090E00895E8
+:1002F000CF92DF92EF92FF9280E091E00E945B014B
+:10030000C12CD12C760160E070E0CB01609300013C
+:1003100070930101809302019093030180E091E0CA
+:100320000E9453008FEFC81AD80AE80AF80AC701DA
+:10033000B6010E940C022FE632E143E05BE30E942B
+:10034000F10220E030E0A9010E94A801DFCF50585F
+:10035000BB27AA270ED0F0C0E1D030F0E6D020F0C5
+:1003600031F49F3F11F41EF4D6C00EF4E095E7FB84
+:10037000A3C0E92FF2D080F3BA176207730784078E
+:10038000950718F071F49EF521C10EF4E0950B2E3F
+:10039000BA2FA02D0B01B90190010C01CA01A001D7
+:1003A0001124FF27591B99F0593F50F4503E68F132
+:1003B0001A16F040A22F232F342F4427585FF3CF73
+:1003C000469537952795A795F0405395C9F77EF444
+:1003D0001F16BA0B620B730B840BBAF09150A1F08D
+:1003E000FF0FBB1F661F771F881FC2F70EC0BA0F13
+:1003F000621F731F841F48F4879577956795B7959B
+:10040000F7959E3F08F0B3CF9395880F08F0992792
+:10041000EE0F979587950895E89409C097FB3EF4F1
+:1004200090958095709561957F4F8F4F9F4F992341
+:10043000A9F0F92F96E9BB279395F69587957795BF
+:100440006795B795F111F8CFFAF4BB0F11F460FF7F
+:100450001BC06F5F7F4F8F4F9F4F16C0882311F0D7
+:1004600096E911C0772321F09EE8872F762F05C0EB
+:10047000662371F096E8862F70E060E02AF09A9586
+:10048000660F771F881FDAF7880F9695879597F97B
+:10049000089585D080F09F3740F491110EF097C0F9
+:1004A00060E070E080E89FEB089526F41B16611D64
+:1004B000711D811D07C021C097F99F6780E870E01A
+:1004C00060E00895882371F4772321F09850872BFA
+:1004D000762F07C0662311F499270DC09051862B03
+:1004E00070E060E02AF09A95660F771F881FDAF7B0
+:1004F000880F9695879597F908959F3F31F0915011
+:1005000020F4879577956795B795880F911D9695F7
+:10051000879597F908959FEF80EC089500240A9439
+:100520001616170618060906089500240A941216CE
+:100530001306140605060895092E0394000C11F401
+:10054000882352F0BB0F40F4BF2B11F460FF04C0AE
+:100550006F5F7F4F8F4F9F4F089557FD9058440F07
+:10056000551F59F05F3F71F04795880F97FB991F12
+:1005700061F09F3F79F087950895121613061406CF
+:10058000551FF2CF4695F1DF08C01616170618065C
+:10059000991FF1CF86957105610508940895E5DFEF
+:1005A000A0F0BEE7B91788F4BB279F3860F4161691
+:1005B000B11D672F782F8827985FF7CF869577959D
+:1005C0006795B11D93959639C8F30895E894BB27B4
+:1005D00066277727CB0197F9089566D008F48FEF47
+:1005E00008950BD0A9CF9ADF28F09FDF18F095234C
+:1005F00009F062CF90CF1124EACFAFDFA0F3959F2F
+:10060000D1F3950F50E0551F629FF001729FBB27F9
+:10061000F00DB11D639FAA27F00DB11DAA1F649FA5
+:100620006627B00DA11D661F829F2227B00DA11D58
+:10063000621F739FB00DA11D621F839FA00D611DDE
+:10064000221F749F3327A00D611D231F849F600DFF
+:10065000211D822F762F6A2F11249F5750408AF038
+:10066000E1F088234AF0EE0FFF1FBB1F661F771FC4
+:10067000881F91505040A9F79E3F510570F01CCF44
+:10068000A6CF5F3FECF3983EDCF3869577956795B0
+:10069000B795F795E7959F5FC1F7FE2B880F911DE2
+:1006A0009695879597F90895990F0008550FAA0B0D
+:1006B000E0E8FEEF16161706E807F907C0F0121675
+:1006C0001306E407F50798F0621B730B840B950B78
+:1006D00039F40A2661F0232B242B252B21F40895CD
+:1006E0000A2609F4A140A6958FEF811D811D08956A
+:0406F000F894FFCFAC
+:1006F4000000000000006F12033B00000000000037
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/led/MDD_led_blue.hex b/tools/openmodelica/linux/MDD_build/led/MDD_led_blue.hex new file mode 100644 index 0000000..05d7448 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/MDD_led_blue.hex @@ -0,0 +1,93 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94E50088
+:100020000C9451000C9451000C9451000C94B400A9
+:100030000C9451000C9451000C9483000C945100CA
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0EAEAF5E002C0EA
+:1000800005900D92A031B107D9F721E0A0E1B1E0D0
+:1000900001C01D92A531B207E1F70E9433010C9413
+:1000A000D3020C9400008230910561F083309105F9
+:1000B00099F00197C9F416BC80916E00826080931C
+:1000C0006E0016C0109285001092840080916F001F
+:1000D000826080936F000CC01092B200809170001B
+:1000E00082608093700004C081E090E00E94D3029F
+:1000F00078949FB7F894809112019FBF8823C9F329
+:100100001092120108951F920F920FB60F921124B0
+:100110002F933F938F939F938091100190911101A2
+:10012000019690931101809310018091120181300A
+:1001300091F0209110013091110180911301909163
+:1001400014012817390738F081E0809312011092CA
+:100150001101109210019F918F913F912F910F905B
+:100160000FBE0F901F9018951F920F920FB60F920F
+:1001700011242F933F938F939F938091100190911F
+:100180001101019690931101809310018091120149
+:10019000813091F020911001309111018091130173
+:1001A000909114012817390738F081E080931201EB
+:1001B00010921101109210019F918F913F912F91F8
+:1001C0000F900FBE0F901F9018951F920F920FB6B1
+:1001D0000F9211242F933F938F939F93809110013F
+:1001E00090911101019690931101809310018091DB
+:1001F0001201813091F02091100130911101809114
+:100200001301909114012817390738F081E0809389
+:10021000120110921101109210019F918F913F9144
+:100220002F910F900FBE0F901F901895FC01219AEF
+:1002300085E290E09387828785B5836085BD21E064
+:1002400030E03587248782E090E09093140180931A
+:10025000130184B5826084BD89EF87BD3787268707
+:1002600080E090E00895CF92DF92EF92FF9280E0DD
+:1002700091E00E941601C12CD12C760160E070E063
+:10028000CB01609300017093010180930201909370
+:10029000030180910E0190910F010E945300E091A3
+:1002A0000A01F0910B018081826080838FEFC81A70
+:1002B000D80AE80AF80AC701B6010E94D8012FE659
+:1002C00032E143E05BE30E94660220E030E0A901F6
+:1002D0000E946C01D6CF5058BB27AA270E948301E9
+:1002E0000C942C020E941E0238F00E94250220F07D
+:1002F00039F49F3F19F426F40C941B020EF4E09598
+:10030000E7FB0C941502E92F0E943D0258F3BA173F
+:10031000620773078407950720F079F4A6F50C941B
+:100320005F020EF4E0950B2EBA2FA02D0B01B90140
+:1003300090010C01CA01A0011124FF27591B99F05B
+:10034000593F50F4503E68F11A16F040A22F232F67
+:10035000342F4427585FF3CF469537952795A795B7
+:10036000F0405395C9F77EF41F16BA0B620B730B5E
+:10037000840BBAF09150A1F0FF0FBB1F661F771FCF
+:10038000881FC2F70EC0BA0F621F731F841F48F484
+:10039000879577956795B795F7959E3F08F0B0CF0D
+:1003A0009395880F08F09927EE0F979587950895F4
+:1003B000E89409C097FB3EF49095809570956195FF
+:1003C0007F4F8F4F9F4F9923A9F0F92F96E9BB27B5
+:1003D0009395F695879577956795B795F111F8CF31
+:1003E000FAF4BB0F11F460FF1BC06F5F7F4F8F4F9C
+:1003F0009F4F16C0882311F096E911C0772321F092
+:100400009EE8872F762F05C0662371F096E8862F29
+:1004100070E060E02AF09A95660F771F881FDAF780
+:10042000880F9695879597F9089597F99F6780E8C3
+:1004300070E060E008959FEF80EC089500240A9436
+:100440001616170618060906089500240A941216AF
+:100450001306140605060895092E0394000C11F4E2
+:10046000882352F0BB0F40F4BF2B11F460FF04C08F
+:100470006F5F7F4F8F4F9F4F089557FD9058440FE8
+:10048000551F59F05F3F71F04795880F97FB991FF3
+:1004900061F09F3F79F087950895121613061406B0
+:1004A000551FF2CF4695F1DF08C01616170618063D
+:1004B000991FF1CF86957105610508940895E89418
+:1004C000BB2766277727CB0197F908950E94790209
+:1004D0000C942C020E941E0238F00E94250220F08B
+:1004E000952311F00C9415020C941B0211240C940A
+:1004F00060020E943D0270F3959FC1F3950F50E09A
+:10050000551F629FF001729FBB27F00DB11D639FC5
+:10051000AA27F00DB11DAA1F649F6627B00DA11D6B
+:10052000661F829F2227B00DA11D621F739FB00D11
+:10053000A11D621F839FA00D611D221F749F332781
+:10054000A00D611D231F849F600D211D822F762F1A
+:100550006A2F11249F5750409AF0F1F088234AF0F7
+:10056000EE0FFF1FBB1F661F771F881F9150504063
+:10057000A9F79E3F510580F00C9415020C9460027F
+:100580005F3FE4F3983ED4F3869577956795B795EA
+:10059000F795E7959F5FC1F7FE2B880F911D969504
+:0A05A000879597F90895F894FFCFAE
+:1005AA000000000000006F12033B00000000000082
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/led/MDD_traffic_light b/tools/openmodelica/linux/MDD_build/led/MDD_traffic_light Binary files differnew file mode 100755 index 0000000..9616b97 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/MDD_traffic_light diff --git a/tools/openmodelica/linux/MDD_build/led/MDD_traffic_light.hex b/tools/openmodelica/linux/MDD_build/led/MDD_traffic_light.hex new file mode 100644 index 0000000..95ea020 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/MDD_traffic_light.hex @@ -0,0 +1,95 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94E50088
+:100020000C9451000C9451000C9451000C94B400A9
+:100030000C9451000C9451000C9483000C945100CA
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E6ECF5E002C0EC
+:1000800005900D92A031B107D9F721E0A0E1B1E0D0
+:1000900001C01D92A531B207E1F70E9441010C9405
+:1000A000E1020C9400008230910561F083309105EB
+:1000B00099F00197C9F416BC80916E00826080931C
+:1000C0006E0016C0109285001092840080916F001F
+:1000D000826080936F000CC01092B200809170001B
+:1000E00082608093700004C081E090E00E94E10291
+:1000F00078949FB7F894809112019FBF8823C9F329
+:100100001092120108951F920F920FB60F921124B0
+:100110002F933F938F939F938091100190911101A2
+:10012000019690931101809310018091120181300A
+:1001300091F0209110013091110180911301909163
+:1001400014012817390738F081E0809312011092CA
+:100150001101109210019F918F913F912F910F905B
+:100160000FBE0F901F9018951F920F920FB60F920F
+:1001700011242F933F938F939F938091100190911F
+:100180001101019690931101809310018091120149
+:10019000813091F020911001309111018091130173
+:1001A000909114012817390738F081E080931201EB
+:1001B00010921101109210019F918F913F912F91F8
+:1001C0000F900FBE0F901F9018951F920F920FB6B1
+:1001D0000F9211242F933F938F939F93809110013F
+:1001E00090911101019690931101809310018091DB
+:1001F0001201813091F02091100130911101809114
+:100200001301909114012817390738F081E0809389
+:10021000120110921101109210019F918F913F9144
+:100220002F910F900FBE0F901F901895DC01E0E00A
+:10023000F0E08081806180831B961C921E921A9749
+:10024000E1E8F0E080818360808322E030E01D9669
+:100250003C932E931C9781E090E09093140180933F
+:10026000130180818860808389EF90E090938900FA
+:10027000809388001F963C932E931E9780E090E019
+:100280000895CF92DF92EF92FF9280E091E00E947A
+:100290001601C12CD12C760160E070E0CB01609397
+:1002A00000017093010180930201909303018091FA
+:1002B0000E0190910F010E945300E0910A01F0910C
+:1002C0000B018081806180838FEFC81AD80AE80A09
+:1002D000F80AC701B6010E94E6012FE632E143E0C9
+:1002E0005BE30E94740220E030E0A9010E947A01E1
+:1002F000D6CF5058BB27AA270E9491010C943A02EE
+:100300000E942C0238F00E94330220F039F49F3F03
+:1003100019F426F40C9429020EF4E095E7FB0C94F2
+:100320002302E92F0E944B0258F3BA1762077307A2
+:100330008407950720F079F4A6F50C946D020EF46D
+:10034000E0950B2EBA2FA02D0B01B90190010C01E5
+:10035000CA01A0011124FF27591B99F0593F50F4FD
+:10036000503E68F11A16F040A22F232F342F442755
+:10037000585FF3CF469537952795A795F04053954D
+:10038000C9F77EF41F16BA0B620B730B840BBAF01D
+:100390009150A1F0FF0FBB1F661F771F881FC2F788
+:1003A0000EC0BA0F621F731F841F48F4879577959C
+:1003B0006795B795F7959E3F08F0B0CF9395880F56
+:1003C00008F09927EE0F979587950895E89409C04E
+:1003D00097FB3EF490958095709561957F4F8F4F78
+:1003E0009F4F9923A9F0F92F96E9BB279395F6958E
+:1003F000879577956795B795F111F8CFFAF4BB0F0C
+:1004000011F460FF1BC06F5F7F4F8F4F9F4F16C06F
+:10041000882311F096E911C0772321F09EE8872FF9
+:10042000762F05C0662371F096E8862F70E060E0B5
+:100430002AF09A95660F771F881FDAF7880F96952E
+:10044000879597F9089597F99F6780E870E060E0D5
+:1004500008959FEF80EC089500240A94161617065D
+:1004600018060906089500240A94121613061406A5
+:1004700005060895092E0394000C11F4882352F008
+:10048000BB0F40F4BF2B11F460FF04C06F5F7F4FC0
+:100490008F4F9F4F089557FD9058440F551F59F0A7
+:1004A0005F3F71F04795880F97FB991F61F09F3F61
+:1004B00079F087950895121613061406551FF2CF8A
+:1004C0004695F1DF08C0161617061806991FF1CFDA
+:1004D00086957105610508940895E894BB27662701
+:1004E0007727CB0197F908950E9487020C943A026E
+:1004F0000E942C0238F00E94330220F0952311F064
+:100500000C9423020C94290211240C946E020E9474
+:100510004B0270F3959FC1F3950F50E0551F629FFA
+:10052000F001729FBB27F00DB11D639FAA27F00D4C
+:10053000B11DAA1F649F6627B00DA11D661F829F73
+:100540002227B00DA11D621F739FB00DA11D621F58
+:10055000839FA00D611D221F749F3327A00D611D75
+:10056000231F849F600D211D822F762F6A2F112457
+:100570009F5750409AF0F1F088234AF0EE0FFF1F8A
+:10058000BB1F661F771F881F91505040A9F79E3FE1
+:10059000510580F00C9423020C946E025F3FE4F34B
+:1005A000983ED4F3869577956795B795F795E79537
+:1005B0009F5FC1F7FE2B880F911D9695879597F940
+:0605C0000895F894FFCF3E
+:1005C6000000000000006F12033B00000000000066
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/led/led_blink b/tools/openmodelica/linux/MDD_build/led/led_blink Binary files differnew file mode 100644 index 0000000..3953004 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blink diff --git a/tools/openmodelica/linux/MDD_build/led/led_blink.hex b/tools/openmodelica/linux/MDD_build/led/led_blink.hex new file mode 100644 index 0000000..89858ca --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blink.hex @@ -0,0 +1,114 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C942A0142
+:100020000C9451000C9451000C9451000C94F90064
+:100030000C9451000C9451000C94C8000C94510085
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E4EFF6E002C0EA
+:1000800005900D92A031B107D9F711E0A0E1B1E0E0
+:1000900001C01D92A531B107E1F70E9478010C94CF
+:1000A00078030C940000CF92DF92EF92FF920F93AF
+:1000B0001F93CF93DF93EC01C880D980EA80FB8047
+:1000C00020E030E040E05FE3C701B6010E94F102AA
+:1000D0000E9449029B01AC010E94A8019B01AC0156
+:1000E000C701B6010E94A70101E010E020E030E066
+:1000F00040E85FE30E94ED0287FF02C000E010E0ED
+:100100001D830C838E859F858230910561F083303D
+:10011000910599F00197C9F416BC80916E00826038
+:1001200080936E0016C0109285001092840080911A
+:100130006F00826080936F000CC01092B2008091BB
+:10014000700082608093700004C081E090E00E94A3
+:10015000780378949FB7F894809112019FBF882309
+:10016000C9F310921201EA85FB858C819D81892B50
+:1001700019F08081806202C080818F7D8083DF9151
+:10018000CF911F910F91FF90EF90DF90CF90089546
+:100190001F920F920FB60F9211242F933F938F93BC
+:1001A0009F938091100190911101019690931101FC
+:1001B0008093100180911201813091F02091100103
+:1001C0003091110180911301909114012817390782
+:1001D00038F081E080931201109211011092100109
+:1001E0009F918F913F912F910F900FBE0F901F9075
+:1001F00018951F920F920FB60F9211242F933F93D1
+:100200008F939F938091100190911101019690938B
+:1002100011018093100180911201813091F02091A1
+:100220001001309111018091130190911401281750
+:10023000390738F081E08093120110921101109279
+:1002400010019F918F913F912F910F900FBE0F90B2
+:100250001F9018951F920F920FB60F9211242F9393
+:100260003F938F939F93809110019091110101967C
+:10027000909311018093100180911201813091F0CF
+:10028000209110013091110180911301909114017E
+:100290002817390738F081E080931201109211017C
+:1002A000109210019F918F913F912F910F900FBE4F
+:1002B0000F901F901895FC0185B5836085BD81E086
+:1002C00090E09587848722E030E0309314012093FA
+:1002D000130124B5226024BD29EF27BD97878687A7
+:1002E000259A85E290E09387828780E090E00895E8
+:1002F000CF92DF92EF92FF9280E091E00E945B014B
+:10030000C12CD12C760160E070E0CB01609300013C
+:1003100070930101809302019093030180E091E0CA
+:100320000E9453008FEFC81AD80AE80AF80AC701DA
+:10033000B6010E940C022FE632E143E05BE30E942B
+:10034000F10220E030E0A9010E94A801DFCF50585F
+:10035000BB27AA270ED0F0C0E1D030F0E6D020F0C5
+:1003600031F49F3F11F41EF4D6C00EF4E095E7FB84
+:10037000A3C0E92FF2D080F3BA176207730784078E
+:10038000950718F071F49EF521C10EF4E0950B2E3F
+:10039000BA2FA02D0B01B90190010C01CA01A001D7
+:1003A0001124FF27591B99F0593F50F4503E68F132
+:1003B0001A16F040A22F232F342F4427585FF3CF73
+:1003C000469537952795A795F0405395C9F77EF444
+:1003D0001F16BA0B620B730B840BBAF09150A1F08D
+:1003E000FF0FBB1F661F771F881FC2F70EC0BA0F13
+:1003F000621F731F841F48F4879577956795B7959B
+:10040000F7959E3F08F0B3CF9395880F08F0992792
+:10041000EE0F979587950895E89409C097FB3EF4F1
+:1004200090958095709561957F4F8F4F9F4F992341
+:10043000A9F0F92F96E9BB279395F69587957795BF
+:100440006795B795F111F8CFFAF4BB0F11F460FF7F
+:100450001BC06F5F7F4F8F4F9F4F16C0882311F0D7
+:1004600096E911C0772321F09EE8872F762F05C0EB
+:10047000662371F096E8862F70E060E02AF09A9586
+:10048000660F771F881FDAF7880F9695879597F97B
+:10049000089585D080F09F3740F491110EF097C0F9
+:1004A00060E070E080E89FEB089526F41B16611D64
+:1004B000711D811D07C021C097F99F6780E870E01A
+:1004C00060E00895882371F4772321F09850872BFA
+:1004D000762F07C0662311F499270DC09051862B03
+:1004E00070E060E02AF09A95660F771F881FDAF7B0
+:1004F000880F9695879597F908959F3F31F0915011
+:1005000020F4879577956795B795880F911D9695F7
+:10051000879597F908959FEF80EC089500240A9439
+:100520001616170618060906089500240A941216CE
+:100530001306140605060895092E0394000C11F401
+:10054000882352F0BB0F40F4BF2B11F460FF04C0AE
+:100550006F5F7F4F8F4F9F4F089557FD9058440F07
+:10056000551F59F05F3F71F04795880F97FB991F12
+:1005700061F09F3F79F087950895121613061406CF
+:10058000551FF2CF4695F1DF08C01616170618065C
+:10059000991FF1CF86957105610508940895E5DFEF
+:1005A000A0F0BEE7B91788F4BB279F3860F4161691
+:1005B000B11D672F782F8827985FF7CF869577959D
+:1005C0006795B11D93959639C8F30895E894BB27B4
+:1005D00066277727CB0197F9089566D008F48FEF47
+:1005E00008950BD0A9CF9ADF28F09FDF18F095234C
+:1005F00009F062CF90CF1124EACFAFDFA0F3959F2F
+:10060000D1F3950F50E0551F629FF001729FBB27F9
+:10061000F00DB11D639FAA27F00DB11DAA1F649FA5
+:100620006627B00DA11D661F829F2227B00DA11D58
+:10063000621F739FB00DA11D621F839FA00D611DDE
+:10064000221F749F3327A00D611D231F849F600DFF
+:10065000211D822F762F6A2F11249F5750408AF038
+:10066000E1F088234AF0EE0FFF1FBB1F661F771FC4
+:10067000881F91505040A9F79E3F510570F01CCF44
+:10068000A6CF5F3FECF3983EDCF3869577956795B0
+:10069000B795F795E7959F5FC1F7FE2B880F911DE2
+:1006A0009695879597F90895990F0008550FAA0B0D
+:1006B000E0E8FEEF16161706E807F907C0F0121675
+:1006C0001306E407F50798F0621B730B840B950B78
+:1006D00039F40A2661F0232B242B252B21F40895CD
+:1006E0000A2609F4A140A6958FEF811D811D08956A
+:0406F000F894FFCFAC
+:1006F4000000000000006F12033B00000000000037
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/led/led_blink.sh b/tools/openmodelica/linux/MDD_build/led/led_blink.sh new file mode 100644 index 0000000..cd9e818 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blink.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_led_blink.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_led_blink.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections led_blink_main.c -o led_blink -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom led_blink led_blink.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:led_blink.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/led/led_blink_main.c b/tools/openmodelica/linux/MDD_build/led/led_blink_main.c new file mode 100644 index 0000000..bcf2661 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blink_main.c @@ -0,0 +1,212 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct led_blink_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct led_blink_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[3]; +} led_blink_fmi2Component; + +led_blink_fmi2Component led_blink_component = { + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component led_blink_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &led_blink_component; +} + +fmi2Status led_blink_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status led_blink_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 6); + return fmi2OK; +} + +fmi2Status led_blink_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status led_blink_functionODE(fmi2Component comp) +{ +} + +static fmi2Status led_blink_functionOutputs(fmi2Component comp) +{ + comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */ = (om_mod(comp->currentTime,2.0))>=(1.0); /* equation 3 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 6, comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */); +} + +fmi2Status led_blink_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + led_blink_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = led_blink_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + led_blink_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + led_blink_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + led_blink_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = led_blink_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue b/tools/openmodelica/linux/MDD_build/led/led_blue Binary files differnew file mode 100755 index 0000000..f4d2d19 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue.hex b/tools/openmodelica/linux/MDD_build/led/led_blue.hex new file mode 100644 index 0000000..f36052a --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue.hex @@ -0,0 +1,91 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94E50088
+:100020000C9451000C9451000C9451000C94B400A9
+:100030000C9451000C9451000C9483000C945100CA
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E6E8F5E002C0F0
+:1000800005900D92A031B107D9F711E0A0E1B1E0E0
+:1000900001C01D92A531B107E1F70E9433010C9414
+:1000A000C1020C9400008230910561F0833091050B
+:1000B00099F00197C9F416BC80916E00826080931C
+:1000C0006E0016C0109285001092840080916F001F
+:1000D000826080936F000CC01092B200809170001B
+:1000E00082608093700004C081E090E00E94C102B1
+:1000F00078949FB7F894809112019FBF8823C9F329
+:100100001092120108951F920F920FB60F921124B0
+:100110002F933F938F939F938091100190911101A2
+:10012000019690931101809310018091120181300A
+:1001300091F0209110013091110180911301909163
+:1001400014012817390738F081E0809312011092CA
+:100150001101109210019F918F913F912F910F905B
+:100160000FBE0F901F9018951F920F920FB60F920F
+:1001700011242F933F938F939F938091100190911F
+:100180001101019690931101809310018091120149
+:10019000813091F020911001309111018091130173
+:1001A000909114012817390738F081E080931201EB
+:1001B00010921101109210019F918F913F912F91F8
+:1001C0000F900FBE0F901F9018951F920F920FB6B1
+:1001D0000F9211242F933F938F939F93809110013F
+:1001E00090911101019690931101809310018091DB
+:1001F0001201813091F02091100130911101809114
+:100200001301909114012817390738F081E0809389
+:10021000120110921101109210019F918F913F9144
+:100220002F910F900FBE0F901F901895FC01219AEF
+:1002300085E290E09387828785B5836085BD81E004
+:1002400090E09587848722E030E03093140120937A
+:10025000130124B5226024BD29EF27BD9787868727
+:1002600080E090E00895CF92DF92EF92FF9280E0DD
+:1002700091E00E941601C12CD12C760160E070E063
+:10028000CB01609300017093010180930201909370
+:10029000030180910E0190910F010E945300E091A3
+:1002A0000A01F0910B018081826080838FEFC81A70
+:1002B000D80AE80AF80AC701B6010E94D0012FE661
+:1002C00032E143E05BE30E945E0220E030E0A901FE
+:1002D0000E946C01D6CF5058BB27AA270ED0B4C0BD
+:1002E000A5D030F0AAD020F031F49F3F11F41EF4D5
+:1002F0009AC00EF4E095E7FB90C0E92FB6D080F3EA
+:10030000BA17620773078407950718F071F49EF512
+:10031000CEC00EF4E0950B2EBA2FA02D0B01B90123
+:1003200090010C01CA01A0011124FF27591B99F06B
+:10033000593F50F4503E68F11A16F040A22F232F77
+:10034000342F4427585FF3CF469537952795A795C7
+:10035000F0405395C9F77EF41F16BA0B620B730B6E
+:10036000840BBAF09150A1F0FF0FBB1F661F771FDF
+:10037000881FC2F70EC0BA0F621F731F841F48F494
+:10038000879577956795B795F7959E3F08F0B3CF1A
+:100390009395880F08F09927EE0F97958795089504
+:1003A000E89409C097FB3EF490958095709561950F
+:1003B0007F4F8F4F9F4F9923A9F0F92F96E9BB27C5
+:1003C0009395F695879577956795B795F111F8CF41
+:1003D000FAF4BB0F11F460FF1BC06F5F7F4F8F4FAC
+:1003E0009F4F16C0882311F096E911C0772321F0A2
+:1003F0009EE8872F762F05C0662371F096E8862F3A
+:1004000070E060E02AF09A95660F771F881FDAF790
+:10041000880F9695879597F9089597F99F6780E8D3
+:1004200070E060E008959FEF80EC089500240A9446
+:100430001616170618060906089500240A941216BF
+:100440001306140605060895092E0394000C11F4F2
+:10045000882352F0BB0F40F4BF2B11F460FF04C09F
+:100460006F5F7F4F8F4F9F4F089557FD9058440FF8
+:10047000551F59F05F3F71F04795880F97FB991F03
+:1004800061F09F3F79F087950895121613061406C0
+:10049000551FF2CF4695F1DF08C01616170618064D
+:1004A000991FF1CF86957105610508940895E89428
+:1004B000BB2766277727CB0197F908950BD0C4CFC8
+:1004C000B5DF28F0BADF18F0952309F0A6CFABCF3F
+:1004D0001124EECFCADFA0F3959FD1F3950F50E022
+:1004E000551F629FF001729FBB27F00DB11D639FE6
+:1004F000AA27F00DB11DAA1F649F6627B00DA11D8C
+:10050000661F829F2227B00DA11D621F739FB00D31
+:10051000A11D621F839FA00D611D221F749F3327A1
+:10052000A00D611D231F849F600D211D822F762F3A
+:100530006A2F11249F5750408AF0E1F088234AF037
+:10054000EE0FFF1FBB1F661F771F881F9150504083
+:10055000A9F79E3F510570F060CFAACF5F3FECF343
+:10056000983EDCF3869577956795B795F795E7956F
+:100570009F5FC1F7FE2B880F911D9695879597F980
+:060580000895F894FFCF7E
+:100586000000000000006F12033B000000000000A6
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue.sh b/tools/openmodelica/linux/MDD_build/led/led_blue.sh new file mode 100644 index 0000000..b2a9b7d --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_led_blue.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_led_blue.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections led_blue_main.c -o led_blue -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom led_blue led_blue.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:led_blue.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue_delay b/tools/openmodelica/linux/MDD_build/led/led_blue_delay Binary files differnew file mode 100644 index 0000000..154b3fe --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue_delay diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue_delay.hex b/tools/openmodelica/linux/MDD_build/led/led_blue_delay.hex new file mode 100644 index 0000000..eaa1eaa --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue_delay.hex @@ -0,0 +1,100 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C940E015E
+:100020000C9451000C9451000C9451000C94DD0080
+:100030000C9451000C9451000C94AC000C945100A1
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E6E1F6E002C0F6
+:1000800005900D92A031B107D9F711E0A0E1B1E0E0
+:1000900001C01D92A531B107E1F70E945C010C94EB
+:1000A00009030C9400000F931F93CF93DF93EC018F
+:1000B00001E010E020E030E040EA50E4688179811E
+:1000C0008A819B810E94F00187FD02C000E010E060
+:1000D0001D830C838E859F858230910561F083306E
+:1000E000910599F00197C9F416BC80916E00826069
+:1000F00080936E0016C0109285001092840080914B
+:100100006F00826080936F000CC01092B2008091EB
+:10011000700082608093700004C081E090E00E94D3
+:10012000090378949FB7F894809112019FBF8823A8
+:10013000C9F310921201EA85FB858C819D81892B80
+:1001400019F08081826002C080818D7F8083DF9181
+:10015000CF911F910F9108951F920F920FB60F929A
+:1001600011242F933F938F939F938091100190912F
+:100170001101019690931101809310018091120159
+:10018000813091F020911001309111018091130183
+:10019000909114012817390738F081E080931201FB
+:1001A00010921101109210019F918F913F912F9108
+:1001B0000F900FBE0F901F9018951F920F920FB6C1
+:1001C0000F9211242F933F938F939F93809110014F
+:1001D00090911101019690931101809310018091EB
+:1001E0001201813091F02091100130911101809124
+:1001F0001301909114012817390738F081E080939A
+:10020000120110921101109210019F918F913F9154
+:100210002F910F900FBE0F901F9018951F920F9265
+:100220000FB60F9211242F933F938F939F9380913A
+:10023000100190911101019690931101809310018A
+:1002400080911201813091F02091100130911101C3
+:1002500080911301909114012817390738F081E03B
+:100260008093120110921101109210019F918F91B1
+:100270003F912F910F900FBE0F901F901895FC018A
+:10028000219A85E290E09387828785B5836085BD5A
+:1002900081E090E09587848722E030E0309314017C
+:1002A0002093130124B5226024BD29EF27BD978731
+:1002B000868780E090E00895CF92DF92EF92FF92E0
+:1002C00080E091E00E943F01C12CD12C760160E0DA
+:1002D00070E0CB01609300017093010180930201F3
+:1002E0009093030180E091E00E9453008FEFC81AC1
+:1002F000D80AE80AF80AC701B6010E94F4012FE6FD
+:1003000032E143E05BE30E94A60220E030E0A90175
+:100310000E948C01DFCF5058BB27AA270ED0DCC02B
+:10032000CDD030F0D2D020F031F49F3F11F41EF444
+:10033000C2C00EF4E095E7FBB8C0E92FDED080F331
+:10034000BA17620773078407950718F071F49EF5D2
+:10035000F6C00EF4E0950B2EBA2FA02D0B01B901BB
+:1003600090010C01CA01A0011124FF27591B99F02B
+:10037000593F50F4503E68F11A16F040A22F232F37
+:10038000342F4427585FF3CF469537952795A79587
+:10039000F0405395C9F77EF41F16BA0B620B730B2E
+:1003A000840BBAF09150A1F0FF0FBB1F661F771F9F
+:1003B000881FC2F70EC0BA0F621F731F841F48F454
+:1003C000879577956795B795F7959E3F08F0B3CFDA
+:1003D0009395880F08F09927EE0F979587950895C4
+:1003E00040D008F481E00895E89409C097FB3EF4FA
+:1003F00090958095709561957F4F8F4F9F4F992372
+:10040000A9F0F92F96E9BB279395F69587957795EF
+:100410006795B795F111F8CFFAF4BB0F11F460FFAF
+:100420001BC06F5F7F4F8F4F9F4F16C0882311F007
+:1004300096E911C0772321F09EE8872F762F05C01B
+:10044000662371F096E8862F70E060E02AF09A95B6
+:10045000660F771F881FDAF7880F9695879597F9AB
+:100460000895990F0008550FAA0BE0E8FEEF161645
+:100470001706E807F907C0F012161306E407F50798
+:1004800098F0621B730B840B950B39F40A2661F00C
+:10049000232B242B252B21F408950A2609F4A140AF
+:1004A000A6958FEF811D811D089597F99F6780E8BC
+:1004B00070E060E008959FEF80EC089500240A94B6
+:1004C0001616170618060906089500240A9412162F
+:1004D0001306140605060895092E0394000C11F462
+:1004E000882352F0BB0F40F4BF2B11F460FF04C00F
+:1004F0006F5F7F4F8F4F9F4F089557FD9058440F68
+:10050000551F59F05F3F71F04795880F97FB991F72
+:1005100061F09F3F79F0879508951216130614062F
+:10052000551FF2CF4695F1DF08C0161617061806BC
+:10053000991FF1CF86957105610508940895E89497
+:10054000BB2766277727CB0197F908950BD0C4CF37
+:10055000B5DF28F0BADF18F0952309F0A6CFABCFAE
+:100560001124EECFCADFA0F3959FD1F3950F50E091
+:10057000551F629FF001729FBB27F00DB11D639F55
+:10058000AA27F00DB11DAA1F649F6627B00DA11DFB
+:10059000661F829F2227B00DA11D621F739FB00DA1
+:1005A000A11D621F839FA00D611D221F749F332711
+:1005B000A00D611D231F849F600D211D822F762FAA
+:1005C0006A2F11249F5750408AF0E1F088234AF0A7
+:1005D000EE0FFF1FBB1F661F771F881F91505040F3
+:1005E000A9F79E3F510570F060CFAACF5F3FECF3B3
+:1005F000983EDCF3869577956795B795F795E795DF
+:100600009F5FC1F7FE2B880F911D9695879597F9EF
+:060610000895F894FFCFED
+:100616000000000001006F12033B00000000000014
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue_delay.sh b/tools/openmodelica/linux/MDD_build/led/led_blue_delay.sh new file mode 100644 index 0000000..53c7838 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue_delay.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_led_blue_delay.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_led_blue_delay.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections led_blue_delay_main.c -o led_blue_delay -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom led_blue_delay led_blue_delay.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:led_blue_delay.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue_delay_main.c b/tools/openmodelica/linux/MDD_build/led/led_blue_delay_main.c new file mode 100644 index 0000000..80930a6 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue_delay_main.c @@ -0,0 +1,212 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct led_blue_delay_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct led_blue_delay_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[3]; +} led_blue_delay_fmi2Component; + +led_blue_delay_fmi2Component led_blue_delay_component = { + .fmi2BooleanVars = { + fmi2True /*booleanExpression1._y*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component led_blue_delay_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &led_blue_delay_component; +} + +fmi2Status led_blue_delay_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status led_blue_delay_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + return fmi2OK; +} + +fmi2Status led_blue_delay_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status led_blue_delay_functionODE(fmi2Component comp) +{ +} + +static fmi2Status led_blue_delay_functionOutputs(fmi2Component comp) +{ + comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */ = (comp->currentTime)<(5.0); /* equation 3 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */); +} + +fmi2Status led_blue_delay_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + led_blue_delay_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = led_blue_delay_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + led_blue_delay_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + led_blue_delay_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + led_blue_delay_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = led_blue_delay_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue_main.c b/tools/openmodelica/linux/MDD_build/led/led_blue_main.c new file mode 100644 index 0000000..048f6c8 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue_main.c @@ -0,0 +1,212 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct led_blue_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct led_blue_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[3]; +} led_blue_fmi2Component; + +led_blue_fmi2Component led_blue_component = { + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component led_blue_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &led_blue_component; +} + +fmi2Status led_blue_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status led_blue_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + return fmi2OK; +} + +fmi2Status led_blue_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status led_blue_functionODE(fmi2Component comp) +{ +} + +static fmi2Status led_blue_functionOutputs(fmi2Component comp) +{ + Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, fmi2True); +} + +fmi2Status led_blue_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + led_blue_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = led_blue_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + led_blue_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + led_blue_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + led_blue_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = led_blue_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue_new.sh b/tools/openmodelica/linux/MDD_build/led/led_blue_new.sh new file mode 100644 index 0000000..96f97e2 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue_new.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_led_blue.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_led_blue.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections led_blue_main.c -o led_blue -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom led_blue led_blue.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:led_blue.hex +if [ $? -ne 0 ]; then + exit 1 +fi diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue_new.sh~ b/tools/openmodelica/linux/MDD_build/led/led_blue_new.sh~ new file mode 100644 index 0000000..96f97e2 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue_new.sh~ @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_led_blue.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_led_blue.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections led_blue_main.c -o led_blue -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom led_blue led_blue.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:led_blue.hex +if [ $? -ne 0 ]; then + exit 1 +fi diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue_red b/tools/openmodelica/linux/MDD_build/led/led_blue_red Binary files differnew file mode 100644 index 0000000..a13b867 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue_red diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue_red.hex b/tools/openmodelica/linux/MDD_build/led/led_blue_red.hex new file mode 100644 index 0000000..2f6c931 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue_red.hex @@ -0,0 +1,106 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94340138
+:100020000C9451000C9451000C9451000C94030159
+:100030000C9451000C9451000C94D2000C9451007B
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E8E6F6E002C0EF
+:1000800005900D92A431B107D9F711E0A4E1B1E0D8
+:1000900001C01D92A931B107E1F70E9485010C94BE
+:1000A00032030C940000CF92DF92EF92FF920F93F5
+:1000B0001F93CF93DF93EC01C880D980EA80FB8047
+:1000C00001E010E020E030E040EA50E4C701B60172
+:1000D0000E94190287FD02C000E010E01D830C831E
+:1000E00001E010E020E030E040E051E4C701B6015B
+:1000F0000E94190287FD02C000E010E01F830E83FA
+:100100008A899B898230910561F08330910599F04D
+:100110000197C9F416BC80916E00826080936E00D6
+:1001200016C0109285001092840080916F0082604A
+:1001300080936F000CC01092B200809170008260BA
+:100140008093700004C081E090E00E9432037894B4
+:100150009FB7F894809116019FBF8823C9F310922E
+:100160001601EC85FD858C819D81892B19F080819C
+:10017000826002C080818D7F8083EE85FF858E81C5
+:100180009F81892B19F08081886002C08081877FE0
+:100190008083DF91CF911F910F91FF90EF90DF90BF
+:1001A000CF9008951F920F920FB60F9211242F93A4
+:1001B0003F938F939F938091140190911501019625
+:1001C000909315018093140180911601813091F074
+:1001D000209114013091150180911701909118011F
+:1001E0002817390738F081E0809316011092150125
+:1001F000109214019F918F913F912F910F900FBEFC
+:100200000F901F9018951F920F920FB60F92112406
+:100210002F933F938F939F93809114019091150199
+:1002200001969093150180931401809116018130FD
+:1002300091F0209114013091150180911701909156
+:1002400018012817390738F081E0809316011092C1
+:100250001501109214019F918F913F912F910F9052
+:100260000FBE0F901F9018951F920F920FB60F920E
+:1002700011242F933F938F939F938091140190911A
+:100280001501019690931501809314018091160138
+:10029000813091F020911401309115018091170166
+:1002A000909118012817390738F081E080931601E2
+:1002B00010921501109214019F918F913F912F91EF
+:1002C0000F900FBE0F901F901895FC01239A85E2A6
+:1002D00090E09787868725B5236025BD21E030E033
+:1002E000318B208B42E050E050931801409317016E
+:1002F00044B5426044BD49EF47BD338B228B219A00
+:100300009587848780E090E00895CF92DF92EF9206
+:10031000FF9280E091E00E946501C12CD12C760112
+:1003200060E070E0CB016093000170930101809365
+:1003300002019093030180E091E00E9453008FEF4F
+:10034000C81AD80AE80AF80AC701B6010E941D02B5
+:100350002FE632E143E05BE30E94CF0220E030E091
+:10036000A9010E94B501DFCF5058BB27AA270ED0A4
+:10037000DCC0CDD030F0D2D020F031F49F3F11F46A
+:100380001EF4C2C00EF4E095E7FBB8C0E92FDED042
+:1003900080F3BA17620773078407950718F071F4A2
+:1003A0009EF5F6C00EF4E0950B2EBA2FA02D0B0192
+:1003B000B90190010C01CA01A0011124FF27591BAA
+:1003C00099F0593F50F4503E68F11A16F040A22FB0
+:1003D000232F342F4427585FF3CF46953795279521
+:1003E000A795F0405395C9F77EF41F16BA0B620B20
+:1003F000730B840BBAF09150A1F0FF0FBB1F661F67
+:10040000771F881FC2F70EC0BA0F621F731F841FA9
+:1004100048F4879577956795B795F7959E3F08F0CF
+:10042000B3CF9395880F08F09927EE0F979587958E
+:10043000089540D008F481E00895E89409C097FB3E
+:100440003EF490958095709561957F4F8F4F9F4FAB
+:100450009923A9F0F92F96E9BB279395F6958795EF
+:1004600077956795B795F111F8CFFAF4BB0F11F4B2
+:1004700060FF1BC06F5F7F4F8F4F9F4F16C0882359
+:1004800011F096E911C0772321F09EE8872F762F8F
+:1004900005C0662371F096E8862F70E060E02AF0D0
+:1004A0009A95660F771F881FDAF7880F96958795BC
+:1004B00097F90895990F0008550FAA0BE0E8FEEF91
+:1004C00016161706E807F907C0F012161306E40718
+:1004D000F50798F0621B730B840B950B39F40A2611
+:1004E00061F0232B242B252B21F408950A2609F4EF
+:1004F000A140A6958FEF811D811D089597F99F67F3
+:1005000080E870E060E008959FEF80EC089500249B
+:100510000A941616170618060906089500240A9468
+:1005200012161306140605060895092E0394000CEE
+:1005300011F4882352F0BB0F40F4BF2B11F460FF7D
+:1005400004C06F5F7F4F8F4F9F4F089557FD9058A6
+:10055000440F551F59F05F3F71F04795880F97FB87
+:10056000991F61F09F3F79F0879508951216130641
+:100570001406551FF2CF4695F1DF08C01616170670
+:100580001806991FF1CF86957105610508940895A5
+:10059000E894BB2766277727CB0197F908950BD0FE
+:1005A000C4CFB5DF28F0BADF18F0952309F0A6CF45
+:1005B000ABCF1124EECFCADFA0F3959FD1F3950FF7
+:1005C00050E0551F629FF001729FBB27F00DB11DD7
+:1005D000639FAA27F00DB11DAA1F649F6627B00D67
+:1005E000A11D661F829F2227B00DA11D621F739F50
+:1005F000B00DA11D621F839FA00D611D221F749F5E
+:100600003327A00D611D231F849F600D211D822FA4
+:10061000762F6A2F11249F5750408AF0E1F08823EB
+:100620004AF0EE0FFF1FBB1F661F771F881F9150F8
+:100630005040A9F79E3F510570F060CFAACF5F3FB1
+:10064000ECF3983EDCF3869577956795B795F7952B
+:10065000E7959F5FC1F7FE2B880F911D96958795B3
+:0806600097F90895F894FFCF0B
+:1006680000000000010001006F12033B00000000C1
+:04067800000000007E
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue_red.sh b/tools/openmodelica/linux/MDD_build/led/led_blue_red.sh new file mode 100644 index 0000000..7de1e2c --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue_red.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_led_blue_red.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_led_blue_red.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections led_blue_red_main.c -o led_blue_red -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom led_blue_red led_blue_red.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:led_blue_red.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/led/led_blue_red_main.c b/tools/openmodelica/linux/MDD_build/led/led_blue_red_main.c new file mode 100644 index 0000000..c9668e8 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_blue_red_main.c @@ -0,0 +1,215 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct led_blue_red_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct led_blue_red_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[2]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[4]; +} led_blue_red_fmi2Component; + +led_blue_red_fmi2Component led_blue_red_component = { + .fmi2BooleanVars = { + fmi2True /*booleanExpression1._y*/, + fmi2True /*booleanExpression2._y*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component led_blue_red_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &led_blue_red_component; +} + +fmi2Status led_blue_red_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status led_blue_red_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[1] /* digitalWriteBoolean2._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 4); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + return fmi2OK; +} + +fmi2Status led_blue_red_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status led_blue_red_functionODE(fmi2Component comp) +{ +} + +static fmi2Status led_blue_red_functionOutputs(fmi2Component comp) +{ + comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */ = (comp->currentTime)<(5.0); /* equation 4 */ + comp->fmi2BooleanVars[1] /* booleanExpression2._y DISCRETE */ = (comp->currentTime)<(8.0); /* equation 5 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean2._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 4, comp->fmi2BooleanVars[1] /* booleanExpression2._y DISCRETE */); +} + +fmi2Status led_blue_red_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + led_blue_red_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = led_blue_red_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + led_blue_red_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + led_blue_red_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + led_blue_red_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = led_blue_red_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/led/led_green_blink b/tools/openmodelica/linux/MDD_build/led/led_green_blink Binary files differnew file mode 100644 index 0000000..e71feb7 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_green_blink diff --git a/tools/openmodelica/linux/MDD_build/led/led_green_blink.hex b/tools/openmodelica/linux/MDD_build/led/led_green_blink.hex new file mode 100644 index 0000000..1c34b59 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_green_blink.hex @@ -0,0 +1,127 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C942C0140
+:100020000C9451000C9451000C9451000C94FB0062
+:100030000C9451000C9451000C94CA000C94510083
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E8ECF7E002C0E8
+:1000800005900D92A031B107D9F711E0A0E1B1E0E0
+:1000900001C01D92A531B107E1F70E947A010C94CD
+:1000A000E2030C940000CF92DF92EF92FF920F9345
+:1000B0001F93CF93DF93EC01C880D980EA80FB8047
+:1000C0002DEC3CEC4CE45EE3C701B6010E940E024D
+:1000D0000E94B3022DEC3CEC4CE45EE30E945B0317
+:1000E0009B01AC01C701B6010E94A90101E010E02B
+:1000F0002DEC3CEC4CEC5DE30E94570387FF02C003
+:1001000000E010E01D830C838E859F858230910571
+:1001100061F08330910599F00197C9F416BC809184
+:100120006E00826080936E0016C01092850010925F
+:10013000840080916F00826080936F000CC01092E9
+:10014000B2008091700082608093700004C081E0F2
+:1001500090E00E94E20378949FB7F8948091120196
+:100160009FBF8823C9F310921201EA85FB858C8119
+:100170009D81892B19F08081826002C080818D7FF2
+:100180008083DF91CF911F910F91FF90EF90DF90CF
+:10019000CF9008951F920F920FB60F9211242F93B4
+:1001A0003F938F939F93809110019091110101963D
+:1001B000909311018093100180911201813091F090
+:1001C000209110013091110180911301909114013F
+:1001D0002817390738F081E080931201109211013D
+:1001E000109210019F918F913F912F910F900FBE10
+:1001F0000F901F9018951F920F920FB60F92112417
+:100200002F933F938F939F938091100190911101B1
+:100210000196909311018093100180911201813019
+:1002200091F0209110013091110180911301909172
+:1002300014012817390738F081E0809312011092D9
+:100240001101109210019F918F913F912F910F906A
+:100250000FBE0F901F9018951F920F920FB60F921E
+:1002600011242F933F938F939F938091100190912E
+:100270001101019690931101809310018091120158
+:10028000813091F020911001309111018091130182
+:10029000909114012817390738F081E080931201FA
+:1002A00010921101109210019F918F913F912F9107
+:1002B0000F900FBE0F901F901895FC0185B58360BD
+:1002C00085BD81E090E09587848722E030E030931F
+:1002D00014012093130124B5226024BD29EF27BD0A
+:1002E00097878687219A85E290E09387828780E0CE
+:1002F00090E00895CF92DF92EF92FF9280E091E03C
+:100300000E945D01C12CD12C760160E070E0CB0130
+:1003100060930001709301018093020190930301A7
+:1003200080E091E00E9453008FEFC81AD80AE80AD3
+:10033000F80AC701B6010E9476022FE632E143E0D7
+:100340005BE30E945B0320E030E0A9010E94AA0168
+:10035000DFCF5058BB27AA270ED058C149D130F063
+:100360004ED120F031F49F3F11F41EF43EC10EF443
+:10037000E095E7FB0BC1E92F5AD180F3BA1762076A
+:1003800073078407950718F071F49EF589C10EF480
+:10039000E0950B2EBA2FA02D0B01B90190010C0195
+:1003A000CA01A0011124FF27591B99F0593F50F4AD
+:1003B000503E68F11A16F040A22F232F342F442705
+:1003C000585FF3CF469537952795A795F0405395FD
+:1003D000C9F77EF41F16BA0B620B730B840BBAF0CD
+:1003E0009150A1F0FF0FBB1F661F771F881FC2F738
+:1003F0000EC0BA0F621F731F841F48F4879577954C
+:100400006795B795F7959E3F08F0B3CF9395880F02
+:1004100008F09927EE0F9795879508950CD0F6C0B0
+:10042000EED040F0E5D030F021F45F3F19F0AEC0DF
+:10043000511137C1DAC0FBD098F39923C9F3552382
+:10044000B1F3951B550BBB27AA27621773078407C7
+:1004500038F09F5F5F4F220F331F441FAA1FA9F37D
+:1004600033D00E2E3AF0E0E830D091505040E6956F
+:10047000001CCAF729D0FE2F27D0660F771F881FD0
+:10048000BB1F261737074807AB07B0E809F0BB0BBF
+:10049000802DBF01FF2793585F4F2AF09E3F5105E3
+:1004A00068F074C0FEC05F3FECF3983EDCF38695C5
+:1004B00077956795B795F7959F5FC9F7880F911D59
+:1004C0009695879597F90895E1E0660F771F881F45
+:1004D000BB1F621773078407BA0720F0621B730BF8
+:1004E000840BBA0BEE1F88F7E0950895E89409C0D5
+:1004F00097FB3EF490958095709561957F4F8F4F57
+:100500009F4F9923A9F0F92F96E9BB279395F6956C
+:10051000879577956795B795F111F8CFFAF4BB0FEA
+:1005200011F460FF1BC06F5F7F4F8F4F9F4F16C04E
+:10053000882311F096E911C0772321F09EE8872FD8
+:10054000762F05C0662371F096E8862F70E060E094
+:100550002AF09A95660F771F881FDAF7880F96950D
+:10056000879597F9089585D080F09F3740F49111D1
+:100570000EF097C060E070E080E89FEB089526F4ED
+:100580001B16611D711D811D07C021C097F99F6752
+:1005900080E870E060E00895882371F4772321F00B
+:1005A0009850872B762F07C0662311F499270DC02A
+:1005B0009051862B70E060E02AF09A95660F771FC5
+:1005C000881FDAF7880F9695879597F908959F3FCA
+:1005D00031F0915020F4879577956795B795880FFE
+:1005E000911D9695879597F908959FEF80EC089552
+:1005F00000240A9416161706180609060895002402
+:100600000A9412161306140605060895092E03947B
+:10061000000C11F4882352F0BB0F40F4BF2B11F4EF
+:1006200060FF04C06F5F7F4F8F4F9F4F089557FD4E
+:100630009058440F551F59F05F3F71F04795880F50
+:1006400097FB991F61F09F3F79F0879508951216E7
+:1006500013061406551FF2CF4695F1DF08C0161693
+:1006600017061806991FF1CF869571056105089444
+:100670000895E5DFA0F0BEE7B91788F4BB279F38DF
+:1006800060F41616B11D672F782F8827985FF7CF73
+:10069000869577956795B11D93959639C8F308951A
+:1006A000E894BB2766277727CB0197F9089566D092
+:1006B00008F48FEF08950BD0A9CF9ADF28F09FDFC1
+:1006C00018F0952309F062CF90CF1124EACFAFDF65
+:1006D000A0F3959FD1F3950F50E0551F629FF00155
+:1006E000729FBB27F00DB11D639FAA27F00DB11DAE
+:1006F000AA1F649F6627B00DA11D661F829F222737
+:10070000B00DA11D621F739FB00DA11D621F839FBD
+:10071000A00D611D221F749F3327A00D611D231F93
+:10072000849F600D211D822F762F6A2F11249F57E1
+:1007300050408AF0E1F088234AF0EE0FFF1FBB1F04
+:10074000661F771F881F91505040A9F79E3F5105A3
+:1007500070F01CCFA6CF5F3FECF3983EDCF386959C
+:1007600077956795B795F795E7959F5FC1F7FE2B4E
+:10077000880F911D9695879597F90895990F000810
+:10078000550FAA0BE0E8FEEF16161706E807F90763
+:10079000C0F012161306E407F50798F0621B730BFE
+:1007A000840B950B39F40A2661F0232B242B252B7F
+:1007B00021F408950A2609F4A140A6958FEF811D22
+:0807C000811D0895F894FFCF9C
+:1007C8000000000000006F12033B00000000000062
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/led/led_green_blink.sh b/tools/openmodelica/linux/MDD_build/led/led_green_blink.sh new file mode 100644 index 0000000..a30543c --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_green_blink.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_led_green_blink.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_led_green_blink.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections led_green_blink_main.c -o led_green_blink -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom led_green_blink led_green_blink.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:led_green_blink.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/led/led_green_blink_main.c b/tools/openmodelica/linux/MDD_build/led/led_green_blink_main.c new file mode 100644 index 0000000..5999083 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/led_green_blink_main.c @@ -0,0 +1,212 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct led_green_blink_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct led_green_blink_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[3]; +} led_green_blink_fmi2Component; + +led_green_blink_fmi2Component led_green_blink_component = { + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component led_green_blink_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &led_green_blink_component; +} + +fmi2Status led_green_blink_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status led_green_blink_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + return fmi2OK; +} + +fmi2Status led_green_blink_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status led_green_blink_functionODE(fmi2Component comp) +{ +} + +static fmi2Status led_green_blink_functionOutputs(fmi2Component comp) +{ + comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */ = (om_mod(comp->currentTime,0.2))>=(0.1); /* equation 3 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */); +} + +fmi2Status led_green_blink_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + led_green_blink_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = led_green_blink_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + led_green_blink_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + led_green_blink_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + led_green_blink_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = led_green_blink_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/led/runMDD_led_blink.mos b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blink.mos new file mode 100644 index 0000000..53c008c --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blink.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/sumeet/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/sumeet/MDD_Arduino/linux-version-4/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_blink, fileNamePrefix="led_blink"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/led/runMDD_led_blink.mos~ b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blink.mos~ new file mode 100644 index 0000000..1e58f73 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blink.mos~ @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/sumeet/MDD_Arduino/linux-version-4/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_blink, fileNamePrefix="led_blink"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue.mos b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue.mos new file mode 100644 index 0000000..b845042 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/manas/Documents/OpenModelica-HIL/ModelPlugin-openmodelica/OpenModelicaEmbedded/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/manas/Documents/OpenModelica-HIL/ModelPlugin-openmodelica/OpenModelicaEmbedded/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_blue, fileNamePrefix="led_blue"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue.mos~ b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue.mos~ new file mode 100644 index 0000000..d931832 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue.mos~ @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/sumeet/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/sumeet/MDD_Arduino/linux-version-4/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_blue, fileNamePrefix="led_blue"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue_delay.mos b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue_delay.mos new file mode 100644 index 0000000..62b9250 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue_delay.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_blue_delay, fileNamePrefix="led_blue_delay"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue_red.mos b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue_red.mos new file mode 100644 index 0000000..f60dfc6 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/runMDD_led_blue_red.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_blue_red, fileNamePrefix="led_blue_red"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/led/runMDD_led_green_blink.mos b/tools/openmodelica/linux/MDD_build/led/runMDD_led_green_blink.mos new file mode 100644 index 0000000..eeb79c1 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/runMDD_led_green_blink.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_green_blink, fileNamePrefix="led_green_blink"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/led/runMDD_traffic_light.mos b/tools/openmodelica/linux/MDD_build/led/runMDD_traffic_light.mos new file mode 100644 index 0000000..a793656 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/runMDD_traffic_light.mos @@ -0,0 +1,13 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/manas/Documents/OpenModelica-HIL/ModelPlugin-openmodelica/OpenModelicaEmbedded/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/manas/Documents/OpenModelica-HIL/ModelPlugin-openmodelica/OpenModelicaEmbedded/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); + +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_traffic_light, fileNamePrefix="traffic_light"); + +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/led/runMDD_traffic_light.mos~ b/tools/openmodelica/linux/MDD_build/led/runMDD_traffic_light.mos~ new file mode 100644 index 0000000..7c13575 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/runMDD_traffic_light.mos~ @@ -0,0 +1,13 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/manas/Documents/OpenModelica-HIL/ModelPlugin-openmodelica/OpenModelicaEmbedded/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/manas/Documents/OpenModelica-HIL/ModelPlugin-openmodelica/OpenModelicaEmbedded/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); + +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_blue, fileNamePrefix="traffic_light"); + +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/led/traffic_light b/tools/openmodelica/linux/MDD_build/led/traffic_light Binary files differnew file mode 100755 index 0000000..9264466 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/traffic_light diff --git a/tools/openmodelica/linux/MDD_build/led/traffic_light_main.c b/tools/openmodelica/linux/MDD_build/led/traffic_light_main.c new file mode 100644 index 0000000..9577e23 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/led/traffic_light_main.c @@ -0,0 +1,212 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct traffic_light_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct traffic_light_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[3]; +} traffic_light_fmi2Component; + +traffic_light_fmi2Component traffic_light_component = { + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component traffic_light_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &traffic_light_component; +} + +fmi2Status traffic_light_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status traffic_light_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 1, 5); + comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 4, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 1); + return fmi2OK; +} + +fmi2Status traffic_light_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status traffic_light_functionODE(fmi2Component comp) +{ +} + +static fmi2Status traffic_light_functionOutputs(fmi2Component comp) +{ + Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 5, fmi2True); +} + +fmi2Status traffic_light_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + traffic_light_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = traffic_light_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + traffic_light_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + traffic_light_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + traffic_light_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = traffic_light_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/pot/pot_threshold b/tools/openmodelica/linux/MDD_build/pot/pot_threshold Binary files differnew file mode 100644 index 0000000..3a53c95 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/pot/pot_threshold diff --git a/tools/openmodelica/linux/MDD_build/pot/pot_threshold.hex b/tools/openmodelica/linux/MDD_build/pot/pot_threshold.hex new file mode 100644 index 0000000..4c24433 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/pot/pot_threshold.hex @@ -0,0 +1,157 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94170254
+:100020000C9451000C9451000C9451000C94E60176
+:100030000C9451000C9451000C94B5010C94510097
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0EAE5F9E002C0EB
+:1000800005900D92A235B107D9F711E0A2E5B1E0D4
+:1000900001C01D92A735B107E1F70E9488020C94B8
+:1000A000AB040C94000080917C00857E826080937C
+:1000B0007C0080917A00806480937A0080917A003D
+:1000C00086FDFCCF809178009091790008954F9241
+:1000D0005F926F927F928F929F92AF92BF92CF92D8
+:1000E000DF92EF92FF920F931F93CF93DF938C01D8
+:1000F0000E94530060E080E090E00E949D040E9416
+:100100005300BC0180E090E00E94840320E030E0D6
+:1001100040E854E40E94160420E030EC4FE754E439
+:100120000E941C034B015C01D80114966D937D93D2
+:100130008D939C931797C1E0D0E0D4962D913D917B
+:100140004D915C91D7970E94120487FF02C0C0E0D6
+:10015000D0E0F801D3A7C2A7CD2B39F0412C512C08
+:1001600090E8692E9FE3792E03C0412C512C320177
+:10017000D8011C964D925D926D927C921F97C1E0C2
+:10018000D0E0D8962D913D914D915C91DB97C301C4
+:10019000B2010E94120487FF02C0C0E0D0E0F80163
+:1001A000D5A3C4A3C1E0D0E020A931A942A953A995
+:1001B000C501B4010E94120487FF02C0C0E0D0E074
+:1001C000D8019996DC93CE939897CD2B39F0C12C1A
+:1001D000D12C80E8E82E8FE3F82E03C0C12CD12C5F
+:1001E0007601F801C086D186E286F386C1E0D0E0D0
+:1001F000A3019201C701B6010E941204181614F05F
+:10020000C0E0D0E0D8019396DC93CE939297C1E002
+:10021000D0E09C962D913D914D915C919F97C501A9
+:10022000B4010E94120487FF02C0C0E0D0E0F801D0
+:10023000D7A3C6A3CD2B29F060E070E080E89FE350
+:1002400003C060E070E0CB01D80150966D937D93C0
+:100250008D939C935397C1E0D0E0A70196010E9433
+:100260001204181614F0C0E0D0E0F801D1A3C0A326
+:10027000E05BFF4F808191818230910561F0833096
+:10028000910599F00197C9F416BC80916E008260C7
+:1002900080936E0016C010928500109284008091A9
+:1002A0006F00826080936F000CC01092B20080914A
+:1002B000700082608093700004C081E090E00E9432
+:1002C000AB0478949FB7F894809154019FBF882322
+:1002D000C9F310925401F801E85BFF4F0190F081DF
+:1002E000E02DD80190968D919C919197892B19F0D2
+:1002F0008081826002C080818D7F8083F801E65B0F
+:10030000FF4F0190F081E02DD80192968D919C9144
+:100310009397892B19F08081846002C080818B7F44
+:100320008083F801E45BFF4F0190F081E02DD8015C
+:1003300094968D919C919597892B19F08081886076
+:1003400002C08081877F8083DF91CF911F910F91C1
+:10035000FF90EF90DF90CF90BF90AF909F908F90E5
+:100360007F906F905F904F9008951F920F920FB6FD
+:100370000F9211242F933F938F939F93809152015B
+:100380009091530101969093530180935201809173
+:100390005401813091F020915201309153018091AC
+:1003A0005501909156012817390738F081E0809364
+:1003B000540110925301109252019F918F913F91DD
+:1003C0002F910F900FBE0F901F9018951F920F92B4
+:1003D0000FB60F9211242F933F938F939F93809189
+:1003E00052019091530101969093530180935201D1
+:1003F00080915401813091F020915201309153014C
+:1004000080915501909156012817390738F081E005
+:100410008093540110925301109252019F918F9139
+:100420003F912F910F900FBE0F901F9018951F9224
+:100430000F920FB60F9211242F933F938F939F9398
+:1004400080915201909153010196909353018093B2
+:10045000520180915401813091F0209152013091EC
+:10046000530180915501909156012817390738F0B2
+:1004700081E08093540110925301109252019F9198
+:100480008F913F912F910F900FBE0F901F90189555
+:10049000ECE7F0E02081206C2083EAE7F0E02081A7
+:1004A00027682083FC01EA5BFF4F11821082239AA8
+:1004B000FC01E45BFF4F25E230E031832083229A88
+:1004C000FC01E65BFF4F31832083219AFC01E85B4E
+:1004D000FF4F3183208325B5236025BDFC01E25BFE
+:1004E000FF4F21E030E03183208342E050E0509321
+:1004F00056014093550144B5426044BD49EF47BDA4
+:10050000FC01E05BFF4F3183208380E090E00895A1
+:10051000CF92DF92EF92FF9280E091E00E9448023A
+:10052000C12CD12C760160E070E0CB01609300011A
+:1005300070930101809302019093030180E091E0A8
+:100540000E9467008FEFC81AD80AE80AF80AC701A4
+:10055000B6010E9484032FE632E143E05BE30E9490
+:10056000160420E030E0A9010E94B802DFCF505805
+:10057000BB27AA270ED01CC10DD130F012D120F01C
+:1005800031F49F3F11F41EF402C10EF4E095E7FB35
+:10059000F8C0E92F1ED180F3BA17620773078407EA
+:1005A000950718F071F49EF536C10EF4E0950B2E08
+:1005B000BA2FA02D0B01B90190010C01CA01A001B5
+:1005C0001124FF27591B99F0593F50F4503E68F110
+:1005D0001A16F040A22F232F342F4427585FF3CF51
+:1005E000469537952795A795F0405395C9F77EF422
+:1005F0001F16BA0B620B730B840BBAF09150A1F06B
+:10060000FF0FBB1F661F771F881FC2F70EC0BA0FF0
+:10061000621F731F841F48F4879577956795B79578
+:10062000F7959E3F08F0B3CF9395880F08F0992770
+:10063000EE0F9795879508950CD0BAC0B2D040F0D0
+:10064000A9D030F021F45F3F19F09BC05111E4C0F4
+:100650009EC0BFD098F39923C9F35523B1F3951BDE
+:10066000550BBB27AA2762177307840738F09F5FD3
+:100670005F4F220F331F441FAA1FA9F333D00E2E42
+:100680003AF0E0E830D091505040E695001CCAF7AF
+:1006900029D0FE2F27D0660F771F881FBB1F261774
+:1006A00037074807AB07B0E809F0BB0B802DBF0147
+:1006B000FF2793585F4F2AF09E3F510568F061C0B5
+:1006C000ABC05F3FECF3983EDCF38695779567957A
+:1006D000B795F7959F5FC9F7880F911D96958795F8
+:1006E00097F90895E1E0660F771F881FBB1F621717
+:1006F00073078407BA0720F0621B730B840BBA0BD5
+:10070000EE1F88F7E0950895E89409C097FB3EF442
+:1007100090958095709561957F4F8F4F9F4F99234E
+:10072000A9F0F92F96E9BB279395F69587957795CC
+:100730006795B795F111F8CFFAF4BB0F11F460FF8C
+:100740001BC06F5F7F4F8F4F9F4F16C0882311F0E4
+:1007500096E911C0772321F09EE8872F762F05C0F8
+:10076000662371F096E8862F70E060E02AF09A9593
+:10077000660F771F881FDAF7880F9695879597F988
+:10078000089597F99F6780E870E060E008959FEF13
+:1007900080EC089500240A94161617061806090618
+:1007A000089500240A9412161306140605060895E7
+:1007B000092E0394000C11F4882352F0BB0F40F46F
+:1007C000BF2B11F460FF04C06F5F7F4F8F4F9F4FAF
+:1007D000089557FD9058440F551F59F05F3F71F031
+:1007E0004795880F97FB991F61F09F3F79F0879598
+:1007F0000895121613061406551FF2CF4695F1DF21
+:1008000008C0161617061806991FF1CF86957105B0
+:10081000610508940895E894BB2766277727CB01E4
+:1008200097F9089566D008F48FEF08950BD0C0CFE4
+:10083000B1DF28F0B6DF18F0952309F0A2CFA7CFDB
+:100840001124EACFC6DFA0F3959FD1F3950F50E0B6
+:10085000551F629FF001729FBB27F00DB11D639F72
+:10086000AA27F00DB11DAA1F649F6627B00DA11D18
+:10087000661F829F2227B00DA11D621F739FB00DBE
+:10088000A11D621F839FA00D611D221F749F33272E
+:10089000A00D611D231F849F600D211D822F762FC7
+:1008A0006A2F11249F5750408AF0E1F088234AF0C4
+:1008B000EE0FFF1FBB1F661F771F881F9150504010
+:1008C000A9F79E3F510570F05CCFA6CF5F3FECF3D8
+:1008D000983EDCF3869577956795B795F795E795FC
+:1008E0009F5FC1F7FE2B880F911D9695879597F90D
+:1008F0000895990F0008550FAA0BE0E8FEEF1616B1
+:100900001706E807F907C0F012161306E407F50703
+:1009100098F0621B730B840B950B39F40A2661F077
+:10092000232B242B252B21F408950A2609F4A1401A
+:10093000A6958FEF811D811D0895262FF999FECF71
+:100940001FBA92BD81BD20BD0FB6F894FA9AF99AEC
+:0A0950000FBE01960895F894FFCF42
+:10095A00000000000000000000000000000000008D
+:10096A00000000000000000000000000000000007D
+:10097A00000000000000000000000000000000006D
+:10098A000000A043000061440000003F6F12033BD7
+:10099A000500010000000000000000000000000047
+:0209AA0000004B
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/pot/pot_threshold.sh b/tools/openmodelica/linux/MDD_build/pot/pot_threshold.sh new file mode 100644 index 0000000..515d97e --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/pot/pot_threshold.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_pot_threshold.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_pot_threshold.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections pot_threshold_main.c -o pot_threshold -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom pot_threshold pot_threshold.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:pot_threshold.hex +if [ $? -ne 0 ]; then + exit 1 +fi diff --git a/tools/openmodelica/linux/MDD_build/pot/pot_threshold.sh~ b/tools/openmodelica/linux/MDD_build/pot/pot_threshold.sh~ new file mode 100644 index 0000000..f669595 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/pot/pot_threshold.sh~ @@ -0,0 +1,63 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_pot_threshold.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_pot_threshold.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections pot_threshold_main.c -o pot_threshold -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom pot_threshold pot_threshold.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:pot_threshold.hex +if [ $? -ne 0 ]; then + exit 1 +fi + +plot(y) diff --git a/tools/openmodelica/linux/MDD_build/pot/pot_threshold_main.c b/tools/openmodelica/linux/MDD_build/pot/pot_threshold_main.c new file mode 100644 index 0000000..2e867ec --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/pot/pot_threshold_main.c @@ -0,0 +1,274 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct pot_threshold_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct pot_threshold_fmi2Component_s { + fmi2Real currentTime; + fmi2Real fmi2RealVars[7]; + fmi2Boolean fmi2BooleanVars[6]; + fmi2Real fmi2RealParameter[5]; + fmi2Integer fmi2IntegerParameter[1]; + fmi2Boolean fmi2BooleanParameter[1]; + fmi2String fmi2StringParameter[1]; + void* extObjs[6]; +} pot_threshold_fmi2Component; + +pot_threshold_fmi2Component pot_threshold_component = { + .fmi2RealVars = { + 0.0 /*adc._y*/, + 0.0 /*greater1._u1*/, + 0.0 /*greater1._u2*/, + 0.0 /*greater2._u1*/, + 0.0 /*realExpression1._y*/, + 0.0 /*realExpression2._y*/, + 0.0 /*realValue1._number*/, + }, + .fmi2BooleanVars = { + fmi2False /*digitalWriteBoolean1._u*/, + fmi2False /*digitalWriteBoolean2._u*/, + fmi2False /*digitalWriteBoolean3._u*/, + fmi2False /*greaterEqualThreshold1._y*/, + fmi2False /*greaterEqualThreshold2._y*/, + fmi2False /*greaterEqualThreshold3._y*/, + }, + .fmi2RealParameter = { + 0.0 /*greaterEqualThreshold1._threshold*/, + 320.0 /*greaterEqualThreshold2._threshold*/, + 900.0 /*greaterEqualThreshold3._threshold*/, + 0.5 /*realToBoolean1._threshold*/, + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, + .fmi2IntegerParameter = { + 5 /*realValue1._significantDigits*/, + }, + .fmi2BooleanParameter = { + fmi2True /*realValue1._use_numberPort*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +static const char * const OMCLIT0 = "ElectricPotential"; +static const char * const OMCLIT1 = "V"; +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" +#include "MDDAVRAnalog.h" + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution) +{ + fmi2Real om_value; + om_value = MDD_avr_analog_read(om_analogPort, om_vref, om_voltageResolution); + return om_value; +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage) +{ + void* om_avr; + om_avr = MDD_avr_analog_init(om_divisionFactor, om_referenceVoltage); + return om_avr; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr) +{ + MDD_avr_analog_close(om_avr); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component pot_threshold_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &pot_threshold_component; +} + +fmi2Status pot_threshold_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status pot_threshold_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* adc._analog EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Analog.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(comp, 7, 4); + comp->extObjs[3] /* digitalWriteBoolean3._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 4); + comp->extObjs[2] /* digitalWriteBoolean2._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 3); + comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + comp->extObjs[4] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[5] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[4] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + return fmi2OK; +} + +fmi2Status pot_threshold_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status pot_threshold_functionODE(fmi2Component comp) +{ +} + +static fmi2Status pot_threshold_functionOutputs(fmi2Component comp) +{ + comp->fmi2RealVars[0] /* adc._y variable */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(comp, 3, 1024.0, 10); /* equation 15 */ + comp->fmi2BooleanVars[5] /* greaterEqualThreshold3._y DISCRETE */ = (comp->fmi2RealVars[0] /* adc._y variable */)>=(comp->fmi2RealParameter[2] /* greaterEqualThreshold3._threshold PARAM */); /* equation 16 */ + comp->fmi2RealVars[2] /* greater1._u2 variable */ = (comp->fmi2BooleanVars[5] /* greaterEqualThreshold3._y DISCRETE */) ? (1.0) : (0.0); /* equation 17 */ + comp->fmi2BooleanVars[2] /* digitalWriteBoolean3._u DISCRETE */ = (comp->fmi2RealVars[2] /* greater1._u2 variable */)>=(comp->fmi2RealParameter[3] /* realToBoolean1._threshold PARAM */); /* equation 18 */ + comp->fmi2BooleanVars[4] /* greaterEqualThreshold2._y DISCRETE */ = (comp->fmi2RealVars[0] /* adc._y variable */)>=(comp->fmi2RealParameter[1] /* greaterEqualThreshold2._threshold PARAM */); /* equation 19 */ + comp->fmi2RealVars[1] /* greater1._u1 variable */ = (comp->fmi2BooleanVars[4] /* greaterEqualThreshold2._y DISCRETE */) ? (1.0) : (0.0); /* equation 20 */ + comp->fmi2BooleanVars[1] /* digitalWriteBoolean2._u DISCRETE */ = (comp->fmi2RealVars[1] /* greater1._u1 variable */)>(comp->fmi2RealVars[2] /* greater1._u2 variable */); /* equation 21 */ + comp->fmi2BooleanVars[3] /* greaterEqualThreshold1._y DISCRETE */ = (comp->fmi2RealVars[0] /* adc._y variable */)>=(comp->fmi2RealParameter[0] /* greaterEqualThreshold1._threshold PARAM */); /* equation 22 */ + comp->fmi2RealVars[3] /* greater2._u1 variable */ = (comp->fmi2BooleanVars[3] /* greaterEqualThreshold1._y DISCRETE */) ? (1.0) : (0.0); /* equation 23 */ + comp->fmi2BooleanVars[0] /* digitalWriteBoolean1._u DISCRETE */ = (comp->fmi2RealVars[3] /* greater2._u1 variable */)>(comp->fmi2RealVars[1] /* greater1._u1 variable */); /* equation 24 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[5] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, comp->fmi2BooleanVars[0] /* digitalWriteBoolean1._u DISCRETE */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[2] /* digitalWriteBoolean2._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 3, comp->fmi2BooleanVars[1] /* digitalWriteBoolean2._u DISCRETE */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[3] /* digitalWriteBoolean3._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 4, comp->fmi2BooleanVars[2] /* digitalWriteBoolean3._u DISCRETE */); +} + +fmi2Status pot_threshold_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + pot_threshold_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = pot_threshold_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + pot_threshold_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + pot_threshold_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + pot_threshold_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = pot_threshold_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/pot/runMDD_pot_threshold.mos b/tools/openmodelica/linux/MDD_build/pot/runMDD_pot_threshold.mos new file mode 100644 index 0000000..f347b0c --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/pot/runMDD_pot_threshold.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/sumeet/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/sumeet/MDD_Arduino/linux-version-4/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_pot.MDD_pot_threshold, fileNamePrefix="pot_threshold"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/pot/runMDD_pot_threshold.mos~ b/tools/openmodelica/linux/MDD_build/pot/runMDD_pot_threshold.mos~ new file mode 100644 index 0000000..98cc2cc --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/pot/runMDD_pot_threshold.mos~ @@ -0,0 +1,14 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/sumeet/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/sumeet/MDD_Arduino/linux-version-4/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_pot.MDD_pot_threshold, fileNamePrefix="pot_threshold"); +getErrorString(); + +simulate(pot_threshold, outputFormat="csv", startTime=0, stopTime=4, numberOfIntervals=5) +plot(y) diff --git a/tools/openmodelica/linux/MDD_build/push/led_push_button b/tools/openmodelica/linux/MDD_build/push/led_push_button Binary files differnew file mode 100644 index 0000000..976f017 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/led_push_button diff --git a/tools/openmodelica/linux/MDD_build/push/led_push_button.hex b/tools/openmodelica/linux/MDD_build/push/led_push_button.hex new file mode 100644 index 0000000..a35b0ab --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/led_push_button.hex @@ -0,0 +1,94 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94FC0071
+:100020000C9451000C9451000C9451000C94CB0092
+:100030000C9451000C9451000C949A000C945100B3
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0ECEAF5E002C0E8
+:1000800005900D92A631B107D9F711E0A6E1B1E0D4
+:1000900001C01D92AB31B107E1F70E944F010C94F2
+:1000A000D4020C940000FC01A685B7858C91829542
+:1000B000817080871186848995898230910561F0ED
+:1000C0008330910599F00197C9F416BC80916E00B8
+:1000D000826080936E0016C010928500109284009A
+:1000E00080916F00826080936F000CC01092B2000C
+:1000F0008091700082608093700004C081E090E085
+:100100000E94D40278949FB7F894809118019FBF01
+:100110008823C9F310921801A089B189808591853F
+:10012000009721F08C9182608C9308958C918D7F43
+:100130008C9308951F920F920FB60F9211242F9354
+:100140003F938F939F938091160190911701019691
+:10015000909317018093160180911801813091F0DE
+:1001600020911601309117018091190190911A0187
+:100170002817390738F081E0809318011092170191
+:10018000109216019F918F913F912F910F900FBE6A
+:100190000F901F9018951F920F920FB60F92112477
+:1001A0002F933F938F939F93809116019091170106
+:1001B0000196909317018093160180911801813068
+:1001C00091F02091160130911701809119019091C1
+:1001D0001A012817390738F081E08093180110922E
+:1001E0001701109216019F918F913F912F910F90BF
+:1001F0000FBE0F901F9018951F920F920FB60F927F
+:1002000011242F933F938F939F9380911601909188
+:1002100017010196909317018093160180911801A0
+:10022000813091F0209116013091170180911901D0
+:1002300090911A012817390738F081E0809318014E
+:1002400010921701109216019F918F913F912F915B
+:100250000F900FBE0F901F901895FC01219A85E218
+:1002600090E0918B808B249883E290E0978786873B
+:1002700085B5836085BD81E090E0938B828B22E021
+:1002800030E030931A012093190124B5226024BD77
+:1002900029EF27BD958B848B80E090E00895CF9265
+:1002A000DF92EF92FF9280E091E00E942D01C12C3D
+:1002B000D12C760160E070E0CB0160930001709377
+:1002C0000101809302019093030180E091E00E947C
+:1002D00053008FEFC81AD80AE80AF80AC701B60116
+:1002E0000E94E3012FE632E143E05BE30E947102EA
+:1002F00020E030E0A9010E947F01DFCF5058BB27EA
+:10030000AA270ED0B4C0A5D030F0AAD020F031F486
+:100310009F3F11F41EF49AC00EF4E095E7FB90C0E5
+:10032000E92FB6D080F3BA176207730784079507E1
+:1003300018F071F49EF5CEC00EF4E0950B2EBA2F96
+:10034000A02D0B01B90190010C01CA01A0011124DB
+:10035000FF27591B99F0593F50F4503E68F11A1687
+:10036000F040A22F232F342F4427585FF3CF469518
+:1003700037952795A795F0405395C9F77EF41F163A
+:10038000BA0B620B730B840BBAF09150A1F0FF0F04
+:10039000BB1F661F771F881FC2F70EC0BA0F621FF0
+:1003A000731F841F48F4879577956795B795F795E0
+:1003B0009E3F08F0B3CF9395880F08F09927EE0F72
+:1003C000979587950895E89409C097FB3EF490951A
+:1003D0008095709561957F4F8F4F9F4F9923A9F01E
+:1003E000F92F96E9BB279395F695879577956795AD
+:1003F000B795F111F8CFFAF4BB0F11F460FF1BC0F1
+:100400006F5F7F4F8F4F9F4F16C0882311F096E983
+:1004100011C0772321F09EE8872F762F05C0662331
+:1004200071F096E8862F70E060E02AF09A95660FEA
+:10043000771F881FDAF7880F9695879597F90895A3
+:1004400097F99F6780E870E060E008959FEF80EC87
+:10045000089500240A94161617061806090608952A
+:1004600000240A9412161306140605060895092E90
+:100470000394000C11F4882352F0BB0F40F4BF2BFF
+:1004800011F460FF04C06F5F7F4F8F4F9F4F08953F
+:1004900057FD9058440F551F59F05F3F71F0479535
+:1004A000880F97FB991F61F09F3F79F0879508951A
+:1004B000121613061406551FF2CF4695F1DF08C039
+:1004C000161617061806991FF1CF86957105610556
+:1004D00008940895E894BB2766277727CB0197F9FE
+:1004E00008950BD0C4CFB5DF28F0BADF18F09523FC
+:1004F00009F0A6CFABCF1124EECFCADFA0F3959FB2
+:10050000D1F3950F50E0551F629FF001729FBB27FA
+:10051000F00DB11D639FAA27F00DB11DAA1F649FA6
+:100520006627B00DA11D661F829F2227B00DA11D59
+:10053000621F739FB00DA11D621F839FA00D611DDF
+:10054000221F749F3327A00D611D231F849F600D00
+:10055000211D822F762F6A2F11249F5750408AF039
+:10056000E1F088234AF0EE0FFF1FBB1F661F771FC5
+:10057000881F91505040A9F79E3F510570F060CF01
+:10058000AACF5F3FECF3983EDCF3869577956795AD
+:10059000B795F795E7959F5FC1F7FE2B880F911DE3
+:0C05A0009695879597F90895F894FFCF81
+:1005AC00000000000000000000006F12033B000080
+:0605BC0000000000000039
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/push/led_push_button.sh b/tools/openmodelica/linux/MDD_build/push/led_push_button.sh new file mode 100644 index 0000000..2676f10 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/led_push_button.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_led_push_button.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_led_push_button.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections led_push_button_main.c -o led_push_button -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom led_push_button led_push_button.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:led_push_button.hex +if [ $? -ne 0 ]; then + exit 1 +fi diff --git a/tools/openmodelica/linux/MDD_build/push/led_push_button.sh~ b/tools/openmodelica/linux/MDD_build/push/led_push_button.sh~ new file mode 100644 index 0000000..1428171 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/led_push_button.sh~ @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_led_push_button.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_led_push_button.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections led_push_button_main.c -o led_push_button -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom led_push_button led_push_button.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:led_push_button.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/push/led_push_button_main.c b/tools/openmodelica/linux/MDD_build/push/led_push_button_main.c new file mode 100644 index 0000000..0a380fc --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/led_push_button_main.c @@ -0,0 +1,235 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct led_push_button_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct led_push_button_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[3]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[4]; +} led_push_button_fmi2Component; + +led_push_button_fmi2Component led_push_button_component = { + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + fmi2False /*booleanExpression2._y*/, + fmi2False /*digitalReadBoolean1._y*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline fmi2Boolean Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_read(fmi2Component comp, void* om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_destructor(fmi2Component comp, void* om_digital); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Boolean Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_read(fmi2Component comp, void* om_port, fmi2Integer om_pin) +{ + fmi2Boolean om_b; + om_b = MDD_avr_digital_pin_read(om_port, om_pin); + return om_b; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2False); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component led_push_button_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &led_push_button_component; +} + +fmi2Status led_push_button_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status led_push_button_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + comp->extObjs[0] /* digitalReadBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitRead */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(comp, 2, 5); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + return fmi2OK; +} + +fmi2Status led_push_button_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status led_push_button_functionODE(fmi2Component comp) +{ +} + +static fmi2Status led_push_button_functionOutputs(fmi2Component comp) +{ + comp->fmi2BooleanVars[2] /* digitalReadBoolean1._y DISCRETE */ = comp->fmi2BooleanVars[2] /* digitalReadBoolean1._y DISCRETE */; + comp->fmi2BooleanVars[2] /* digitalReadBoolean1._y DISCRETE */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_read(comp, comp->extObjs[0] /* digitalReadBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitRead */, 5);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, comp->fmi2BooleanVars[2] /* digitalReadBoolean1._y DISCRETE */); +} + +fmi2Status led_push_button_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + led_push_button_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = led_push_button_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + led_push_button_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + led_push_button_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + led_push_button_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = led_push_button_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/push/led_push_test.hex b/tools/openmodelica/linux/MDD_build/push/led_push_test.hex new file mode 100644 index 0000000..ef6d000 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/led_push_test.hex @@ -0,0 +1,64 @@ +:100000000C9434000C9446000C9446000C9446006A
+:100010000C9446000C9446000C9446000C94460048
+:100020000C9446000C9446000C9446000C94460038
+:100030000C9446000C9446000C9446000C94460028
+:100040000C9446000C9446000C9446000C94460018
+:100050000C9446000C9446000C9446000C94460008
+:100060000C9446000C94460011241FBECFEFD8E03C
+:10007000DEBFCDBF11E0A0E0B1E001C01D92AE3007
+:10008000B107E1F70E946C000C94F1010C940000A0
+:10009000FC01A285B3858C9184FB222720F930E0F6
+:1000A000318720870484F585E02D8081232B19F08A
+:1000B0008460808308958B7F80830895229A25E24F
+:1000C00030E0FC0135872487249823E230E0338731
+:1000D000228780E090E00895CF92DF92EF92FF9226
+:1000E00080E091E00E945E00C12CD12C760160E09E
+:1000F00070E0CB01609300017093010180930201D5
+:100100009093030180E091E00E9448008FEFC81AAD
+:10011000D80AE80AF80AC701B6010E9400012FE6D2
+:1001200032E143E05BE30E948E0120E030E0A90170
+:100130000E949C00DFCF5058BB27AA270ED0B4C026
+:10014000A5D030F0AAD020F031F49F3F11F41EF476
+:100150009AC00EF4E095E7FB90C0E92FB6D080F38B
+:10016000BA17620773078407950718F071F49EF5B4
+:10017000CEC00EF4E0950B2EBA2FA02D0B01B901C5
+:1001800090010C01CA01A0011124FF27591B99F00D
+:10019000593F50F4503E68F11A16F040A22F232F19
+:1001A000342F4427585FF3CF469537952795A79569
+:1001B000F0405395C9F77EF41F16BA0B620B730B10
+:1001C000840BBAF09150A1F0FF0FBB1F661F771F81
+:1001D000881FC2F70EC0BA0F621F731F841F48F436
+:1001E000879577956795B795F7959E3F08F0B3CFBC
+:1001F0009395880F08F09927EE0F979587950895A6
+:10020000E89409C097FB3EF49095809570956195B0
+:100210007F4F8F4F9F4F9923A9F0F92F96E9BB2766
+:100220009395F695879577956795B795F111F8CFE2
+:10023000FAF4BB0F11F460FF1BC06F5F7F4F8F4F4D
+:100240009F4F16C0882311F096E911C0772321F043
+:100250009EE8872F762F05C0662371F096E8862FDB
+:1002600070E060E02AF09A95660F771F881FDAF732
+:10027000880F9695879597F9089597F99F6780E875
+:1002800070E060E008959FEF80EC089500240A94E8
+:100290001616170618060906089500240A94121661
+:1002A0001306140605060895092E0394000C11F494
+:1002B000882352F0BB0F40F4BF2B11F460FF04C041
+:1002C0006F5F7F4F8F4F9F4F089557FD9058440F9A
+:1002D000551F59F05F3F71F04795880F97FB991FA5
+:1002E00061F09F3F79F08795089512161306140662
+:1002F000551FF2CF4695F1DF08C0161617061806EF
+:10030000991FF1CF86957105610508940895E894C9
+:10031000BB2766277727CB0197F908950BD0C4CF69
+:10032000B5DF28F0BADF18F0952309F0A6CFABCFE0
+:100330001124EECFCADFA0F3959FD1F3950F50E0C3
+:10034000551F629FF001729FBB27F00DB11D639F87
+:10035000AA27F00DB11DAA1F649F6627B00DA11D2D
+:10036000661F829F2227B00DA11D621F739FB00DD3
+:10037000A11D621F839FA00D611D221F749F332743
+:10038000A00D611D231F849F600D211D822F762FDC
+:100390006A2F11249F5750408AF0E1F088234AF0D9
+:1003A000EE0FFF1FBB1F661F771F881F9150504025
+:1003B000A9F79E3F510570F060CFAACF5F3FECF3E5
+:1003C000983EDCF3869577956795B795F795E79511
+:1003D0009F5FC1F7FE2B880F911D9695879597F922
+:0603E0000895F894FFCF20
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/push/led_push_test_main.c b/tools/openmodelica/linux/MDD_build/push/led_push_test_main.c new file mode 100644 index 0000000..1bef90d --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/led_push_test_main.c @@ -0,0 +1,198 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct led_push_test_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct led_push_test_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[3]; + void* extObjs[2]; +} led_push_test_fmi2Component; + +led_push_test_fmi2Component led_push_test_component = { + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + fmi2False /*booleanExpression2._y*/, + fmi2False /*digitalReadBoolean1._y*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRDigital.h" + +static inline fmi2Boolean Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_read(fmi2Component comp, void* om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_destructor(fmi2Component comp, void* om_digital); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); + +static inline fmi2Boolean Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_read(fmi2Component comp, void* om_port, fmi2Integer om_pin) +{ + fmi2Boolean om_b; + om_b = MDD_avr_digital_pin_read(om_port, om_pin); + return om_b; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2False); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} + +fmi2Component led_push_test_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &led_push_test_component; +} + +fmi2Status led_push_test_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status led_push_test_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 3); + comp->extObjs[0] /* digitalReadBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitRead */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(comp, 2, 5); + return fmi2OK; +} + +fmi2Status led_push_test_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status led_push_test_functionODE(fmi2Component comp) +{ +} + +static fmi2Status led_push_test_functionOutputs(fmi2Component comp) +{ + comp->fmi2BooleanVars[2] /* digitalReadBoolean1._y DISCRETE */ = comp->fmi2BooleanVars[2] /* digitalReadBoolean1._y DISCRETE */; + comp->fmi2BooleanVars[2] /* digitalReadBoolean1._y DISCRETE */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_read(comp, comp->extObjs[0] /* digitalReadBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitRead */, 5);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 3, comp->fmi2BooleanVars[2] /* digitalReadBoolean1._y DISCRETE */); +} + +fmi2Status led_push_test_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + led_push_test_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = led_push_test_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + led_push_test_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + led_push_test_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + led_push_test_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = led_push_test_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/push/led_test b/tools/openmodelica/linux/MDD_build/push/led_test Binary files differnew file mode 100644 index 0000000..3a7ea87 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/led_test diff --git a/tools/openmodelica/linux/MDD_build/push/output.txt b/tools/openmodelica/linux/MDD_build/push/output.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/output.txt diff --git a/tools/openmodelica/linux/MDD_build/push/pushTest1.mo b/tools/openmodelica/linux/MDD_build/push/pushTest1.mo new file mode 100644 index 0000000..6f0e207 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/pushTest1.mo @@ -0,0 +1,26 @@ +model pushTest1 + extends Modelica.Icons.Example; + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalReadBoolean digitalReadBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'4', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {-60, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'2', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {60, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.LogicalSwitch logicalSwitch1 annotation( + Placement(visible = true, transformation(origin = {-2, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = true) annotation( + Placement(visible = true, transformation(origin = {-44, 48}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression2(y = false) annotation( + Placement(visible = true, transformation(origin = {-46, -58}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-70, 78}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); +equation + connect(booleanExpression1.y, logicalSwitch1.u1) annotation( + Line(points = {{-33, 48}, {-28, 48}, {-28, 6}, {-14, 6}}, color = {255, 0, 255})); + connect(logicalSwitch1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{10, -2}, {48, -2}, {48, -2}, {48, -2}}, color = {255, 0, 255})); + connect(digitalReadBoolean1.y, logicalSwitch1.u2) annotation( + Line(points = {{-48, -2}, {-14, -2}, {-14, -2}, {-14, -2}}, color = {255, 0, 255})); + connect(booleanExpression2.y, logicalSwitch1.u3) annotation( + Line(points = {{-34, -58}, {-24, -58}, {-24, -10}, {-14, -10}, {-14, -10}}, color = {255, 0, 255})); + annotation( + uses(Modelica_DeviceDrivers(version = "1.5.0"), Modelica(version = "3.2.2"))); +end pushTest1;
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/push/pushTest1.sh b/tools/openmodelica/linux/MDD_build/push/pushTest1.sh new file mode 100644 index 0000000..2676f10 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/pushTest1.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_led_push_button.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_led_push_button.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections led_push_button_main.c -o led_push_button -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom led_push_button led_push_button.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:led_push_button.hex +if [ $? -ne 0 ]; then + exit 1 +fi diff --git a/tools/openmodelica/linux/MDD_build/push/pushTest1.sh~ b/tools/openmodelica/linux/MDD_build/push/pushTest1.sh~ new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/pushTest1.sh~ diff --git a/tools/openmodelica/linux/MDD_build/push/push_button_status b/tools/openmodelica/linux/MDD_build/push/push_button_status Binary files differnew file mode 100644 index 0000000..5b91980 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/push_button_status diff --git a/tools/openmodelica/linux/MDD_build/push/push_button_status.hex b/tools/openmodelica/linux/MDD_build/push/push_button_status.hex new file mode 100644 index 0000000..ab8dde5 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/push_button_status.hex @@ -0,0 +1,91 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94E50088
+:100020000C9451000C9451000C9451000C94B400A9
+:100030000C9451000C9451000C9483000C945100CA
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E8E7F5E002C0EF
+:1000800005900D92A431B107D9F711E0A4E1B1E0D8
+:1000900001C01D92A931B107E1F70E9433010C9410
+:1000A000BA020C9400008230910561F08330910512
+:1000B00099F00197C9F416BC80916E00826080931C
+:1000C0006E0016C0109285001092840080916F001F
+:1000D000826080936F000CC01092B200809170001B
+:1000E00082608093700004C081E090E00E94BA02B8
+:1000F00078949FB7F894809116019FBF8823C9F325
+:100100001092160108951F920F920FB60F921124AC
+:100110002F933F938F939F9380911401909115019A
+:1001200001969093150180931401809116018130FE
+:1001300091F0209114013091150180911701909157
+:1001400018012817390738F081E0809316011092C2
+:100150001501109214019F918F913F912F910F9053
+:100160000FBE0F901F9018951F920F920FB60F920F
+:1001700011242F933F938F939F938091140190911B
+:100180001501019690931501809314018091160139
+:10019000813091F020911401309115018091170167
+:1001A000909118012817390738F081E080931601E3
+:1001B00010921501109214019F918F913F912F91F0
+:1001C0000F900FBE0F901F9018951F920F920FB6B1
+:1001D0000F9211242F933F938F939F93809114013B
+:1001E00090911501019690931501809314018091CF
+:1001F0001601813091F02091140130911501809108
+:100200001701909118012817390738F081E0809381
+:10021000160110921501109214019F918F913F9138
+:100220002F910F900FBE0F901F901895FC012498EE
+:1002300083E290E09787868785B5836085BD81E0FE
+:1002400090E0918B808B22E030E030931801209376
+:10025000170124B5226024BD29EF27BD938B828B23
+:1002600080E090E00895CF92DF92EF92FF9280E0DD
+:1002700091E00E941601C12CD12C760160E070E063
+:10028000CB01609300017093010180930201909370
+:10029000030180911201909113010E9453008FEF8E
+:1002A000C81AD80AE80AF80AC701B6010E94C901AB
+:1002B0002FE632E143E05BE30E94570220E030E0AA
+:1002C000A9010E946501DDCF5058BB27AA270ED097
+:1002D000B4C0A5D030F0AAD020F031F49F3F11F483
+:1002E0001EF49AC00EF4E095E7FB90C0E92FB6D05B
+:1002F00080F3BA17620773078407950718F071F443
+:100300009EF5CEC00EF4E0950B2EBA2FA02D0B015A
+:10031000B90190010C01CA01A0011124FF27591B4A
+:1003200099F0593F50F4503E68F11A16F040A22F50
+:10033000232F342F4427585FF3CF469537952795C1
+:10034000A795F0405395C9F77EF41F16BA0B620BC0
+:10035000730B840BBAF09150A1F0FF0FBB1F661F07
+:10036000771F881FC2F70EC0BA0F621F731F841F4A
+:1003700048F4879577956795B795F7959E3F08F070
+:10038000B3CF9395880F08F09927EE0F979587952F
+:100390000895E89409C097FB3EF490958095709578
+:1003A00061957F4F8F4F9F4F9923A9F0F92F96E9C1
+:1003B000BB279395F695879577956795B795F11136
+:1003C000F8CFFAF4BB0F11F460FF1BC06F5F7F4FD3
+:1003D0008F4F9F4F16C0882311F096E911C07723E5
+:1003E00021F09EE8872F762F05C0662371F096E8EE
+:1003F000862F70E060E02AF09A95660F771F881FBD
+:10040000DAF7880F9695879597F9089597F99F677A
+:1004100080E870E060E008959FEF80EC089500248C
+:100420000A941616170618060906089500240A9459
+:1004300012161306140605060895092E0394000CDF
+:1004400011F4882352F0BB0F40F4BF2B11F460FF6E
+:1004500004C06F5F7F4F8F4F9F4F089557FD905897
+:10046000440F551F59F05F3F71F04795880F97FB78
+:10047000991F61F09F3F79F0879508951216130632
+:100480001406551FF2CF4695F1DF08C01616170661
+:100490001806991FF1CF8695710561050894089596
+:1004A000E894BB2766277727CB0197F908950BD0EF
+:1004B000C4CFB5DF28F0BADF18F0952309F0A6CF36
+:1004C000ABCF1124EECFCADFA0F3959FD1F3950FE8
+:1004D00050E0551F629FF001729FBB27F00DB11DC8
+:1004E000639FAA27F00DB11DAA1F649F6627B00D58
+:1004F000A11D661F829F2227B00DA11D621F739F41
+:10050000B00DA11D621F839FA00D611D221F749F4E
+:100510003327A00D611D231F849F600D211D822F95
+:10052000762F6A2F11249F5750408AF0E1F08823DC
+:100530004AF0EE0FFF1FBB1F661F771F881F9150E9
+:100540005040A9F79E3F510570F060CFAACF5F3FA2
+:10055000ECF3983EDCF3869577956795B795F7951C
+:10056000E7959F5FC1F7FE2B880F911D96958795A4
+:0805700097F90895F894FFCFFC
+:1005780000000000000000006F12033B01000000B3
+:04058800000000006F
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/push/push_button_status.sh b/tools/openmodelica/linux/MDD_build/push/push_button_status.sh new file mode 100644 index 0000000..404eced --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/push_button_status.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_push_button_status.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_push_button_status.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections push_button_status_main.c -o push_button_status -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom push_button_status push_button_status.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:push_button_status.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/push/push_button_status_main.c b/tools/openmodelica/linux/MDD_build/push/push_button_status_main.c new file mode 100644 index 0000000..f732e8a --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/push_button_status_main.c @@ -0,0 +1,219 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct push_button_status_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct push_button_status_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[2]; + fmi2Real fmi2RealParameter[1]; + fmi2Boolean fmi2BooleanParameter[1]; + void* extObjs[3]; +} push_button_status_fmi2Component; + +push_button_status_fmi2Component push_button_status_component = { + .fmi2BooleanVars = { + fmi2False /*booleanValue1._active*/, + fmi2False /*digitalReadBoolean1._y*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, + .fmi2BooleanParameter = { + fmi2True /*booleanValue1._use_activePort*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline fmi2Boolean Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_read(fmi2Component comp, void* om_port, fmi2Integer om_pin); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Boolean Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_read(fmi2Component comp, void* om_port, fmi2Integer om_pin) +{ + fmi2Boolean om_b; + om_b = MDD_avr_digital_pin_read(om_port, om_pin); + return om_b; +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2False); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component push_button_status_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &push_button_status_component; +} + +fmi2Status push_button_status_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status push_button_status_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* digitalReadBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitRead */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(comp, 2, 5); + comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + return fmi2OK; +} + +fmi2Status push_button_status_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status push_button_status_functionODE(fmi2Component comp) +{ +} + +static fmi2Status push_button_status_functionOutputs(fmi2Component comp) +{ + Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */); +} + +fmi2Status push_button_status_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + push_button_status_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = push_button_status_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + push_button_status_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + push_button_status_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + push_button_status_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = push_button_status_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/push/runMDD_led_push_button.mos b/tools/openmodelica/linux/MDD_build/push/runMDD_led_push_button.mos new file mode 100644 index 0000000..f396c9b --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/runMDD_led_push_button.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/sumeet/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/sumeet/MDD_Arduino/linux-version-4/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_push.pushTest1, fileNamePrefix="led_push_test"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/push/runMDD_led_push_button.mos~ b/tools/openmodelica/linux/MDD_build/push/runMDD_led_push_button.mos~ new file mode 100644 index 0000000..f396c9b --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/runMDD_led_push_button.mos~ @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/sumeet/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/sumeet/MDD_Arduino/linux-version-4/OpenModelica-Arduino-MDD_Arduino_Revised/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_push.pushTest1, fileNamePrefix="led_push_test"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/push/runMDD_push_button_status.mos b/tools/openmodelica/linux/MDD_build/push/runMDD_push_button_status.mos new file mode 100644 index 0000000..ab3a87e --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/runMDD_push_button_status.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_push.pushTest1, fileNamePrefix="push_button_test"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/push/runMDD_push_button_status.mos~ b/tools/openmodelica/linux/MDD_build/push/runMDD_push_button_status.mos~ new file mode 100644 index 0000000..ab3a87e --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/push/runMDD_push_button_status.mos~ @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_push.pushTest1, fileNamePrefix="push_button_test"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_init.mos b/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_init.mos new file mode 100644 index 0000000..be5ff81 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_init.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_servo.MDD_servo_init, fileNamePrefix="servo_init"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_loop.mos b/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_loop.mos new file mode 100644 index 0000000..23b035f --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_loop.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_servo.MDD_servo_loop, fileNamePrefix="servo_loop"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_pot.mos b/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_pot.mos new file mode 100644 index 0000000..a7e6ac1 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_pot.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_servo.MDD_servo_pot, fileNamePrefix="servo_pot"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_reverse.mos b/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_reverse.mos new file mode 100644 index 0000000..4d6b950 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/runMDD_servo_reverse.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_servo.MDD_servo_reverse, fileNamePrefix="servo_reverse"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_init b/tools/openmodelica/linux/MDD_build/servo/servo_init Binary files differnew file mode 100644 index 0000000..ba1b63b --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_init diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_init.hex b/tools/openmodelica/linux/MDD_build/servo/servo_init.hex new file mode 100644 index 0000000..667f2cc --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_init.hex @@ -0,0 +1,94 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94E50088
+:100020000C9451000C9451000C9451000C94B400A9
+:100030000C9451000C9451000C9483000C945100CA
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E6EAF5E002C0EE
+:1000800005900D92A231B107D9F711E0A2E1B1E0DC
+:1000900001C01D92A731B107E1F70E9443010C9402
+:1000A000D1020C9400008230910561F083309105FB
+:1000B00099F00197C9F416BC80916E00826080931C
+:1000C0006E0016C0109285001092840080916F001F
+:1000D000826080936F000CC01092B200809170001B
+:1000E00082608093700004C081E090E00E94D102A1
+:1000F00078949FB7F894809114019FBF8823C9F327
+:100100001092140108951F920F920FB60F921124AE
+:100110002F933F938F939F9380911201909113019E
+:100120000196909313018093120180911401813004
+:1001300091F020911201309113018091150190915D
+:1001400016012817390738F081E0809314011092C6
+:100150001301109212019F918F913F912F910F9057
+:100160000FBE0F901F9018951F920F920FB60F920F
+:1001700011242F933F938F939F938091120190911D
+:100180001301019690931301809312018091140141
+:10019000813091F02091120130911301809115016D
+:1001A000909116012817390738F081E080931401E7
+:1001B00010921301109212019F918F913F912F91F4
+:1001C0000F900FBE0F901F9018951F920F920FB6B1
+:1001D0000F9211242F933F938F939F93809112013D
+:1001E00090911301019690931301809312018091D5
+:1001F0001401813091F0209112013091130180910E
+:100200001501909116012817390738F081E0809385
+:10021000140110921301109212019F918F913F913E
+:100220002F910F900FBE0F901F901895FC01A1E821
+:10023000B0E08C918D608C9322E030E03387228790
+:10024000219AA0E8B0E08C9181688C93A8E8B0E096
+:1002500011961C921E921C92B587A48785B5836067
+:1002600085BD81E090E097878687309316012093C3
+:10027000150124B5226024BD29EF27BD918B808B09
+:1002800080E090E00895CF92DF92EF92FF92CF93BB
+:1002900080E091E00E941601C12CD12C760160E033
+:1002A00070E0CB01CEE16093000170930101809377
+:1002B00002019093030180911001909111010E941D
+:1002C0005300E0910C01F0910D01C0838FEFC81A2B
+:1002D000D80AE80AF80AC701B6010E94E0012FE631
+:1002E00032E143E05BE30E946E0220E030E0A901CE
+:1002F0000E947C01D8CF5058BB27AA270ED0B4C08B
+:10030000A5D030F0AAD020F031F49F3F11F41EF4B4
+:100310009AC00EF4E095E7FB90C0E92FB6D080F3C9
+:10032000BA17620773078407950718F071F49EF5F2
+:10033000CEC00EF4E0950B2EBA2FA02D0B01B90103
+:1003400090010C01CA01A0011124FF27591B99F04B
+:10035000593F50F4503E68F11A16F040A22F232F57
+:10036000342F4427585FF3CF469537952795A795A7
+:10037000F0405395C9F77EF41F16BA0B620B730B4E
+:10038000840BBAF09150A1F0FF0FBB1F661F771FBF
+:10039000881FC2F70EC0BA0F621F731F841F48F474
+:1003A000879577956795B795F7959E3F08F0B3CFFA
+:1003B0009395880F08F09927EE0F979587950895E4
+:1003C000E89409C097FB3EF49095809570956195EF
+:1003D0007F4F8F4F9F4F9923A9F0F92F96E9BB27A5
+:1003E0009395F695879577956795B795F111F8CF21
+:1003F000FAF4BB0F11F460FF1BC06F5F7F4F8F4F8C
+:100400009F4F16C0882311F096E911C0772321F081
+:100410009EE8872F762F05C0662371F096E8862F19
+:1004200070E060E02AF09A95660F771F881FDAF770
+:10043000880F9695879597F9089597F99F6780E8B3
+:1004400070E060E008959FEF80EC089500240A9426
+:100450001616170618060906089500240A9412169F
+:100460001306140605060895092E0394000C11F4D2
+:10047000882352F0BB0F40F4BF2B11F460FF04C07F
+:100480006F5F7F4F8F4F9F4F089557FD9058440FD8
+:10049000551F59F05F3F71F04795880F97FB991FE3
+:1004A00061F09F3F79F087950895121613061406A0
+:1004B000551FF2CF4695F1DF08C01616170618062D
+:1004C000991FF1CF86957105610508940895E89408
+:1004D000BB2766277727CB0197F908950BD0C4CFA8
+:1004E000B5DF28F0BADF18F0952309F0A6CFABCF1F
+:1004F0001124EECFCADFA0F3959FD1F3950F50E002
+:10050000551F629FF001729FBB27F00DB11D639FC5
+:10051000AA27F00DB11DAA1F649F6627B00DA11D6B
+:10052000661F829F2227B00DA11D621F739FB00D11
+:10053000A11D621F839FA00D611D221F749F332781
+:10054000A00D611D231F849F600D211D822F762F1A
+:100550006A2F11249F5750408AF0E1F088234AF017
+:10056000EE0FFF1FBB1F661F771F881F9150504063
+:10057000A9F79E3F510570F060CFAACF5F3FECF323
+:10058000983EDCF3869577956795B795F795E7954F
+:100590009F5FC1F7FE2B880F911D9695879597F960
+:0605A0000895F894FFCF5E
+:1005A6000000000000006F12033B00000000000086
+:0205B600000043
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_init.sh b/tools/openmodelica/linux/MDD_build/servo/servo_init.sh new file mode 100644 index 0000000..a8c1413 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_init.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_servo_init.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_servo_init.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections servo_init_main.c -o servo_init -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom servo_init servo_init.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:servo_init.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_init_main.c b/tools/openmodelica/linux/MDD_build/servo/servo_init_main.c new file mode 100644 index 0000000..b10d9af --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_init_main.c @@ -0,0 +1,213 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct servo_init_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct servo_init_fmi2Component_s { + fmi2Real currentTime; + fmi2Integer fmi2IntegerVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[4]; +} servo_init_fmi2Component; + +servo_init_fmi2Component servo_init_component = { + .fmi2IntegerVars = { + 0 /*integerExpression1._y*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value) +{ + MDD_avr_pwm_set(om_pwm, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted) +{ + void* om_pwm; + om_pwm = MDD_avr_pwm_init(om_timer, om_pin, om_initialValue, om_inverted); + return om_pwm; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm) +{ + MDD_avr_pwm_close(om_pwm); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component servo_init_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &servo_init_component; +} + +fmi2Status servo_init_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status servo_init_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 1, 0, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + return fmi2OK; +} + +fmi2Status servo_init_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status servo_init_functionODE(fmi2Component comp) +{ +} + +static fmi2Status servo_init_functionOutputs(fmi2Component comp) +{ + Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, 30); +} + +fmi2Status servo_init_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + servo_init_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = servo_init_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + servo_init_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + servo_init_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + servo_init_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = servo_init_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_loop.sh b/tools/openmodelica/linux/MDD_build/servo/servo_loop.sh new file mode 100644 index 0000000..4be3b84 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_loop.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_servo_loop.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_servo_loop.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections servo_loop_main.c -o servo_loop -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom servo_loop servo_loop.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:servo_loop.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_loop_main.c b/tools/openmodelica/linux/MDD_build/servo/servo_loop_main.c new file mode 100644 index 0000000..2eb1630 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_loop_main.c @@ -0,0 +1,235 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct servo_loop_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct servo_loop_fmi2Component_s { + fmi2Real currentTime; + fmi2Integer fmi2IntegerVars[3]; + fmi2Boolean fmi2BooleanVars[3]; + fmi2Real fmi2RealParameter[1]; + fmi2Integer fmi2IntegerParameter[1]; + fmi2Boolean fmi2BooleanParameter[2]; + fmi2String fmi2StringParameter[1]; + void* extObjs[4]; +} servo_loop_fmi2Component; + +servo_loop_fmi2Component servo_loop_component = { + .fmi2IntegerVars = { + 0 /*integerExpression1._y*/, + 0 /*triggeredAdd1._local_set*/, + 0 /*triggeredAdd1._y*/, + }, + .fmi2BooleanVars = { + fmi2False /*$whenCondition1*/, + fmi2False /*booleanExpression1._y*/, + fmi2False /*triggeredAdd1._local_reset*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, + .fmi2IntegerParameter = { + 0 /*triggeredAdd1._y_start*/, + }, + .fmi2BooleanParameter = { + fmi2False /*triggeredAdd1._use_reset*/, + fmi2False /*triggeredAdd1._use_set*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value) +{ + MDD_avr_pwm_set(om_pwm, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted) +{ + void* om_pwm; + om_pwm = MDD_avr_pwm_init(om_timer, om_pin, om_initialValue, om_inverted); + return om_pwm; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm) +{ + MDD_avr_pwm_close(om_pwm); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component servo_loop_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &servo_loop_component; +} + +fmi2Status servo_loop_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status servo_loop_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 1, 0, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + return fmi2OK; +} + +fmi2Status servo_loop_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status servo_loop_functionODE(fmi2Component comp) +{ +} + +static fmi2Status servo_loop_functionOutputs(fmi2Component comp) +{ + comp->fmi2BooleanVars[0] /* $whenCondition1 DISCRETE */ = (om_mod(comp->currentTime,0.2))>(0.1); /* equation 9 */ + + #error "[CodegenEmbeddedC.tpl:346:14-346:14] Unsupported equation: ..." + + comp->fmi2BooleanVars[1] /* booleanExpression1._y DISCRETE */ = comp->fmi2BooleanVars[0] /* $whenCondition1 DISCRETE */; /* equation 11 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, comp->fmi2IntegerVars[2] /* triggeredAdd1._y DISCRETE */); +} + +fmi2Status servo_loop_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + servo_loop_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = servo_loop_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + servo_loop_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + servo_loop_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + servo_loop_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = servo_loop_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_pot.sh b/tools/openmodelica/linux/MDD_build/servo/servo_pot.sh new file mode 100644 index 0000000..41f9d90 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_pot.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_servo_pot.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_servo_pot.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections servo_pot_main.c -o servo_pot -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom servo_pot servo_pot.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:servo_pot.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_pot_main.c b/tools/openmodelica/linux/MDD_build/servo/servo_pot_main.c new file mode 100644 index 0000000..4cb1705 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_pot_main.c @@ -0,0 +1,244 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct servo_pot_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct servo_pot_fmi2Component_s { + fmi2Real currentTime; + fmi2Real fmi2RealVars[1]; + fmi2Integer fmi2IntegerVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[5]; +} servo_pot_fmi2Component; + +servo_pot_fmi2Component servo_pot_component = { + .fmi2RealVars = { + 0.0 /*adc._y*/, + }, + .fmi2IntegerVars = { + 0 /*pwm._u[1]*/, + }, + .fmi2RealParameter = { + 0.002 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +static const char * const OMCLIT0 = "ElectricPotential"; +static const char * const OMCLIT1 = "V"; +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution) +{ + fmi2Real om_value; + om_value = MDD_avr_analog_read(om_analogPort, om_vref, om_voltageResolution); + return om_value; +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage) +{ + void* om_avr; + om_avr = MDD_avr_analog_init(om_divisionFactor, om_referenceVoltage); + return om_avr; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr) +{ + MDD_avr_analog_close(om_avr); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value) +{ + MDD_avr_pwm_set(om_pwm, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted) +{ + void* om_pwm; + om_pwm = MDD_avr_pwm_init(om_timer, om_pin, om_initialValue, om_inverted); + return om_pwm; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm) +{ + MDD_avr_pwm_close(om_pwm); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component servo_pot_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &servo_pot_component; +} + +fmi2Status servo_pot_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status servo_pot_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[1] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[2] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[1] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 1, 0, fmi2False); + comp->extObjs[0] /* adc._analog EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Analog.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(comp, 7, 4); + comp->extObjs[3] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[4] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[3] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 2); + return fmi2OK; +} + +fmi2Status servo_pot_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status servo_pot_functionODE(fmi2Component comp) +{ +} + +static fmi2Status servo_pot_functionOutputs(fmi2Component comp) +{ + comp->fmi2RealVars[0] /* adc._y variable */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(comp, 3, 180.0, 10); /* equation 4 */ + comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */ = ((comp->fmi2RealVars[0] /* adc._y variable */)>(0.0)) ? (((int) + #error "[CodegenEmbeddedC.tpl:490:28-490:28] daeExpCallBuiltin: Not supported: floor(0.5 + adc.y, 1)" + )) : (((int) + #error "[CodegenEmbeddedC.tpl:490:28-490:28] daeExpCallBuiltin: Not supported: ceil(-0.5 + adc.y, 3)" + )); /* equation 5 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[4] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[2] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */); +} + +fmi2Status servo_pot_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + servo_pot_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = servo_pot_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + servo_pot_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + servo_pot_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + servo_pot_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = servo_pot_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_reverse b/tools/openmodelica/linux/MDD_build/servo/servo_reverse Binary files differnew file mode 100644 index 0000000..67359ad --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_reverse diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_reverse.hex b/tools/openmodelica/linux/MDD_build/servo/servo_reverse.hex new file mode 100644 index 0000000..565bd99 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_reverse.hex @@ -0,0 +1,101 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94E50088
+:100020000C9451000C9451000C9451000C94B400A9
+:100030000C9451000C9451000C9483000C945100CA
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0ECE1F6E002C0F0
+:1000800005900D92A231B107D9F711E0A2E1B1E0DC
+:1000900001C01D92A731B107E1F70E9445010C9400
+:1000A0000C030C9400008230910561F083309105BF
+:1000B00099F00197C9F416BC80916E00826080931C
+:1000C0006E0016C0109285001092840080916F001F
+:1000D000826080936F000CC01092B200809170001B
+:1000E00082608093700004C081E090E00E940C0365
+:1000F00078949FB7F894809114019FBF8823C9F327
+:100100001092140108951F920F920FB60F921124AE
+:100110002F933F938F939F9380911201909113019E
+:100120000196909313018093120180911401813004
+:1001300091F020911201309113018091150190915D
+:1001400016012817390738F081E0809314011092C6
+:100150001301109212019F918F913F912F910F9057
+:100160000FBE0F901F9018951F920F920FB60F920F
+:1001700011242F933F938F939F938091120190911D
+:100180001301019690931301809312018091140141
+:10019000813091F02091120130911301809115016D
+:1001A000909116012817390738F081E080931401E7
+:1001B00010921301109212019F918F913F912F91F4
+:1001C0000F900FBE0F901F9018951F920F920FB6B1
+:1001D0000F9211242F933F938F939F93809112013D
+:1001E00090911301019690931301809312018091D5
+:1001F0001401813091F0209112013091130180910E
+:100200001501909116012817390738F081E0809385
+:10021000140110921301109212019F918F913F913E
+:100220002F910F900FBE0F901F901895FC01A1E821
+:10023000B0E08C918D608C9382E090E09387828710
+:10024000219AA0E8B0E08C9181688C93A8E8B0E096
+:1002500011961C921E921C92B587A48785B5836067
+:1002600085BD81E090E0978786872AE030E0309373
+:1002700016012093150124B5226024BD29EF27BD66
+:10028000918B808B80E090E00895CF92DF92EF9287
+:10029000FF9280E091E00E941601C12CD12C7601E2
+:1002A00060E070E0CB0160930001709301018093E6
+:1002B0000201909303012DEC3CEC4CE45EE30E94C0
+:1002C000F30187FF03C086E190E002C08FE090E079
+:1002D0009093050180930401809110019091110188
+:1002E0000E945300E0910C01F0910D0180910401F6
+:1002F00080838FEFC81AD80AE80AF80AC701B60146
+:100300000E94F7012FE632E143E05BE30E94A9027D
+:1003100020E030E0A9010E948F01C5CF5058BB27D3
+:10032000AA270ED0DCC0CDD030F0D2D020F031F4EE
+:100330009F3F11F41EF4C2C00EF4E095E7FBB8C075
+:10034000E92FDED080F3BA17620773078407950799
+:1003500018F071F49EF5F6C00EF4E0950B2EBA2F4E
+:10036000A02D0B01B90190010C01CA01A0011124BB
+:10037000FF27591B99F0593F50F4503E68F11A1667
+:10038000F040A22F232F342F4427585FF3CF4695F8
+:1003900037952795A795F0405395C9F77EF41F161A
+:1003A000BA0B620B730B840BBAF09150A1F0FF0FE4
+:1003B000BB1F661F771F881FC2F70EC0BA0F621FD0
+:1003C000731F841F48F4879577956795B795F795C0
+:1003D0009E3F08F0B3CF9395880F08F09927EE0F52
+:1003E00097958795089540D008F481E00895E894A2
+:1003F00009C097FB3EF490958095709561957F4F6D
+:100400008F4F9F4F9923A9F0F92F96E9BB2793951A
+:10041000F695879577956795B795F111F8CFFAF42A
+:10042000BB0F11F460FF1BC06F5F7F4F8F4F9F4F5B
+:1004300016C0882311F096E911C0772321F09EE8B9
+:10044000872F762F05C0662371F096E8862F70E01F
+:1004500060E02AF09A95660F771F881FDAF7880FF9
+:100460009695879597F90895990F0008550FAA0B4F
+:10047000E0E8FEEF16161706E807F907C0F01216B7
+:100480001306E407F50798F0621B730B840B950BBA
+:1004900039F40A2661F0232B242B252B21F408950F
+:1004A0000A2609F4A140A6958FEF811D811D0895AC
+:1004B00097F99F6780E870E060E008959FEF80EC17
+:1004C000089500240A9416161706180609060895BA
+:1004D00000240A9412161306140605060895092E20
+:1004E0000394000C11F4882352F0BB0F40F4BF2B8F
+:1004F00011F460FF04C06F5F7F4F8F4F9F4F0895CF
+:1005000057FD9058440F551F59F05F3F71F04795C4
+:10051000880F97FB991F61F09F3F79F087950895A9
+:10052000121613061406551FF2CF4695F1DF08C0C8
+:10053000161617061806991FF1CF869571056105E5
+:1005400008940895E894BB2766277727CB0197F98D
+:1005500008950BD0C4CFB5DF28F0BADF18F095238B
+:1005600009F0A6CFABCF1124EECFCADFA0F3959F41
+:10057000D1F3950F50E0551F629FF001729FBB278A
+:10058000F00DB11D639FAA27F00DB11DAA1F649F36
+:100590006627B00DA11D661F829F2227B00DA11DE9
+:1005A000621F739FB00DA11D621F839FA00D611D6F
+:1005B000221F749F3327A00D611D231F849F600D90
+:1005C000211D822F762F6A2F11249F5750408AF0C9
+:1005D000E1F088234AF0EE0FFF1FBB1F661F771F55
+:1005E000881F91505040A9F79E3F510570F060CF91
+:1005F000AACF5F3FECF3983EDCF38695779567953D
+:10060000B795F795E7959F5FC1F7FE2B880F911D72
+:0C0610009695879597F90895F894FFCF10
+:10061C000000000016000AD7233C00000000000078
+:02062C000000CC
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_reverse.sh b/tools/openmodelica/linux/MDD_build/servo/servo_reverse.sh new file mode 100644 index 0000000..9c5927d --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_reverse.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_servo_reverse.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_servo_reverse.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections servo_reverse_main.c -o servo_reverse -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom servo_reverse servo_reverse.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:servo_reverse.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/servo/servo_reverse_main.c b/tools/openmodelica/linux/MDD_build/servo/servo_reverse_main.c new file mode 100644 index 0000000..5382666 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/servo/servo_reverse_main.c @@ -0,0 +1,213 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct servo_reverse_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct servo_reverse_fmi2Component_s { + fmi2Real currentTime; + fmi2Integer fmi2IntegerVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[4]; +} servo_reverse_fmi2Component; + +servo_reverse_fmi2Component servo_reverse_component = { + .fmi2IntegerVars = { + 22 /*pwm._u[1]*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value) +{ + MDD_avr_pwm_set(om_pwm, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted) +{ + void* om_pwm; + om_pwm = MDD_avr_pwm_init(om_timer, om_pin, om_initialValue, om_inverted); + return om_pwm; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm) +{ + MDD_avr_pwm_close(om_pwm); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component servo_reverse_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &servo_reverse_component; +} + +fmi2Status servo_reverse_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status servo_reverse_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 1, 0, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + return fmi2OK; +} + +fmi2Status servo_reverse_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status servo_reverse_functionODE(fmi2Component comp) +{ +} + +static fmi2Status servo_reverse_functionOutputs(fmi2Component comp) +{ + comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */ = ((comp->currentTime)<(0.2)) ? (22) : (15); /* equation 3 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */); +} + +fmi2Status servo_reverse_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + servo_reverse_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = servo_reverse_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + servo_reverse_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + servo_reverse_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + servo_reverse_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = servo_reverse_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/thermistor/runMDD_therm_buzzer.mos b/tools/openmodelica/linux/MDD_build/thermistor/runMDD_therm_buzzer.mos new file mode 100644 index 0000000..8164089 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/thermistor/runMDD_therm_buzzer.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_thermistor.MDD_therm_buzzer, fileNamePrefix="therm_buzzer"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/thermistor/runMDD_therm_read.mos b/tools/openmodelica/linux/MDD_build/thermistor/runMDD_therm_read.mos new file mode 100644 index 0000000..a251626 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/thermistor/runMDD_therm_read.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("/home/souradip/Modelica_DeviceDrivers/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("/home/souradip/OpenModelica/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_thermistor.MDD_therm_read, fileNamePrefix="therm_read"); +getErrorString(); diff --git a/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer b/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer Binary files differnew file mode 100644 index 0000000..4c841f2 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer diff --git a/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer.hex b/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer.hex new file mode 100644 index 0000000..2517195 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer.hex @@ -0,0 +1,121 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C9431013B
+:100020000C9451000C9451000C9451000C9400015C
+:100030000C9451000C9451000C94CF000C9451007E
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0E2E4F7E002C0F6
+:1000800005900D92A832B107D9F711E0A8E2B1E0CE
+:1000900001C01D92AD32B107E1F70E948A010C94B4
+:1000A0009F030C9400000F931F93CF93DF93EC01F9
+:1000B00080917C00857E846080937C0080917A00B2
+:1000C000806480937A0080917A0086FDFCCF6091F5
+:1000D00078007091790080E090E00E94860220E034
+:1000E00030E040E854E40E94180320E030EC4FE791
+:1000F00054E40E941E026C837D838E839F8301E003
+:1001000010E02A893B894C895D890E94140387FF8E
+:1001100002C000E010E0198B088B8EA19FA18230F5
+:10012000910561F08330910599F00197C9F416BCEF
+:1001300080916E00826080936E0016C010928500E0
+:100140001092840080916F00826080936F000CC0D9
+:100150001092B2008091700082608093700004C0A1
+:1001600081E090E00E949F0378949FB7F89480917B
+:100170002A019FBF8823C9F310922A01EAA1FBA19B
+:1001800088899989892B19F08081886002C08081D3
+:10019000877F8083DF91CF911F910F9108951F92E8
+:1001A0000F920FB60F9211242F933F938F939F932B
+:1001B00080912801909129010196909329018093C3
+:1001C000280180912A01813091F0209128013091FD
+:1001D000290180912B0190912C012817390738F0C3
+:1001E00081E080932A0110922901109228019F91A9
+:1001F0008F913F912F910F900FBE0F901F901895E8
+:100200001F920F920FB60F9211242F933F938F934B
+:100210009F93809128019091290101969093290143
+:100220008093280180912A01813091F0209128014A
+:100230003091290180912B0190912C0128173907C9
+:1002400038F081E080932A01109229011092280150
+:100250009F918F913F912F910F900FBE0F901F9004
+:1002600018951F920F920FB60F9211242F933F9360
+:100270008F939F93809128019091290101969093EB
+:1002800029018093280180912A01813091F02091E9
+:1002900028013091290180912B0190912C01281780
+:1002A000390738F081E080932A01109229011092D9
+:1002B00028019F918F913F912F910F900FBE0F902A
+:1002C0001F901895FC01539A8BE290E093A382A3B0
+:1002D00085B5836085BD81E090E095A384A32AE085
+:1002E00030E030932C0120932B0124B5226024BDF3
+:1002F00029EF27BD97A386A3ACE7B0E08C918C9340
+:10030000AAE7B0E08C9187688C9311A210A280E0DC
+:1003100090E00895CF92DF92EF92FF9280E091E01B
+:100320000E946201C12CD12C760160E070E0CB010B
+:100330006093000170930101809302019093030187
+:1003400080E091E00E9453008FEFC81AD80AE80AB3
+:10035000F80AC701B6010E9486022FE632E143E0A7
+:100360005BE30E94180320E030E0A9010E94BA017B
+:10037000DFCF5058BB27AA270ED01CC10DD130F0BB
+:1003800012D120F031F49F3F11F41EF402C10EF49B
+:10039000E095E7FBF8C0E92F1ED180F3BA1762079A
+:1003A00073078407950718F071F49EF536C10EF4B3
+:1003B000E0950B2EBA2FA02D0B01B90190010C0175
+:1003C000CA01A0011124FF27591B99F0593F50F48D
+:1003D000503E68F11A16F040A22F232F342F4427E5
+:1003E000585FF3CF469537952795A795F0405395DD
+:1003F000C9F77EF41F16BA0B620B730B840BBAF0AD
+:100400009150A1F0FF0FBB1F661F771F881FC2F717
+:100410000EC0BA0F621F731F841F48F4879577952B
+:100420006795B795F7959E3F08F0B3CF9395880FE2
+:1004300008F09927EE0F9795879508950CD0BAC0CC
+:10044000B2D040F0A9D030F021F45F3F19F09BC04A
+:100450005111E4C09EC0BFD098F39923C9F355232E
+:10046000B1F3951B550BBB27AA27621773078407A7
+:1004700038F09F5F5F4F220F331F441FAA1FA9F35D
+:1004800033D00E2E3AF0E0E830D091505040E6954F
+:10049000001CCAF729D0FE2F27D0660F771F881FB0
+:1004A000BB1F261737074807AB07B0E809F0BB0B9F
+:1004B000802DBF01FF2793585F4F2AF09E3F5105C3
+:1004C00068F061C0ABC05F3FECF3983EDCF386950B
+:1004D00077956795B795F7959F5FC9F7880F911D39
+:1004E0009695879597F90895E1E0660F771F881F25
+:1004F000BB1F621773078407BA0720F0621B730BD8
+:10050000840BBA0BEE1F88F7E0950895E89409C0B4
+:1005100097FB3EF490958095709561957F4F8F4F36
+:100520009F4F9923A9F0F92F96E9BB279395F6954C
+:10053000879577956795B795F111F8CFFAF4BB0FCA
+:1005400011F460FF1BC06F5F7F4F8F4F9F4F16C02E
+:10055000882311F096E911C0772321F09EE8872FB8
+:10056000762F05C0662371F096E8862F70E060E074
+:100570002AF09A95660F771F881FDAF7880F9695ED
+:10058000879597F9089597F99F6780E870E060E094
+:1005900008959FEF80EC089500240A94161617061C
+:1005A00018060906089500240A9412161306140664
+:1005B00005060895092E0394000C11F4882352F0C7
+:1005C000BB0F40F4BF2B11F460FF04C06F5F7F4F7F
+:1005D0008F4F9F4F089557FD9058440F551F59F066
+:1005E0005F3F71F04795880F97FB991F61F09F3F20
+:1005F00079F087950895121613061406551FF2CF49
+:100600004695F1DF08C0161617061806991FF1CF98
+:1006100086957105610508940895E894BB276627BF
+:100620007727CB0197F9089566D008F48FEF0895E6
+:100630000BD0C0CFB1DF28F0B6DF18F0952309F05A
+:10064000A2CFA7CF1124EACFC6DFA0F3959FD1F3A5
+:10065000950F50E0551F629FF001729FBB27F00D70
+:10066000B11D639FAA27F00DB11DAA1F649F6627C5
+:10067000B00DA11D661F829F2227B00DA11D621F14
+:10068000739FB00DA11D621F839FA00D611D221FCE
+:10069000749F3327A00D611D231F849F600D211DB2
+:1006A000822F762F6A2F11249F5750408AF0E1F055
+:1006B00088234AF0EE0FFF1FBB1F661F771F881F9E
+:1006C00091505040A9F79E3F510570F05CCFA6CFE6
+:1006D0005F3FECF3983EDCF3869577956795B79589
+:1006E000F795E7959F5FC1F7FE2B880F911D9695B3
+:1006F000879597F90895990F0008550FAA0BE0E820
+:10070000FEEF16161706E807F907C0F012161306D3
+:10071000E407F50798F0621B730B840B950B39F413
+:100720000A2661F0232B242B252B21F408950A2679
+:1007300009F4A140A6958FEF811D811D0895F894BD
+:02074000FFCFE9
+:1007420000000000000000000000000000000000A7
+:10075200000000806D440AD7233C02000100000023
+:0807620000000000000000008F
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer.sh b/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer.sh new file mode 100644 index 0000000..b6782eb --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_therm_buzzer.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_therm_buzzer.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections therm_buzzer_main.c -o therm_buzzer -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom therm_buzzer therm_buzzer.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:therm_buzzer.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer_main.c b/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer_main.c new file mode 100644 index 0000000..d729be2 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/thermistor/therm_buzzer_main.c @@ -0,0 +1,253 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct therm_buzzer_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct therm_buzzer_fmi2Component_s { + fmi2Real currentTime; + fmi2Real fmi2RealVars[2]; + fmi2Boolean fmi2BooleanVars[3]; + fmi2Real fmi2RealParameter[2]; + fmi2Integer fmi2IntegerParameter[1]; + fmi2Boolean fmi2BooleanParameter[1]; + fmi2String fmi2StringParameter[1]; + void* extObjs[4]; +} therm_buzzer_fmi2Component; + +therm_buzzer_fmi2Component therm_buzzer_component = { + .fmi2RealVars = { + 0.0 /*adc._y*/, + 0.0 /*realValue1._number*/, + }, + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + fmi2False /*booleanExpression2._y*/, + fmi2False /*digitalWriteBoolean1._u*/, + }, + .fmi2RealParameter = { + 950.0 /*greaterEqualThreshold1._threshold*/, + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, + .fmi2IntegerParameter = { + 2 /*realValue1._significantDigits*/, + }, + .fmi2BooleanParameter = { + fmi2True /*realValue1._use_numberPort*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +static const char * const OMCLIT0 = "ElectricPotential"; +static const char * const OMCLIT1 = "V"; +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" +#include "MDDAVRAnalog.h" + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution) +{ + fmi2Real om_value; + om_value = MDD_avr_analog_read(om_analogPort, om_vref, om_voltageResolution); + return om_value; +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage) +{ + void* om_avr; + om_avr = MDD_avr_analog_init(om_divisionFactor, om_referenceVoltage); + return om_avr; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr) +{ + MDD_avr_analog_close(om_avr); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component therm_buzzer_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &therm_buzzer_component; +} + +fmi2Status therm_buzzer_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status therm_buzzer_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 4, 4); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + comp->extObjs[0] /* adc._analog EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Analog.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(comp, 7, 1); + return fmi2OK; +} + +fmi2Status therm_buzzer_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status therm_buzzer_functionODE(fmi2Component comp) +{ +} + +static fmi2Status therm_buzzer_functionOutputs(fmi2Component comp) +{ + comp->fmi2RealVars[0] /* adc._y variable */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(comp, 5, 1024.0, 10); /* equation 7 */ + comp->fmi2BooleanVars[2] /* digitalWriteBoolean1._u DISCRETE */ = (comp->fmi2RealVars[0] /* adc._y variable */)>=(comp->fmi2RealParameter[0] /* greaterEqualThreshold1._threshold PARAM */); /* equation 8 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 4, comp->fmi2BooleanVars[2] /* digitalWriteBoolean1._u DISCRETE */); +} + +fmi2Status therm_buzzer_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + therm_buzzer_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = therm_buzzer_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + therm_buzzer_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + therm_buzzer_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + therm_buzzer_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = therm_buzzer_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/MDD_build/thermistor/therm_read b/tools/openmodelica/linux/MDD_build/thermistor/therm_read Binary files differnew file mode 100644 index 0000000..93f6d1f --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/thermistor/therm_read diff --git a/tools/openmodelica/linux/MDD_build/thermistor/therm_read.hex b/tools/openmodelica/linux/MDD_build/thermistor/therm_read.hex new file mode 100644 index 0000000..32ec1b8 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/thermistor/therm_read.hex @@ -0,0 +1,110 @@ +:100000000C9434000C9451000C9451000C94510049
+:100010000C9451000C9451000C9451000C94130159
+:100020000C9451000C9451000C9451000C94E2007B
+:100030000C9451000C9451000C94B1000C9451009C
+:100040000C9451000C9451000C9451000C945100EC
+:100050000C9451000C9451000C9451000C945100DC
+:100060000C9451000C94510011241FBECFEFD8E026
+:10007000DEBFCDBF11E0A0E0B1E0ECEAF6E002C0E7
+:1000800005900D92AC31B107D9F711E0ACE1B1E0C8
+:1000900001C01D92A132B107E1F70E9467010C94E3
+:1000A00054030C940000CF93DF93EC0180917C000B
+:1000B000857E846080937C0080917A008064809348
+:1000C0007A0080917A0086FDFCCF60917800709173
+:1000D000790080E090E00E94630220E030E040EA96
+:1000E00050E40E94F10220E030EC4FE754E40E941B
+:1000F000FB016C837D838E839F838A8D9B8D8230F1
+:10010000910561F08330910599F00197C9F416BC0F
+:1001100080916E00826080936E0016C01092850000
+:100120001092840080916F00826080936F000CC0F9
+:100130001092B2008091700082608093700004C0C1
+:1001400081E090E00E94540378949FB7F8948091E6
+:100150001E019FBF8823C9F310921E01DF91CF912A
+:1001600008951F920F920FB60F9211242F933F9371
+:100170008F939F9380911C0190911D010196909304
+:100180001D0180931C0180911E01813091F020910E
+:100190001C0130911D0180911F01909120012817B1
+:1001A000390738F081E080931E0110921D011092F2
+:1001B0001C019F918F913F912F910F900FBE0F9037
+:1001C0001F9018951F920F920FB60F9211242F9324
+:1001D0003F938F939F9380911C0190911D010196F5
+:1001E00090931D0180931C0180911E01813091F03C
+:1001F00020911C0130911D0180911F0190912001DF
+:100200002817390738F081E080931E0110921D01F4
+:1002100010921C019F918F913F912F910F900FBED3
+:100220000F901F9018951F920F920FB60F921124E6
+:100230002F933F938F939F9380911C0190911D0169
+:10024000019690931D0180931C0180911E018130C5
+:1002500091F020911C0130911D0180911F0190911E
+:1002600020012817390738F081E080931E01109291
+:100270001D0110921C019F918F913F912F910F9022
+:100280000FBE0F901F901895FC01ACE7B0E08C9169
+:100290008C93AAE7B0E08C9181688C93178A168AB8
+:1002A00085B5836085BD81E090E0918F808F2AE0E5
+:1002B00030E03093200120931F0124B5226024BD3B
+:1002C00029EF27BD938F828F80E090E00895CF9231
+:1002D000DF92EF92FF9280E091E00E944401C12CF6
+:1002E000D12C760160E070E0CB0160930001709347
+:1002F0000101809302019093030180E091E00E944C
+:1003000053008FEFC81AD80AE80AF80AC701B601E5
+:100310000E9463022FE632E143E05BE30E94F102B8
+:1003200020E030E0A9010E949701DFCF5058BB27A1
+:10033000AA270ED01CC10DD130F012D120F031F41B
+:100340009F3F11F41EF402C10EF4E095E7FBF8C0E4
+:10035000E92F1ED180F3BA17620773078407950748
+:1003600018F071F49EF536C10EF4E0950B2EBA2FFD
+:10037000A02D0B01B90190010C01CA01A0011124AB
+:10038000FF27591B99F0593F50F4503E68F11A1657
+:10039000F040A22F232F342F4427585FF3CF4695E8
+:1003A00037952795A795F0405395C9F77EF41F160A
+:1003B000BA0B620B730B840BBAF09150A1F0FF0FD4
+:1003C000BB1F661F771F881FC2F70EC0BA0F621FC0
+:1003D000731F841F48F4879577956795B795F795B0
+:1003E0009E3F08F0B3CF9395880F08F09927EE0F42
+:1003F0009795879508950CD0BAC0B2D040F0A9D097
+:1004000030F021F45F3F19F09BC05111E4C09EC051
+:10041000BFD098F39923C9F35523B1F3951B550B1E
+:10042000BB27AA2762177307840738F09F5F5F4FC7
+:10043000220F331F441FAA1FA9F333D00E2E3AF008
+:10044000E0E830D091505040E695001CCAF729D022
+:10045000FE2F27D0660F771F881FBB1F2617370771
+:100460004807AB07B0E809F0BB0B802DBF01FF27A1
+:1004700093585F4F2AF09E3F510568F061C0ABC0B2
+:100480005F3FECF3983EDCF3869577956795B795DB
+:10049000F7959F5FC9F7880F911D9695879597F9F6
+:1004A0000895E1E0660F771F881FBB1F621773076F
+:1004B0008407BA0720F0621B730B840BBA0BEE1F84
+:1004C00088F7E0950895E89409C097FB3EF490956D
+:1004D0008095709561957F4F8F4F9F4F9923A9F01D
+:1004E000F92F96E9BB279395F695879577956795AC
+:1004F000B795F111F8CFFAF4BB0F11F460FF1BC0F0
+:100500006F5F7F4F8F4F9F4F16C0882311F096E982
+:1005100011C0772321F09EE8872F762F05C0662330
+:1005200071F096E8862F70E060E02AF09A95660FE9
+:10053000771F881FDAF7880F9695879597F90895A2
+:1005400097F99F6780E870E060E008959FEF80EC86
+:10055000089500240A941616170618060906089529
+:1005600000240A9412161306140605060895092E8F
+:100570000394000C11F4882352F0BB0F40F4BF2BFE
+:1005800011F460FF04C06F5F7F4F8F4F9F4F08953E
+:1005900057FD9058440F551F59F05F3F71F0479534
+:1005A000880F97FB991F61F09F3F79F08795089519
+:1005B000121613061406551FF2CF4695F1DF08C038
+:1005C000161617061806991FF1CF86957105610555
+:1005D00008940895E894BB2766277727CB0197F9FD
+:1005E00008950BD0C4CFB5DF28F0BADF18F09523FB
+:1005F00009F0A6CFABCF1124EECFCADFA0F3959FB1
+:10060000D1F3950F50E0551F629FF001729FBB27F9
+:10061000F00DB11D639FAA27F00DB11DAA1F649FA5
+:100620006627B00DA11D661F829F2227B00DA11D58
+:10063000621F739FB00DA11D621F839FA00D611DDE
+:10064000221F749F3327A00D611D231F849F600DFF
+:10065000211D822F762F6A2F11249F5750408AF038
+:10066000E1F088234AF0EE0FFF1FBB1F661F771FC4
+:10067000881F91505040A9F79E3F510570F060CF00
+:10068000AACF5F3FECF3983EDCF3869577956795AC
+:10069000B795F795E7959F5FC1F7FE2B880F911DE2
+:0C06A0009695879597F90895F894FFCF80
+:1006AC000000000000000000000000000AD7233CFE
+:0C06BC000200010000000000000000002F
+:00000001FF
diff --git a/tools/openmodelica/linux/MDD_build/thermistor/therm_read.sh b/tools/openmodelica/linux/MDD_build/thermistor/therm_read.sh new file mode 100644 index 0000000..9c1adac --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/thermistor/therm_read.sh @@ -0,0 +1,61 @@ +#!/bin/bash +clear +if [ "$#" -ne 2 ]; then + echo "Usage: $0 port baudrate" >&2 + exit 1 +fi + +re='^[0-9]+$' +if ! [[ $1 =~ $re ]] ; then + echo "error: $1 -> Not a number" >&2; exit 1 +fi + +if ! [[ $2 =~ $re ]] ; then + echo "error: $2-> Not a number" >&2; exit 1 +fi + +b_rate=$2 + +present=`pwd` +unamestr=`uname` + +if [[ "$unamestr" == 'Linux' ]]; then + mdd_path=($(locate Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include)) + om_path=($(locate /usr/include/omc/c)) + port="/dev/ttyACM$1" + omc --simCodeTarget=ExperimentalEmbeddedC runMDD_therm_read.mos + if [ $? -ne 0 ]; then + exit 1 + fi +else + cd c: + om_path=($(dir -d OpenModelica*/include/omc/c/)) + path_to_om="C:$om_path" + cd f: + mdd_path=($(dir -d */Modelica_DeviceDrivers/Modelica_DeviceDrivers/Resources/Include/)) + if [ $? -eq 0 ]; then + path_to_mdd="F:/$mdd_path" + else + exit 1 + fi + + port="COM$1" + cd $present + omc --simCodeTarget=ExperimentalEmbeddedC run_therm_read.mos + if [ $? -ne 0 ]; then + exit 1 + fi +fi + +avr-gcc -Os -std=c11 -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000UL -Wl,--gc-sections therm_read_main.c -o therm_read -I${mdd_path[0]} -I${path_to_om} -I${path_to_mdd} -I${om_path[0]} +if [ $? -ne 0 ]; then + exit 1 +fi +avr-objcopy -O ihex -R .eeprom therm_read therm_read.hex +if [ $? -ne 0 ]; then + exit 1 +fi +avrdude -F -V -c arduino -p ATMEGA328P -P $port -b $b_rate -U flash:w:therm_read.hex +if [ $? -ne 0 ]; then + exit 1 +fi
\ No newline at end of file diff --git a/tools/openmodelica/linux/MDD_build/thermistor/therm_read_main.c b/tools/openmodelica/linux/MDD_build/thermistor/therm_read_main.c new file mode 100644 index 0000000..e3aa656 --- /dev/null +++ b/tools/openmodelica/linux/MDD_build/thermistor/therm_read_main.c @@ -0,0 +1,226 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct therm_read_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct therm_read_fmi2Component_s { + fmi2Real currentTime; + fmi2Real fmi2RealVars[2]; + fmi2Real fmi2RealParameter[1]; + fmi2Integer fmi2IntegerParameter[1]; + fmi2Boolean fmi2BooleanParameter[1]; + fmi2String fmi2StringParameter[1]; + void* extObjs[3]; +} therm_read_fmi2Component; + +therm_read_fmi2Component therm_read_component = { + .fmi2RealVars = { + 0.0 /*adc._y*/, + 0.0 /*realValue1._number*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, + .fmi2IntegerParameter = { + 2 /*realValue1._significantDigits*/, + }, + .fmi2BooleanParameter = { + fmi2True /*realValue1._use_numberPort*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +static const char * const OMCLIT0 = "ElectricPotential"; +static const char * const OMCLIT1 = "V"; +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution) +{ + fmi2Real om_value; + om_value = MDD_avr_analog_read(om_analogPort, om_vref, om_voltageResolution); + return om_value; +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage) +{ + void* om_avr; + om_avr = MDD_avr_analog_init(om_divisionFactor, om_referenceVoltage); + return om_avr; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr) +{ + MDD_avr_analog_close(om_avr); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component therm_read_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &therm_read_component; +} + +fmi2Status therm_read_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status therm_read_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* adc._analog EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Analog.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(comp, 1, 1); + comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + return fmi2OK; +} + +fmi2Status therm_read_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status therm_read_functionODE(fmi2Component comp) +{ +} + +static fmi2Status therm_read_functionOutputs(fmi2Component comp) +{ + comp->fmi2RealVars[0] /* adc._y variable */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(comp, 5, 5.0, 10); /* equation 4 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */); +} + +fmi2Status therm_read_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + therm_read_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = therm_read_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + therm_read_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + therm_read_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + therm_read_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = therm_read_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/linux/Resources/Images/Icons/tqfp32.png b/tools/openmodelica/linux/Resources/Images/Icons/tqfp32.png Binary files differnew file mode 100644 index 0000000..f933f6a --- /dev/null +++ b/tools/openmodelica/linux/Resources/Images/Icons/tqfp32.png diff --git a/tools/openmodelica/linux/Resources/Include/analog.h b/tools/openmodelica/linux/Resources/Include/analog.h new file mode 100644 index 0000000..a761139 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Include/analog.h @@ -0,0 +1,2 @@ +int cmd_analog_out(int h,int pin_no,double val); +uint16_t cmd_analog_in(int h,int pin_no);
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/Include/analogv.h b/tools/openmodelica/linux/Resources/Include/analogv.h new file mode 100644 index 0000000..a761139 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Include/analogv.h @@ -0,0 +1,2 @@ +int cmd_analog_out(int h,int pin_no,double val); +uint16_t cmd_analog_in(int h,int pin_no);
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/Include/dcmotor.h b/tools/openmodelica/linux/Resources/Include/dcmotor.h new file mode 100644 index 0000000..90314fc --- /dev/null +++ b/tools/openmodelica/linux/Resources/Include/dcmotor.h @@ -0,0 +1,3 @@ +void cmd_dcmotor_setup(int h,int driver_type,int motor_no,int pin_no_1,int pin_no_2); +void cmd_dcmotor_run(int h,int motor_no,int u1); +void cmd_dcmotor_release(int h,int motor_no);
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/Include/digital.h b/tools/openmodelica/linux/Resources/Include/digital.h new file mode 100644 index 0000000..c628bb8 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Include/digital.h @@ -0,0 +1,2 @@ +int cmd_digital_out(int h,int pin_no,int val); +int cmd_digital_in(int h,int pin_no);
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/Include/encoder.h b/tools/openmodelica/linux/Resources/Include/encoder.h new file mode 100644 index 0000000..2559766 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Include/encoder.h @@ -0,0 +1 @@ +void cmd_encoder_init(int h,int enc_mode,int pin_no_1,int pin_no_2);
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/Include/ieeesingle2num.h b/tools/openmodelica/linux/Resources/Include/ieeesingle2num.h new file mode 100644 index 0000000..27d701a --- /dev/null +++ b/tools/openmodelica/linux/Resources/Include/ieeesingle2num.h @@ -0,0 +1,3 @@ +long int hex2dec(char hexadecimal[]); +void dec2hex(long int decimalnum,char hexadecimalnum[]); +double ieeesingle2num(char hexa[]);
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/Include/modbus.h b/tools/openmodelica/linux/Resources/Include/modbus.h new file mode 100644 index 0000000..7a5c8d1 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Include/modbus.h @@ -0,0 +1,4 @@ +double read_val(int addr_byte); +void read_voltage(); +void read_current(); +void read_active_power();
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/Include/serial.h b/tools/openmodelica/linux/Resources/Include/serial.h new file mode 100644 index 0000000..c0cfed5 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Include/serial.h @@ -0,0 +1,28 @@ +#include <errno.h> +#include <termios.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> /* memset */ +#include <stdio.h> + +int set_interface_attribs (int fd, int speed, int parity); +void set_blocking (int b, int should_block); +int open_serial(int handle,int port, int baudrate); +int close_serial(int handle); +int write_serial(int handle, char str[],int size); +int status_serial(int handle,int nb[]); +int read_serial(int handle,char* buf,int size); +//int read_serial(int *handle,char buf[],int *size); + +void delay(long int t); + + + +/*int set_interface_attribs (int fd, int speed, int parity); +void set_blocking (int b, int should_block); +void open_serial(int *handle,int *port, int *baudrate, int *OK); +void close_serial(int *handle, int *OK); +void write_serial(int *handle, char str[],int *size, int *OK); +void status_serial(int *handle, int *OK,int *nbread, int *nbwrite); +void read_serial(int *handle,char buf[],int *size); +*/
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/Include/servomotor.h b/tools/openmodelica/linux/Resources/Include/servomotor.h new file mode 100644 index 0000000..53b7457 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Include/servomotor.h @@ -0,0 +1,3 @@ +void cmd_servo_attach(int h,int servo_no); +void cm_servo_move(int h,int servo_no,int u1); +void cmd_servo_detach(int h,int servo_no);
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/Library/cmd_analog.o b/tools/openmodelica/linux/Resources/Library/cmd_analog.o Binary files differnew file mode 100644 index 0000000..47df91e --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/cmd_analog.o diff --git a/tools/openmodelica/linux/Resources/Library/cmd_analog_volt.o b/tools/openmodelica/linux/Resources/Library/cmd_analog_volt.o Binary files differnew file mode 100644 index 0000000..0f94393 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/cmd_analog_volt.o diff --git a/tools/openmodelica/linux/Resources/Library/cmd_digital.o b/tools/openmodelica/linux/Resources/Library/cmd_digital.o Binary files differnew file mode 100644 index 0000000..e05c668 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/cmd_digital.o diff --git a/tools/openmodelica/linux/Resources/Library/dcmotor.o b/tools/openmodelica/linux/Resources/Library/dcmotor.o Binary files differnew file mode 100644 index 0000000..f86e9c6 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/dcmotor.o diff --git a/tools/openmodelica/linux/Resources/Library/delay.o b/tools/openmodelica/linux/Resources/Library/delay.o Binary files differnew file mode 100644 index 0000000..5aa9222 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/delay.o diff --git a/tools/openmodelica/linux/Resources/Library/ieeesingle2num.o b/tools/openmodelica/linux/Resources/Library/ieeesingle2num.o Binary files differnew file mode 100644 index 0000000..9d35dc6 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/ieeesingle2num.o diff --git a/tools/openmodelica/linux/Resources/Library/libAnalog.so b/tools/openmodelica/linux/Resources/Library/libAnalog.so Binary files differnew file mode 100644 index 0000000..cefb472 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/libAnalog.so diff --git a/tools/openmodelica/linux/Resources/Library/libAnalogv.so b/tools/openmodelica/linux/Resources/Library/libAnalogv.so Binary files differnew file mode 100644 index 0000000..c344625 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/libAnalogv.so diff --git a/tools/openmodelica/linux/Resources/Library/libDCMotor.so b/tools/openmodelica/linux/Resources/Library/libDCMotor.so Binary files differnew file mode 100644 index 0000000..e1be915 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/libDCMotor.so diff --git a/tools/openmodelica/linux/Resources/Library/libDigital.so b/tools/openmodelica/linux/Resources/Library/libDigital.so Binary files differnew file mode 100644 index 0000000..8ae4c56 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/libDigital.so diff --git a/tools/openmodelica/linux/Resources/Library/libModbus.so b/tools/openmodelica/linux/Resources/Library/libModbus.so Binary files differnew file mode 100644 index 0000000..0247a2c --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/libModbus.so diff --git a/tools/openmodelica/linux/Resources/Library/libSerialComm.so b/tools/openmodelica/linux/Resources/Library/libSerialComm.so Binary files differnew file mode 100644 index 0000000..9f20a5e --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/libSerialComm.so diff --git a/tools/openmodelica/linux/Resources/Library/libServoMotor.so b/tools/openmodelica/linux/Resources/Library/libServoMotor.so Binary files differnew file mode 100644 index 0000000..bd8977a --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/libServoMotor.so diff --git a/tools/openmodelica/linux/Resources/Library/libdelay.so b/tools/openmodelica/linux/Resources/Library/libdelay.so Binary files differnew file mode 100644 index 0000000..65b5090 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/libdelay.so diff --git a/tools/openmodelica/linux/Resources/Library/libfloor.so b/tools/openmodelica/linux/Resources/Library/libfloor.so Binary files differnew file mode 100644 index 0000000..9550ad1 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/libfloor.so diff --git a/tools/openmodelica/linux/Resources/Library/mfloor.o b/tools/openmodelica/linux/Resources/Library/mfloor.o Binary files differnew file mode 100644 index 0000000..2785ec6 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/mfloor.o diff --git a/tools/openmodelica/linux/Resources/Library/modbus.o b/tools/openmodelica/linux/Resources/Library/modbus.o Binary files differnew file mode 100644 index 0000000..d465071 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/modbus.o diff --git a/tools/openmodelica/linux/Resources/Library/serialComm.o b/tools/openmodelica/linux/Resources/Library/serialComm.o Binary files differnew file mode 100644 index 0000000..cf30ea8 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/serialComm.o diff --git a/tools/openmodelica/linux/Resources/Library/servomotor.o b/tools/openmodelica/linux/Resources/Library/servomotor.o Binary files differnew file mode 100644 index 0000000..cdf0284 --- /dev/null +++ b/tools/openmodelica/linux/Resources/Library/servomotor.o diff --git a/tools/openmodelica/linux/Resources/src/cmd_analog.c b/tools/openmodelica/linux/Resources/src/cmd_analog.c new file mode 100644 index 0000000..5a8cf2f --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/cmd_analog.c @@ -0,0 +1,61 @@ +#include <errno.h> +#include <termios.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> /* memset */ +#include <stdio.h> +#include <math.h> +#include <stdlib.h> +#include <stdint.h> +#include "../Include/serial.h" +#include "../Include/analog.h" + +uint16_t cmd_analog_in(int h,int pin_no) +{ + char pin[5],v1[2]; + int stat; + int read[3]; + sprintf(v1,"%c",pin_no+48); + strcpy(pin,"A"); + strcat(pin,v1); + int wr=write_serial(h,pin,2); + stat=status_serial(h,read); + //printf("Read:%d\n",read[0] ); + while (read[0] < 2) + stat=status_serial(h,read); + char values[5]; + int a_rd=read_serial(h,values,2); + values[2]='\0'; + printf("%s\n",values); + int l=strlen(values); + //printf("%d\n",l ); + uint8_t temp[l+1]; + int i; + for (i = 0; i < l; ++i) + { + temp[i]=(uint8_t)(values[i]); + } + //printf("%u %u\n",temp[0],temp[1]); + uint16_t result=(uint16_t)(256*temp[1]+temp[0]); + //printf("%u\n",result); + return result; +} + +int cmd_analog_out(int h,int pin_no,double val) +{ + char v1[2],v2[2]; + if(val > 255) + val = 255; + else if(val < 0) + val = 0; + //printf("%f\n",val); + char code_sent[10]; + strcpy(code_sent,"W"); + sprintf(v1,"%c",pin_no+48); + sprintf(v2,"%c",abs(ceil(val))); + strcat(code_sent,v1); + strcat(code_sent,v2); + //printf("%s\n",code_sent); + return write_serial(h,code_sent,3); + +}
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/src/cmd_analog_volt.c b/tools/openmodelica/linux/Resources/src/cmd_analog_volt.c new file mode 100644 index 0000000..701c0c0 --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/cmd_analog_volt.c @@ -0,0 +1,63 @@ +#include <errno.h> +#include <termios.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> /* memset */ +#include <stdio.h> +#include <math.h> +#include <stdint.h> +#include <stdlib.h> +#include "../Include/serial.h" +#include "../Include/analogv.h" + +uint16_t cmd_analog_in_volt(int h,int pin_no) +{ + char pin[5]="A",v1[2]; + int stat; + int read[3]; + sprintf(v1,"%c",pin_no+48); + //strcpy(pin,"A"); + strcat(pin,v1); + int wr=write_serial(h,pin,2); + stat=status_serial(h,read); + //printf("Read:%d\n",read[0] ); + while (read[0] < 2) + stat=status_serial(h,read); + char values[5]; + int a_rd=read_serial(h,values,2); + values[2]='\0'; + printf("%s\n",values); + int l=strlen(values); + //printf("%d\n",l ); + uint8_t temp[l+1]; + int i; + for (i = 0; i < l; ++i) + { + temp[i]=(uint8_t)(values[i]); + } + //printf("%u %u\n",temp[0],temp[1]); + uint16_t result=(uint16_t)(256*temp[1]+temp[0]); + result/=1023; + //printf("%u\n",result); + return result; +} + +int cmd_analog_out_volt(int h,int pin_no,double val) +{ + char v1[2],v2[2]; + if(val > 5) + val = 5; + else if(val < 0) + val = 0; + val=val*255/5; + //printf("%f\n",val); + char code_sent[10]; + strcpy(code_sent,"W"); + sprintf(v1,"%c",pin_no+48); + sprintf(v2,"%c",abs(ceil(val))); + strcat(code_sent,v1); + strcat(code_sent,v2); + //printf("%s\n",code_sent); + return write_serial(h,code_sent,3); + +}
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/src/cmd_digital.c b/tools/openmodelica/linux/Resources/src/cmd_digital.c new file mode 100644 index 0000000..f19d23b --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/cmd_digital.c @@ -0,0 +1,63 @@ +#include <errno.h> +#include <termios.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> /* memset */ +#include <stdio.h> +#include <stdlib.h> +#include "../Include/serial.h" +#include "../Include/digital.h" + +int cmd_digital_out(int h,int pin_no,int val) +{ + int wr; + char pin[6]="Da"; + char v[2],temp[2]; + sprintf(temp,"%c",pin_no+48); + strcat(pin,temp); + strcat(pin,"1"); + //printf("%s",pin); + wr=write_serial(h,pin,4); + if (val > 0.5) + val = 1; + else + val = 0; + + sprintf(v,"%d",val); + strcpy(pin,"Dw"); + strcat(pin,temp); + strcat(pin,v); + //printf("%s",pin); + wr=write_serial(h,pin,4); + return wr; +} + +int cmd_digital_in(int h,int pin_no) +{ + int value = 0; + char pin[6]="Da"; + char v1[2],v2[2]; + int wr1, wr2; + sprintf(v1,"%c",pin_no+48); + strcat(pin,v1); + strcat(pin,"0"); + //printf("%s\n",pin); + wr1=write_serial(h,pin,4); + + strcpy(pin,"Dr"); + sprintf(v2,"%c",pin_no+48); + strcat(pin,v2); + wr2=write_serial(1,pin,3); + //binary transfer + int stat; + int num_bytes[2]; + char st[10]; + stat=status_serial(h,num_bytes); + while(num_bytes[0]<1) + stat=status_serial(h,num_bytes); + char* temp; + int wr=read_serial(h,st,1); + value=strtod(st,&temp); + //printf("%d\n",value); + return value; +} diff --git a/tools/openmodelica/linux/Resources/src/cmd_encoder_init.c b/tools/openmodelica/linux/Resources/src/cmd_encoder_init.c new file mode 100644 index 0000000..89a53dd --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/cmd_encoder_init.c @@ -0,0 +1,39 @@ +#include <errno.h> +#include <string.h> +#include <stdio.h> +#include <math.h> +#include <stdlib.h> +#include "../Include/encoder.h" +#include "../Include/serial.h" + +void cmd_encoder_init(int h,int enc_mode,int pin_no_1,int pin_no_2) +{ + + int wr; + char code_sent[10]="Ea"; + char c[2]; + + sprintf(c,"%c",48+corresp[block->rpar[2]]); + strcat(code_sent,c); + if(block.rpar(2)==4) + { + char c1[2],c2[2],v[10]; + sprintf(c1,"%c",48+0+corresp[block->rpar[3]]); + sprintf(v,"%s",(block->rpar[1])); + strcat(code_sent,c1); + strcat(code_sent,v); + } + else + { + char c2[2],v[10]; + sprintf(c2,"%c",48+0+corresp[block->rpar[3]]); + sprintf(v,"%s",block->rpar[1]); + strcat(code_sent,c1); + strcat(code_sent,v); + } + wr=write_serial(1,code_sent,5); + strcpy(code_sent,"Ez"); + sprintf(c,"%c",corresp[block->rpar[2]]) + strcat(code_sent,c); + wr=write_serial(1,code_sent,3) +}
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/src/dcmotor.c b/tools/openmodelica/linux/Resources/src/dcmotor.c new file mode 100644 index 0000000..ac6775c --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/dcmotor.c @@ -0,0 +1,117 @@ +#include <errno.h> +#include <termios.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> +#include <stdio.h> +#include <math.h> +#include "../Include/serial.h" +#include "../Include/dcmotor.h" + +#define abs(x) (x>=0?x:-x) + +void cmd_dcmotor_setup(int h,int driver_type,int motor_no,int pin_no_1,int pin_no_2) +{ + printf("init DCmotor\n"); + char code_sent[10]="C"; + int wr; + char v1[2],v2[2],motor[2]; + if(driver_type==1) + { + sprintf(v1,"%c",pin_no_1+48); + sprintf(v2,"%c",pin_no_2+48); + sprintf(motor,"%c",motor_no+48); + strcat(code_sent,motor); + strcat(code_sent,v1); + strcat(code_sent,v2); + strcat(code_sent,"1"); + } + //code_sent="C"+string(motor_no)+ascii(48+pin_no_1)+ascii(48+pin_no_2)+"1"; //adafruit + else if(driver_type==2) + { + sprintf(v1,"%c",pin_no_1+48); + sprintf(v2,"%c",pin_no_2+48); + sprintf(motor,"%c",motor_no+48); + strcat(code_sent,motor); + strcat(code_sent,v1); + strcat(code_sent,v2); + strcat(code_sent,"1"); + } + //code_sent="C"+string(motor_no)+ascii(48+pin_no_1)+ascii(48+pin_no_2)+"1"; //code pour initialiser L298 + else if(driver_type==3) + { + sprintf(v1,"%c",pin_no_1+48); + sprintf(v2,"%c",pin_no_2+48); + sprintf(motor,"%c",motor_no+48); + strcat(code_sent,motor); + strcat(code_sent,v1); + strcat(code_sent,v2); + strcat(code_sent,"0"); + + } + // code_sent="C"+string(motor_no)+ascii(48+pin_no_1)+ascii(48+pin_no_2)+"0"; //code pour initialiser L293 + //printf("%s\n",code_sent); + wr=write_serial(h,code_sent,5); + + int stat; + int num_bytes[2]; + //Attente que l'arduino reponde OK + stat=status_serial(1,num_bytes); + while (num_bytes[0] < 2) + stat=status_serial(1,num_bytes); + char values[5]; + int dcm_rd=read_serial(1,values,2); + if (dcm_rd == 0) + printf("Init motor successful\n"); + else + printf("Init motor unsuccessful\n"); +} + +void cmd_dcmotor_run(int h,int motor_no,int u1) +{ + char code_dir[2]; + char code_sent[10]="M"; + char motor[2]; + int val; + char v[2]; + if(u1>=0) + sprintf(code_dir,"%c",49); + //code_dir=ascii(49); + else + sprintf(code_dir,"%c",48); + //code_dir=ascii(48); + if(abs(u1)>255) + val=255; + else + val=abs(ceil(u1)); + //printf("%d\n",val); + sprintf(motor,"%c",motor_no+48); + sprintf(v,"%c",val); + strcat(code_sent,motor); + strcat(code_sent,code_dir); + strcat(code_sent,v); + //printf("%s\n",code_sent); + //code_sent="M"+ascii(48+motor_no)+code_dir+ascii(val); + int wr=write_serial(h,code_sent,4); +} + +void cmd_dcmotor_release(int h,int motor_no) +{ + char code_sent[6]="M"; + char motor[2]; + char v[2]; + sprintf(motor,"%c",motor_no+48); + sprintf(v,"%c",0); + strcat(code_sent,motor); + strcat(code_sent,"1"); + strcat(code_sent,v); + //code_sent="M"+ascii(48+motor_no)+"1"+ascii(0); + //printf("%s\n",code_sent); + int wr=write_serial(h,code_sent,4); + strcpy(code_sent,"M"); + strcat(code_sent,motor); + strcat(code_sent,"r"); + //printf("%s\n",code_sent); + //code_sent="M"+ascii(48+motor_no)+"r"; + wr=write_serial(h,code_sent,3); +} diff --git a/tools/openmodelica/linux/Resources/src/delay.c b/tools/openmodelica/linux/Resources/src/delay.c new file mode 100644 index 0000000..707a9bd --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/delay.c @@ -0,0 +1,10 @@ +#include <stdio.h> +#include <stdlib.h> +#include <time.h> +#include <math.h> +#include <unistd.h> + +void delay(long int t) +{ + usleep(abs(t*1000)); +}
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/src/ieeesingle2num.c b/tools/openmodelica/linux/Resources/src/ieeesingle2num.c new file mode 100644 index 0000000..7331193 --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/ieeesingle2num.c @@ -0,0 +1,87 @@ +#include <errno.h> +#include <termios.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include <ctype.h> +#include "../Include/serial.h" + +#ifdef NAN +/* NAN is supported */ +#endif +#ifdef INFINITY +/* INFINITY is supported */ +#endif + + +long int hex2dec(char hexadecimal[]) +{ + long int decimalNumber=0; + char hexDigits[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', + '9', 'A', 'B', 'C', 'D', 'E', 'F'}; + int i, j, power=0; + + /* Converting hexadecimal number to decimal number */ + for(i=strlen(hexadecimal)-1; i >= 0; i--) { + /*search currect character in hexDigits array */ + if(isalpha(hexadecimal[i])) + hexadecimal[i]=toupper(hexadecimal[i]); + for(j=0; j<16; j++){ + if(hexadecimal[i] == hexDigits[j]){ + decimalNumber += j*pow(16, power); + } + // } + power++; + } + } + return decimalNumber; +} + +void dec2hex(long int decimalnum,char hexadecimalnum[]) +{ + long quotient, remainder; + int j = 1; + quotient = decimalnum; + + while (quotient != 0) + { + remainder = quotient % 16; + if (remainder < 10) + hexadecimalnum[j--] = 48 + remainder; + else + hexadecimalnum[j--] = 55 + remainder; + quotient = quotient / 16; + } + hexadecimalnum[2]='\0'; +} + +double ieeesingle2num(char hexa[]) +{ + long int x=hex2dec(hexa); + long int k =(long int)pow(2,31); //pow2(31); + int s = (x >= k); + if (s) + x = x - k; + //t = pow2(x,-23); + double t = x*pow(2,-23); + long int e = floor(t); + double f = t - e; + double y; + if (e == 255) + if(f == 0) + y = INFINITY; + else + y = NAN; + else if(e > 0) + y = (1+f)*pow(2,e-127); + //y = (1+f).*2.^(e-127); + else + y = f*pow(2,-126); + //y = f.*2.^-126; + if (s) + y = -y; + return y; +}
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/src/mfloor.c b/tools/openmodelica/linux/Resources/src/mfloor.c new file mode 100644 index 0000000..3c9e884 --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/mfloor.c @@ -0,0 +1,6 @@ +#include <math.h> + +int mfloor(double x) +{ + return floor(x); +}
\ No newline at end of file diff --git a/tools/openmodelica/linux/Resources/src/modbus.c b/tools/openmodelica/linux/Resources/src/modbus.c new file mode 100644 index 0000000..160bfb5 --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/modbus.c @@ -0,0 +1,449 @@ +#include <errno.h> +#include <termios.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> +#include <stdio.h> +#include <math.h> +#include "../Include/serial.h" +#include "../Include/ieeesingle2num.h" +#include "../Include/modbus.h" + +char ascii_n(int num) +{ + return (char)num; +} + +int ascii_c(char c) +{ + return (int)c; +} + +void read_voltage() +{ + char arr[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(86),ascii_n(00),ascii_n(2),ascii_n(39),ascii_n(15),'\0'}; + + //printf("%s\n",arr);//debug + + int x,wr,rd; + char buf[12]; + for(x=0;x<5;x++) + { + wr=write_serial(1,arr,8); + rd = read_serial(1,buf,11); + usleep(500); + } + buf[11]='\0'; + + //printf("%s\n",buf );//debug + + int b1=0,b2=0,b3=0,b4=0; + int myresult[12]; + int i; + for (i = 0; i < 11; ++i) + { + myresult[i]=ascii_c(buf[i]); + //printf("%d",myresult[i]);//debug + } + + //printf("%d %d %d %d\n",myresult[4],myresult[5],myresult[6],myresult[7]);//debug + + int a1=myresult[4]; + if (a1<16) + { + b1=1; + } + char v1[3]; + dec2hex(a1,v1); + if (b1) + { + sprintf(v1,"0%s",v1); + } + else + { + sprintf(v1,"%s",v1); + } + int a2=myresult[5]; + if (a2<16) + { + b2=1; + } + char v2[3]; + dec2hex(a2,v2); + if (b2) + { + sprintf(v2,"0%s",v2); + } + else + { + sprintf(v2,"%s",v2); + } + int a3=myresult[6]; + if (a3<16) + { + b3=1; + } + char v3[3]; + dec2hex(a3,v3); + if (b3) + { + sprintf(v3,"0%s",v3); + } + else + { + sprintf(v3,"%s",v3); + } + int a4=myresult[7]; + if (a4<16) + { + b4=1; + } + char v4[3]; + dec2hex(a4,v4); + if (b4) + { + sprintf(v4,"0%s",v4); + } + else + { + sprintf(v4,"%s",v4); + } + char a6[20]=""; + strcat(a6,v3); + strcat(a6,v4); + strcat(a6,v1); + strcat(a6,v2); + a6[8]='\0'; + + //printf("%s",a6);//debug + + int cl=close_serial(1); + double p=ieeesingle2num(a6); + printf("Voltage(in V)=%f\n",p); +} + + +void read_current() +{ + char arr[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(88),ascii_n(00),ascii_n(2),ascii_n(70),ascii_n(204),'\0'}; + //printf("%s\n",arr);//debug + + int x,wr,rd; + char buf[12]; + for(x=0;x<5;x++) + { + wr=write_serial(1,arr,8); + rd = read_serial(1,buf,11); + usleep(500); + } + buf[11]='\0'; + + //printf("%s\n",buf );//debug + + int b1=0,b2=0,b3=0,b4=0; + int myresult[12]; + int i; + for (i = 0; i < 11; ++i) + { + myresult[i]=ascii_c(buf[i]); + //printf("%d",myresult[i]);//debug + } + + //printf("%d %d %d %d\n",myresult[4],myresult[5],myresult[6],myresult[7]);//debug + + int a1=myresult[4]; + if (a1<16) + { + b1=1; + } + char v1[3]; + dec2hex(a1,v1); + if (b1) + { + sprintf(v1,"0%s",v1); + } + else + { + sprintf(v1,"%s",v1); + } + int a2=myresult[5]; + if (a2<16) + { + b2=1; + } + char v2[3]; + dec2hex(a2,v2); + if (b2) + { + sprintf(v2,"0%s",v2); + } + else + { + sprintf(v2,"%s",v2); + } + int a3=myresult[6]; + if (a3<16) + { + b3=1; + } + char v3[3]; + dec2hex(a3,v3); + if (b3) + { + sprintf(v3,"0%s",v3); + } + else + { + sprintf(v3,"%s",v3); + } + int a4=myresult[7]; + if (a4<16) + { + b4=1; + } + char v4[3]; + dec2hex(a4,v4); + if (b4) + { + sprintf(v4,"0%s",v4); + } + else + { + sprintf(v4,"%s",v4); + } + char a6[20]=""; + strcat(a6,v3); + strcat(a6,v4); + strcat(a6,v1); + strcat(a6,v2); + a6[8]='\0'; + + //printf("%s",a6);//debug + + int cl=close_serial(1); + double p=ieeesingle2num(a6); + printf("Current(in A)=%f\n",p); +} + +void read_active_power() +{ + char arr[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(78),ascii_n(00),ascii_n(2),ascii_n(167),ascii_n(8),'\0'}; + //printf("%s\n",arr);//debug + + int x,wr,rd; + char buf[12]; + for(x=0;x<5;x++) + { + wr=write_serial(1,arr,8); + rd = read_serial(1,buf,11); + usleep(500); + } + buf[11]='\0'; + + //printf("%s\n",buf );//debug + + int b1=0,b2=0,b3=0,b4=0; + int myresult[12]; + int i; + for (i = 0; i < 11; ++i) + { + myresult[i]=ascii_c(buf[i]); + //printf("%d",myresult[i]);//debug + } + + //printf("%d %d %d %d\n",myresult[4],myresult[5],myresult[6],myresult[7]);//debug + + int a1=myresult[4]; + if (a1<16) + { + b1=1; + } + char v1[3]; + dec2hex(a1,v1); + if (b1) + { + sprintf(v1,"0%s",v1); + } + else + { + sprintf(v1,"%s",v1); + } + int a2=myresult[5]; + if (a2<16) + { + b2=1; + } + char v2[3]; + dec2hex(a2,v2); + if (b2) + { + sprintf(v2,"0%s",v2); + } + else + { + sprintf(v2,"%s",v2); + } + int a3=myresult[6]; + if (a3<16) + { + b3=1; + } + char v3[3]; + dec2hex(a3,v3); + if (b3) + { + sprintf(v3,"0%s",v3); + } + else + { + sprintf(v3,"%s",v3); + } + int a4=myresult[7]; + if (a4<16) + { + b4=1; + } + char v4[3]; + dec2hex(a4,v4); + if (b4) + { + sprintf(v4,"0%s",v4); + } + else + { + sprintf(v4,"%s",v4); + } + char a6[20]=""; + strcat(a6,v3); + strcat(a6,v4); + strcat(a6,v1); + strcat(a6,v2); + a6[8]='\0'; + + //printf("%s",a6);//debug + + int cl=close_serial(1); + double p=ieeesingle2num(a6); + printf("Active Power(in W)=%f\n",p); +} + +double read_val(int addr_byte) +{ + char* arr; + if(addr_byte==86) + { + char code[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(86),ascii_n(00),ascii_n(2),ascii_n(39),ascii_n(15),'\0'}; + arr = code; + printf("Voltage(in V)="); + } + else if(addr_byte==88) + { + char code[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(88),ascii_n(00),ascii_n(2),ascii_n(70),ascii_n(204),'\0'}; + arr =code; + printf("Current(in A)="); + } + else if(addr_byte==78) + { + char code[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(78),ascii_n(00),ascii_n(2),ascii_n(167),ascii_n(8),'\0'}; + arr = code; + printf("Active Power(in W)="); + } + //printf("%s\n",arr);//debug + + int x,wr,rd; + char buf[12]; + for(x=0;x<5;x++) + { + wr=write_serial(1,arr,8); + rd = read_serial(1,buf,11); + usleep(500); + } + buf[11]='\0'; + + //printf("%s\n",buf );//debug + + int b1=0,b2=0,b3=0,b4=0; + int myresult[12]; + int i; + for (i = 0; i < 11; ++i) + { + myresult[i]=ascii_c(buf[i]); + //printf("%d",myresult[i]);//debug + } + + //printf("%d %d %d %d\n",myresult[4],myresult[5],myresult[6],myresult[7]);//debug + + int a1=myresult[4]; + if (a1<16) + { + b1=1; + } + char v1[3]; + dec2hex(a1,v1); + if (b1) + { + sprintf(v1,"0%s",v1); + } + else + { + sprintf(v1,"%s",v1); + } + int a2=myresult[5]; + if (a2<16) + { + b2=1; + } + char v2[3]; + dec2hex(a2,v2); + if (b2) + { + sprintf(v2,"0%s",v2); + } + else + { + sprintf(v2,"%s",v2); + } + int a3=myresult[6]; + if (a3<16) + { + b3=1; + } + char v3[3]; + dec2hex(a3,v3); + if (b3) + { + sprintf(v3,"0%s",v3); + } + else + { + sprintf(v3,"%s",v3); + } + int a4=myresult[7]; + if (a4<16) + { + b4=1; + } + char v4[3]; + dec2hex(a4,v4); + if (b4) + { + sprintf(v4,"0%s",v4); + } + else + { + sprintf(v4,"%s",v4); + } + char a6[20]=""; + strcat(a6,v3); + strcat(a6,v4); + strcat(a6,v1); + strcat(a6,v2); + a6[8]='\0'; + + //printf("%s",a6);//debug + + int cl=close_serial(1); + double p=ieeesingle2num(a6); + printf("%f\n",p); + return p; +} diff --git a/tools/openmodelica/linux/Resources/src/serialComm.c b/tools/openmodelica/linux/Resources/src/serialComm.c new file mode 100644 index 0000000..6fd915a --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/serialComm.c @@ -0,0 +1,156 @@ +#include <errno.h> +#include <termios.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> /* memset */ +#include <stdio.h> +#include <stropts.h> +#include "../Include/serial.h" +#define MAXPORTS 5 +static int fd; + +int set_interface_attribs (int fd, int speed, int parity) +{ + struct termios tty; + memset (&tty, 0, sizeof(tty)); + if (tcgetattr (fd, &tty) != 0) + { + return -1; + } + int posix_baudrate=0; + + switch(speed) { + case 115200: posix_baudrate = B115200; break; + //default: return -1; + } + cfsetospeed (&tty, posix_baudrate); + cfsetispeed (&tty, posix_baudrate); + + tty.c_cflag = (tty.c_cflag & ~CSIZE) | CS8; // 8-bit chars + // disable IGNBRK for mismatched speed tests; otherwise receive break + // as \000 chars + tty.c_iflag &= ~IGNBRK; // disable break processing + tty.c_lflag = 0; // no signaling chars, no echo, + // no canonical processing + tty.c_oflag = 0; // no remapping, no delays + tty.c_cc[VMIN] = 0; // read doesn't block + tty.c_cc[VTIME] = 5; // 0.5 seconds read timeout + + tty.c_iflag &= ~(IXON | IXOFF | IXANY); // shut off xon/xoff ctrl + + tty.c_cflag |= (CLOCAL | CREAD);// ignore modem controls, + // enable reading + tty.c_cflag &= ~(PARENB | PARODD); // shut off parity + tty.c_cflag |= parity; + tty.c_cflag &= ~CSTOPB; + tty.c_cflag &= ~CRTSCTS; + + if (tcsetattr (fd, TCSANOW, &tty) != 0) + { + return -1; + } + return 0; +} + + +void set_blocking (int b, int should_block) +{ + struct termios tty; + memset (&tty, 0, sizeof tty); + if (tcgetattr (b, &tty) != 0) + { + return; + } + + tty.c_cc[VMIN] = should_block ? 1 : 0; + tty.c_cc[VTIME] = 5; // 0.5 seconds read timeout + + //if (tcsetattr (fd, TCSANOW, &tty) != 0) + // error_message ("error %d setting term attributes", errno); +} + +int open_serial(int handle,int port, int baudrate){ + char* portname; + //printf("%d\n",port); + int OK; + switch(port){ + case 0: portname = "//dev/ttyACM0";break; + case 1: portname = "//dev/ttyACM1";break; + case 2: portname = "//dev/ttyACM2";break; + case 3: portname = "//dev/ttyACM3";break; + case 4: portname = "//dev/ttyACM4";break; + case 5: portname = "//dev/ttyACM5";break; + case 6: portname = "//dev/ttyACM6";break; + case 7: portname = "//dev/ttyACM7";break; + //default : return 2; + } + OK = 0; + //printf("%s\n",portname); + fd = open (portname, O_RDWR | O_NOCTTY | O_SYNC); + //fd = open (portname, O_RDWR | O_NOCTTY); //srikant + //printf("%d\n",fd); + if (fd < 0) + { + OK=2; + return OK; + } + set_interface_attribs (fd, baudrate, 0); + set_blocking (fd, 0); // set no blocking + //printf("Program running with status : %d\n",OK); + return OK; +} + +int close_serial(int handle){ + //usleep(1000); + close(fd); + //printf("Program closing....\n"); + return 0; +} + +int write_serial(int handle, char str[],int size){ + if(write(fd, str, size)!=-1) + { + //printf("serial write started.\n"); + //printf("%s\n",str ); + //printf("%d\n",(int)str[0] ); + } + usleep(size*100); + return 0; +} + + +int status_serial(int handle,int nb[]){ + nb[0] = 2; + nb[1] = 2; + int OK=0; + //printf("Getting status.....\n"); + return OK; +} + +int read_serial(int handle,char buf[],int size){ + + char readbuf[size+1]; + //int fl=tcflush(fd,TCOFLUSH); + //int fl=ioctl(fd,I_FLUSH,FLUSHW); + if(read(fd, readbuf, size)!=-1) + { + readbuf[size]='\0'; + int i; + for (i = 0; i < size; ++i) + { + buf[i]=(readbuf[i]); + //printf("%u\n",buf[i] ); + } + buf[size]='\0'; + //printf("Reading has commenced..\n"); + //printf("%d\n",(int)strlen(readbuf)); + //printf("%s\n",readbuf); + return 0; + } + else + return 2 ; +} +/*void read_serial(int *handle,char buf[],int *size){ + read(fd, buf, *size); + printf("Reading has commenced..\n"); +}*/ diff --git a/tools/openmodelica/linux/Resources/src/serialComm.c~ b/tools/openmodelica/linux/Resources/src/serialComm.c~ new file mode 100644 index 0000000..b7f0743 --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/serialComm.c~ @@ -0,0 +1,156 @@ +#include <errno.h> +#include <termios.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> /* memset */ +#include <stdio.h> +#include <stropts.h> +#include "../Include/serial.h" +#define MAXPORTS 5 +static int fd; + +int set_interface_attribs (int fd, int speed, int parity) +{ + struct termios tty; + memset (&tty, 0, sizeof(tty)); + if (tcgetattr (fd, &tty) != 0) + { + return -1; + } + int posix_baudrate=0; + + switch(speed) { + case 115200: posix_baudrate = B115200; break; + //default: return -1; + } + cfsetospeed (&tty, posix_baudrate); + cfsetispeed (&tty, posix_baudrate); + + tty.c_cflag = (tty.c_cflag & ~CSIZE) | CS8; // 8-bit chars + // disable IGNBRK for mismatched speed tests; otherwise receive break + // as \000 chars + tty.c_iflag &= ~IGNBRK; // disable break processing + tty.c_lflag = 0; // no signaling chars, no echo, + // no canonical processing + tty.c_oflag = 0; // no remapping, no delays + tty.c_cc[VMIN] = 0; // read doesn't block + tty.c_cc[VTIME] = 5; // 0.5 seconds read timeout + + tty.c_iflag &= ~(IXON | IXOFF | IXANY); // shut off xon/xoff ctrl + + tty.c_cflag |= (CLOCAL | CREAD);// ignore modem controls, + // enable reading + tty.c_cflag &= ~(PARENB | PARODD); // shut off parity + tty.c_cflag |= parity; + tty.c_cflag &= ~CSTOPB; + tty.c_cflag &= ~CRTSCTS; + + if (tcsetattr (fd, TCSANOW, &tty) != 0) + { + return -1; + } + return 0; +} + + +void set_blocking (int b, int should_block) +{ + struct termios tty; + memset (&tty, 0, sizeof tty); + if (tcgetattr (b, &tty) != 0) + { + return; + } + + tty.c_cc[VMIN] = should_block ? 1 : 0; + tty.c_cc[VTIME] = 5; // 0.5 seconds read timeout + + //if (tcsetattr (fd, TCSANOW, &tty) != 0) + // error_message ("error %d setting term attributes", errno); +} + +int open_serial(int handle,int port, int baudrate){ + char* portname; + //printf("%d\n",port); + int OK; + switch(port){ + case 0: portname = "//dev/ttyACM0";break; + case 1: portname = "//dev/ttyACM1";break; + case 2: portname = "//dev/ttyACM2";break; + case 3: portname = "//dev/ttyACM3";break; + case 4: portname = "//dev/ttyACM4";break; + case 5: portname = "//dev/ttyACM5";break; + case 6: portname = "//dev/ttyACM6";break; + case 7: portname = "//dev/ttyACM7";break; + //default : return 2; + } + OK = 0; + //printf("%s\n",portname); + fd = open (portname, O_RDWR | O_NOCTTY | O_SYNC); + //fd = open (portname, O_RDWR | O_NOCTTY); //srikant + //printf("%d\n",fd); + if (fd < 0) + { + OK=2; + return OK; + } + set_interface_attribs (fd, baudrate, 0); + set_blocking (fd, 0); // set no blocking + //printf("Program running with status : %d\n",OK); + return OK; +} + +int close_serial(int handle){ + //usleep(1000); + close(fd); + //printf("Program closing....\n"); + return 0; +} + +int write_serial(int handle, char str[],int size){ + if(write(fd, str, size)!=-1) + { + //printf("serial write started.\n"); + //printf("%s\n",str ); + //printf("%d\n",(int)str[0] ); + } + usleep(size*100); + return 0; +} + + +int status_serial(int handle,int nb[]){ + nb[0] = 2; + nb[1] = 2; + int OK=0; + //printf("Getting status.....\n"); + return OK; +} + +int read_serial(int handle,char buf[],int size){ + + char readbuf[size+1]; + //int fl=tcflush(fd,TCOFLUSH); + //int fl=ioctl(fd,I_FLUSH,FLUSHW); + if(read(fd, readbuf, size)!=-1) + { + readbuf[size]='\0'; + int i; + for (i = 0; i < size; ++i) + { + buf[i]=(readbuf[i]); + //printf("%u\n",buf[i] ); + } + buf[size]='\0'; + printf("Reading has commenced..\n"); + printf("%d\n",(int)strlen(readbuf)); + printf("%s\n",readbuf); + return 0; + } + else + return 2 ; +} +/*void read_serial(int *handle,char buf[],int *size){ + read(fd, buf, *size); + printf("Reading has commenced..\n"); +}*/ diff --git a/tools/openmodelica/linux/Resources/src/servomotor.c b/tools/openmodelica/linux/Resources/src/servomotor.c new file mode 100644 index 0000000..74048a3 --- /dev/null +++ b/tools/openmodelica/linux/Resources/src/servomotor.c @@ -0,0 +1,87 @@ +#include <errno.h> +#include <termios.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> +#include <stdio.h> +#include <stdint.h> +#include <math.h> +#include "../Include/serial.h" +#include "../Include/servomotor.h" + +void cmd_servo_attach(int h,int servo_no) +{ + char pin[5]; + int wr; + printf("init servo write\n"); + if(servo_no==1)//servo 1 on pin 9 + { + strcpy(pin,"Sa1"); + //printf("%s\n",pin); + wr=write_serial(h,pin,3); + } + else if(servo_no==2)//servo 2 on pin 10 + { + strcpy(pin,"Sa2"); + wr=write_serial(h,pin,3); + } + else + perror("Error."); +} + + +void cmd_servo_move(int h,int servo_no,int u1) +{ + int wr; + char servo[2]; + char v[2]; + char pin[5]="Sw"; + if (u1<0) + { + sprintf(servo,"%c",48+servo_no); + sprintf(v,"%c",0); + strcat(pin,servo); + strcat(pin,v); + //printf("%s\n",pin ); + //pin="Sw"+ascii(48+servo_no)+ascii(0); + } + else if(u1>180) + { + sprintf(servo,"%c",48+servo_no); + sprintf(v,"%c",180); + strcat(pin,servo); + strcat(pin,v); + //printf("%s\n",pin ); + } //pin="Sw"+ascii(48+servo_no)+ascii(180); + else + { + sprintf(servo,"%c",48+servo_no); + sprintf(v,"%c",(uint8_t)u1); + strcat(pin,servo); + strcat(pin,v); + //printf("%s\n",pin ); + } //pin="Sw"+ascii(48+servo_no)+ascii(uint8(u1)); + wr=write_serial(1,pin,4); +} + + +void cmd_servo_detach(int h,int servo_no) +{ + int wr; + char pin[5]="Sd"; + if(servo_no==1) //servo 1 on pin 10 + { + strcat(pin,"1"); + //pin="Sd1" + wr=write_serial(h,pin,3); + } + else if(servo_no==2) //servo 2 on pin 9 + { + strcat(pin,"2"); + //pin="Sd2" + wr=write_serial(h,pin,3); + } + else + perror("Error."); + +}
\ No newline at end of file diff --git a/tools/openmodelica/linux/_gitignore b/tools/openmodelica/linux/_gitignore new file mode 100644 index 0000000..b3bdba3 --- /dev/null +++ b/tools/openmodelica/linux/_gitignore @@ -0,0 +1,37 @@ +# Compiled source # +################### +*.com +*.class + +# Backup Files # +############ +*~ + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db diff --git a/tools/openmodelica/linux/test_firmware.mo b/tools/openmodelica/linux/test_firmware.mo new file mode 100644 index 0000000..30dcc5f --- /dev/null +++ b/tools/openmodelica/linux/test_firmware.mo @@ -0,0 +1,20 @@ +model test_firmware "Testing SerialCommunication with Arduino" + +import sComm=Arduino.SerialCommunication.Functions; +Integer h(fixed = false); +Integer byte_read(fixed = false); +//String str(fixed =false); +Integer wr(fixed =false); +Integer c_OK(fixed =false); +algorithm + when initial() then + h:=sComm.open_serial(1,0,115200); + sComm.delay(2000); + wr:=sComm.write_serial(1,"v",1); + byte_read:= sComm.read_serial(1,2); + c_OK := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 50, Tolerance = 1e-6, Interval = 10)); + +end test_firmware;
\ No newline at end of file diff --git a/tools/openmodelica/test_firmware.mo b/tools/openmodelica/test_firmware.mo new file mode 100644 index 0000000..fabe1ca --- /dev/null +++ b/tools/openmodelica/test_firmware.mo @@ -0,0 +1,20 @@ +model test_firmware "Testing SerialCommunication with Arduino" + +import sComm=Arduino.SerialCommunication.Functions; +Integer h(fixed = false); +Integer byte_read(fixed = false); +//String str(fixed =false); +Integer wr(fixed =false); +Integer c_OK(fixed =false); +algorithm + when initial() then + h:=sComm.open_serial(1,2,115200); + sComm.delay(2000); + wr:=sComm.write_serial(1,"v",1); + byte_read:= sComm.read_serial(1,2); + c_OK := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 50, Tolerance = 1e-6, Interval = 10)); + +end test_firmware; diff --git a/tools/openmodelica/windows/Arduino.mo b/tools/openmodelica/windows/Arduino.mo new file mode 100644 index 0000000..42d690e --- /dev/null +++ b/tools/openmodelica/windows/Arduino.mo @@ -0,0 +1,1783 @@ +package Arduino + extends Arduino.SerialCommunication.Icons.GenericICPackage; + + package SerialCommunication "Serial Communication Package for Arduino" + extends Arduino.SerialCommunication.Icons.FunctionLayerIcon; + import ModelicaReference.Operators; + + package Functions + extends Modelica.Icons.Package; + import Modelica; + + function open_serial "Command to initialize the serial port which is connected to Arduino" + extends Modelica.Icons.Function; + input Integer handle, port, baudrate; + output Integer OK; + + external OK = open_serial(handle, port, baudrate) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>open_serial</b>(handle,port,baudrate); +</pre></blockquote> +<h4>Description</h4> +<p> +Establishes a serial communication using port number \"port\".To connect to the Arduino board, check the port number from the device manager or check it from the Arduino software. +</p> +</html>")); + end open_serial; + + function read_serial "read characters from serial port" + extends Modelica.Icons.Function; + input Integer handle; + input Integer size; + output Integer r_OK; + protected + Integer buf[size + 1]; + + external r_OK = read_serial(handle, buf, size) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>read_serial</b>(handle,size); +</pre></blockquote> +<h4>Description</h4> +<p>The translation setting of openserial can come in the way, affecting the number of characters effectively read. If that is the case, omitting the parameter n might be a bad idea, as scilab can hang. This would happen if the input stream contains CR or LF characters which are filtered out: in such cases serialstatus counts them, but readserial does not see them and keeps wating (if the blocking mode of openserial was true) until the total number is received. +</p> +</html>")); + end read_serial; + + function write_serial "write to the serial port" + extends Modelica.Icons.Function; + input Integer handle; + input String str; + input Integer size; + output Integer w_OK; + + external w_OK = write_serial(handle, str, size) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>write_serial</b>(handle,str,size); +</pre></blockquote> +<h4>Description</h4> +<p>No end of line character is appended to the string; the user might have to add it if the device being talked to requires it. The Tcl command puts -nonewline is used. In addition, the translation mode of openserial can come into way. +</p> +</html>")); + end write_serial; + + function close_serial "Command to close the serial port which is connected to Arduino" + extends Modelica.Icons.Function; + input Integer handle; + output Integer c_OK; + + external c_OK = close_serial(handle) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>close_serial</b>(handle); +</pre></blockquote> +<h4>Description</h4> +<p>Closes the port for serial communication specified by \"handle\".It is important to close the serial port after use, else the port would be busy and restart of Scilab might required to connect to it again. +</p> +</html>")); + end close_serial; + + function status_serial "get status of the serial port" + extends Modelica.Icons.Function; + input Integer handle; + output Integer stat_OK; + protected + Integer bytes[2]; + + external stat_OK = status_serial(handle, bytes) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>status_serial</b>(handle); +</pre></blockquote> +<h4>Description</h4> +<p>Provides status of serial communication channel specified by \"handle\".Get some information about the number of characters present in the input and output buffers of the serial port, and about the status lines (DTS, CTS, etc.).The translation setting of openserial can come in the way. If the input stream contains CR or LF characters which are filtered out, openserial counts them but readserial does not see them. +</p> +</html>")); + end status_serial; + + function cmd_digital_out "Command to sent out digital signal to a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no, val; + output Integer digital_w_OK; + + external digital_w_OK = cmd_digital_out(h, pin_no, val) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>cmd_digital_out</b>(handle,pin_no,value); +</pre></blockquote> +<h4>Description</h4> +<p>The Arduino board has a set of logical ports (digital) that are used for writing or reading data from a component. +To map a UNO, ports 2-13 are available (0 and 1 are used for serial transmission). For MEGA board, ports 2-53 are available. The port takes the low logic level (0) or logic high (1) which corresponds to the reference voltage. +</p> +</html>")); + end cmd_digital_out; + + function cmd_digital_in "Command to read in digital signal from a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no; + output Integer digital_in; + + external digital_in = cmd_digital_in(h, pin_no) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>cmd_digital_in</b>(handle,pin_no); +</pre></blockquote> +<h4>Description</h4> +<p>The Arduino board has a set of logical ports (digital) that are used for writing or reading data from a component. +To map a UNO, ports 2-13 are available (0 and 1 are used for serial transmission). For MEGA board, ports 2-53 are available. The port takes the low logic level (0) or logic high (1) which corresponds to the reference voltage. +</p> +</html>")); + end cmd_digital_in; + + function delay "Provides delay.Suspends Openmodelica." + extends Modelica.Icons.Function; + input Integer t; + + external delay(t) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>delay</b>(milliseconds); + </pre></blockquote> + <h4>Description</h4> + <p>Delay process for specified number of miliseconds specified by the argument. The actual suspension time may be longer because of other activities in the system, or because of the time spent in processing the call. + </p> + </html>")); + end delay; + + function cmd_analog_in "Command to read in analog signal from a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no; + output Integer val; + + external val = cmd_analog_in(h, pin_no) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>cmd_analog_in</b>(handle,pin_no); +</pre></blockquote> +<h4>Description</h4> +<p>Arduino UNO board has 6 analog input ports (A0 to A5), the Arduino Mega board has 16 analog input ports (A0 to A15). The 10 bits channels convert the analog input from 0 to 5 volts, to a digital value between 0 and 1023. +</p> +</html>")); + end cmd_analog_in; + + function cmd_analog_out "Command to sent out analog signal to a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no; + input Real val; + output Integer analog_w_OK; + + external analog_w_OK = cmd_analog_out(h, pin_no, val) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>cmd_analog_out</b>(handle,pin_no,val); +</pre></blockquote> +<h4>Description</h4> +<p>The analog outputs of the Arduino Uno is available at the pins 3,5,6,9,10 and 11, while on the Mega board, the outputs are on pins 1-13 and 44-46. It is a bit misleading to use the term 'analog output', because in order to generate this output while minimizing energy losses, the Arduino uses PWM (Pulse Width Modulation) available on these ports. By varying the duty cycle of the PWM is altered the average voltage across the component connected to this port, which has the effect of having a analog output voltage. +The input port accepts the value from 0 to 255 which is correspoding to the duty cycle of 0 to 100%. In other words, sending 0 to the block will generate 0 V output at the port, 127 generates 2.5V and 255 generates 5V. (the port is 8 bits, so the resolutions of output would be 2^8 =256). +</p> +</html>")); + end cmd_analog_out; + + function cmd_analog_in_volt "Command to read in analog signal from a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no; + output Integer val; + + external val = cmd_analog_in_volt(h, pin_no) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_analog_in_volt</b>(handle,pin_no); + </pre></blockquote> + <h4>Description</h4> + <p>Arduino UNO board has 6 analog input ports (A0 to A5), the Arduino Mega board has 16 analog input ports (A0 to A15). The 10 bits channels convert the analog input from 0 to 5 volts, to a digital value between 0 and 1023. This function scale the reading to 0-5 so the user could get the measured voltage directly. + </p> + </html>")); + end cmd_analog_in_volt; + + function cmd_analog_out_volt "Command to sent out analog signal to a connected Arduino board" + extends Modelica.Icons.Function; + input Integer h, pin_no; + input Real val; + output Integer analog_v_wOK; + + external analog_v_wOK = cmd_analog_out_volt(h, pin_no, val) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_analog_out_volt</b>(handle,pin_no,val); + </pre></blockquote> + <h4>Description</h4> + <p>The analog outputs of the Arduino Uno is available at the pins 3,5,6,9,10 and 11, while on the Mega board, the outputs are on pins 1-13 and 44-46. It is a bit misleading to use the term 'analog output', because in order to generate this output while minimizing energy losses, the Arduino uses PWM (Pulse Width Modulation) available on these ports. By varying the duty cycle of the PWM is altered the average voltage across the component connected to this port, which has the effect of having a analog output voltage. + </p> + </html>")); + end cmd_analog_out_volt; + + function cmd_dcmotor_setup "Command to setup pins to control DC motor" + extends Modelica.Icons.Function; + input Integer handle, driver_type, motor_no, pin1, pin2; + + external cmd_dcmotor_setup(handle, driver_type, motor_no, pin1, pin2) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_dcmotor_setup</b>(handle,driver_type,motor_no,pin_no1,pin_no2); + </pre></blockquote> + <h4>Description</h4> + <p>Arduino board does not deliver enough power, so it is necessary to use a H-bridge circuit/IC to control the motor. There are several types of H-bridge IC that do not all operate on the same principle. For example, the L298 requires the use of a PWM signal with current sense. The L293 uses two PWM to set the speed and direction. Ready-to-use Shields are also available. + Remember that the PWM is 8-bit (0 to 255). The input of the block could accept any value, but it would saturate at +- 255. + </p> + </html>")); + end cmd_dcmotor_setup; + + function cmd_dcmotor_run "Command to run DC motor after setting up" + extends Modelica.Icons.Function; + input Integer handle, motor_no, val; + + external cmd_dcmotor_run(handle, motor_no, val) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_dcmotor_run</b>(handle,motor_no,value); + </pre></blockquote> + <h4>Description</h4> + <p>Arduino board does not deliver enough power, so it is necessary to use a H-bridge circuit/IC to control the motor. There are several types of H-bridge IC that do not all operate on the same principle. For example, the L298 requires the use of a PWM signal with current sense. The L293 uses two PWM to set the speed and direction. Ready-to-use Shields are also available. + Remember that the PWM is 8-bit (0 to 255). The input of the block could accept any value, but it would saturate at +- 255. + </p> + </html>")); + end cmd_dcmotor_run; + + function cmd_dcmotor_release "Command to release pins which have setup for DC motor" + extends Modelica.Icons.Function; + input Integer handle, motor_no; + + external cmd_dcmotor_release(handle, motor_no) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_dcmotor_release</b>(handle,motor_no); + </pre></blockquote> + <h4>Description</h4> + <p>Arduino board does not deliver enough power, so it is necessary to use a H-bridge circuit/IC to control the motor. There are several types of H-bridge IC that do not all operate on the same principle. For example, the L298 requires the use of a PWM signal with current sense. The L293 uses two PWM to set the speed and direction. Ready-to-use Shields are also available. + Remember that the PWM is 8-bit (0 to 255). The input of the block could accept any value, but it would saturate at +- 255. + </p> + </html>")); + end cmd_dcmotor_release; + + function cmd_servo_attach "Command to attach servo motor to Arduino" + extends Modelica.Icons.Function; + input Integer handle, servo_no; + + external cmd_servo_attach(handle, servo_no) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_servo_attach</b>(handle,servo_no); + </pre></blockquote> + <h4>Description</h4> + <p>A servomotor is an rotary actuator consist of an electric motor, gears, a potentiometer and an analogue or digital electronics for control. The servomotor usualy used for a position control application (or speed for continuous rotation servos). + The user must give the command of the position setpoint or desired speed. This command is sent to the actuator in pulses spaced by 10 to 20 ms. The coding of these pulses is made such that a pulse of 1.5 ms corresponding to the centered position (rest), a pulse of 1 ms corresponds to an angle of 90° in the anticlockwise direction, and a pulse 2 ms corresponds to an angle of 90° clockwise. All other pulse widths give intermediate values​​. + A servomotor for continuous rotation, the pulse width control the rotational speed and the direction. It is recommended to use a voltage regulator to power the servomotor instead of using the Arduino board power. For simplicity, the function takes an input commnad in degrees from 0 to 180. Two actuators can be controlled with this toolbox. (modified version of 3 motors available) + </p> + </html>")); + end cmd_servo_attach; + + function cmd_servo_move "Command to run servo motor which has been setup" + extends Modelica.Icons.Function; + input Integer handle, servo_no, val; + + external cmd_servo_move(handle, servo_no, val) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_servo_move</b>(handle,servo_no,value); + </pre></blockquote> + <h4>Description</h4> + <p>A servomotor is an rotary actuator consist of an electric motor, gears, a potentiometer and an analogue or digital electronics for control. The servomotor usualy used for a position control application (or speed for continuous rotation servos). + The user must give the command of the position setpoint or desired speed. This command is sent to the actuator in pulses spaced by 10 to 20 ms. The coding of these pulses is made such that a pulse of 1.5 ms corresponding to the centered position (rest), a pulse of 1 ms corresponds to an angle of 90° in the anticlockwise direction, and a pulse 2 ms corresponds to an angle of 90° clockwise. All other pulse widths give intermediate values​​. + A servomotor for continuous rotation, the pulse width control the rotational speed and the direction. It is recommended to use a voltage regulator to power the servomotor instead of using the Arduino board power. For simplicity, the function takes an input commnad in degrees from 0 to 180. Two actuators can be controlled with this toolbox. (modified version of 3 motors available) + </p> + </html>")); + end cmd_servo_move; + + function cmd_servo_detach "Command to release the pin which has been setup for servo motor" + extends Modelica.Icons.Function; + input Integer handle, servo_no; + + external cmd_servo_attach(handle, servo_no) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>cmd_servo_detach</b>(handle,servo_no); + </pre></blockquote> + <h4>Description</h4> + <p>A servomotor is an rotary actuator consist of an electric motor, gears, a potentiometer and an analogue or digital electronics for control. The servomotor usualy used for a position control application (or speed for continuous rotation servos). + The user must give the command of the position setpoint or desired speed. This command is sent to the actuator in pulses spaced by 10 to 20 ms. The coding of these pulses is made such that a pulse of 1.5 ms corresponding to the centered position (rest), a pulse of 1 ms corresponds to an angle of 90° in the anticlockwise direction, and a pulse 2 ms corresponds to an angle of 90° clockwise. All other pulse widths give intermediate values​​. + A servomotor for continuous rotation, the pulse width control the rotational speed and the direction. It is recommended to use a voltage regulator to power the servomotor instead of using the Arduino board power. For simplicity, the function takes an input commnad in degrees from 0 to 180. Two actuators can be controlled with this toolbox. (modified version of 3 motors available) + </p> + </html>")); + end cmd_servo_detach; + + function ieeesingle2num "ieee-745 floating point converter" + extends Modelica.Icons.Function; + input String hexa; + output Real y; + + external y = ieeesingle2num(hexa) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> +<h4>Syntax</h4> +<blockquote><pre> +Arduino.SerialCommunication.Functions.<b>ieeesingle2num</b>(hexa); +</pre></blockquote> +<h4>Description</h4> +<p>Converts an hexadecimal integer to ieee single precision format + </p> +</html>")); + end ieeesingle2num; + + function math_floor "Floor function" + extends Modelica.Icons.Function; + input Real x; + output Integer y; + + external y = mfloor(x) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Functions.<b>math_floor</b>(x); + </pre></blockquote> + <h4>Description</h4> + <p>Returns the greatest integer less than or equal to x + </p> + </html>")); + end math_floor; + + package MDD_Servo + extends Modelica.Icons.Package; + + class Init + extends ExternalObject; + + function constructor "Return device handle" + extends .Modelica.Icons.Function; + import Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions; + import Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types; + import sComm = Arduino.SerialCommunication.Functions; + import Arduino.SerialCommunication.Functions.MDD_Servo; + input sComm.Types.Servo_no servo_no; + output sComm.Functions.MDD_Servo.Init servo; + + external "C" servo = MDD_avr_servo_initialize(servo_no) annotation( + Include = "#include \"/home/souradip/OpenModelica/Resources/Include/MDDAVRServo.h\""); + end constructor; + + function destructor "Destructor" + extends .Modelica.Icons.Function; + import Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types; + import sComm = Arduino.SerialCommunication.Functions; + import Arduino.SerialCommunication.Functions.MDD_Servo; + input sComm.Types.Servo_no servo_no "Device handle"; + + external "C" MDD_avr_servo_finalize(servo_no) annotation( + Include = "#include \"/home/souradip/OpenModelica/Resources/Include/MDDAVRServo.h\""); + end destructor; + end Init; + + function Move + extends Modelica.Icons.Function; + import sComm = Arduino.SerialCommunication.Functions; + input sComm.Functions.MDD_Servo.Init servo; + input Integer value; + + external "C" MDD_avr_servo_move(servo, value) annotation( + Include = "#include \"/home/souradip/OpenModelica/Resources/Include/MDDAVRServo.h\""); + end Move; + end MDD_Servo; + end Functions; + + package Examples + extends Modelica.Icons.ExamplesPackage; + + package led + extends Modelica.Icons.ExamplesPackage; + + model led_blue "Turn on Blue LED" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200"; + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + sComm.delay(1000); + digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn ON the blue LED"; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//strm.print(String(time)); + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end led_blue; + + model led_blue_delay "Turn on Blue LED for a period of 2 seconds" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200"; + sComm.delay(2000); + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn the blue LED"; + sComm.delay(2000) "let the blue LED be on for two seconds"; + digital_out := sComm.cmd_digital_out(1, 9, 0) "turn off blue LED"; + sComm.delay(2000) "let the blue LED be off for two seconds"; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//strm.print(String(time)); + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end led_blue_delay; + + + + model led_blue_red "Turn on Red & Blue LED" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200"; + sComm.delay(2000); + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn the blue LED"; + digital_out := sComm.cmd_digital_out(1, 11, 1) "This will turn the red LED"; + sComm.delay(5000) "Delay for 5 seconds"; + digital_out := sComm.cmd_digital_out(1, 9, 0) "This turns off the blue Led"; + sComm.delay(3000) "Delay for 3 seconds"; + digital_out := sComm.cmd_digital_out(1, 11, 0) "This turns off the red Led"; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//strm.print(String(time)); + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end led_blue_red; + + model led_blink "This will turn on and turn off the user LED for every second for 10 times" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200"; + sComm.delay(2000); + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + for i in 1:1000 loop + digital_out := sComm.cmd_digital_out(1, 13, 0) "This will turn off the LED"; + sComm.delay(1000) "Delay for 1 second"; + digital_out := sComm.cmd_digital_out(1, 13, 1) "This turns the Led"; + sComm.delay(1000) "Delay for 1 second"; + end for; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end led_blink; + + model led_green_blink "This will turn on and turn off the green LED for every second for 5 times" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 0 with baudrate of 115200"; + sComm.delay(2000); + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + for i in 1:10 loop + digital_out := sComm.cmd_digital_out(1, 10, 0) "This will turn off the green LED"; + sComm.delay(1000) "Delay for 1 second"; + digital_out := sComm.cmd_digital_out(1, 10, 1) "This turns the green Led"; + sComm.delay(1000) "Delay for 1 second"; + end for; + end if; + strm.print(String(time)); + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end led_green_blink; + + end led; + + package push + extends Modelica.Icons.ExamplesPackage; + + model led_push_button "Conrolling LED with PushButton" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_in(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200"; + sComm.delay(2000); + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + digital_in := sComm.cmd_digital_in(1, 12) ""; + if digital_in == 0 then + digital_out := sComm.cmd_digital_out(1, 9, 0) "This will turn OFF the blue LED"; + sComm.delay(200); + else + digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn ON the blue LED"; + sComm.delay(200); + end if; + end if; +//for i in 1:1000 loop +//end for; + strm.print(String(time)); + when terminal() then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 0.1)); + end led_push_button; + + + model push_button_status "Checking Status of PushButton" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer digital_in(fixed = false); + Integer digital_out(start = 0, fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 0 with baudrate of 115200"; + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + digital_in := sComm.cmd_digital_in(1, 12); + if digital_in == 0 then + digital_out := sComm.cmd_digital_out(1, 9, 0) "This will turn OFF the blue LED"; + strm.print("LOW"); + sComm.delay(200); + else + digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn ON the blue LED"; + strm.print("HIGH"); + sComm.delay(200); + end if; + end if; +//for i in 1:1000 loop +//end for; + when terminal() then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//sComm.cmd_arduino_meter(digital_in); + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 0.1)); + end push_button_status; + + end push; + + package ldr + extends Modelica.Icons.ExamplesPackage; + + model ldr_led "LED indicating light sensor readings" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer analog_in(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 0 with baudrate of 115200"; + sComm.delay(2000); + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + analog_in := sComm.cmd_analog_in(1, 5) "read analog pin 5 (ldr)"; + if analog_in < 300 then + digital_out := sComm.cmd_digital_out(1, 9, 1) "Turn ON LED"; + else + digital_out := sComm.cmd_digital_out(1, 9, 0) "Turn OFF LED"; + end if; + sComm.delay(500); + end if; +//strm.print(String(time)); + when time >=10 then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//Setting Threshold value of 300 + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 0.2)); + end ldr_led; + + + + model ldr_read "Reading light intensity using ldr" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer analog_in(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 0 with baudrate of 115200"; + sComm.delay(2000); + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + analog_in := sComm.cmd_analog_in(1, 5) "read analog pin 5 (ldr)"; + strm.print("LDR Readings" + " : " + String(analog_in)); + sComm.delay(500); + end if; + when time >=10 then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 1)); + end ldr_read; + + + end ldr; + + package pot + extends Modelica.Icons.ExamplesPackage; + + model pot_threshold + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer analog_in(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200"; + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + analog_in := sComm.cmd_analog_in(1, 2) "read analog pin 2"; + strm.print("Potentiometer Readings:" + String(analog_in)); + if analog_in >= 0 and analog_in < 320 then + digital_out := sComm.cmd_digital_out(1, 11, 1) "Turn ON LED"; + sComm.delay(1000); + digital_out := sComm.cmd_digital_out(1, 11, 0) "Turn OFF LED"; + elseif analog_in >= 320 and analog_in <= 900 then + digital_out := sComm.cmd_digital_out(1, 10, 1) "Turn ON LED"; + sComm.delay(1000); + digital_out := sComm.cmd_digital_out(1, 10, 0) "Turn OFF LED"; + elseif analog_in > 900 and analog_in <= 1023 then + digital_out := sComm.cmd_digital_out(1, 9, 1) "Turn ON LED"; + sComm.delay(1000); + digital_out := sComm.cmd_digital_out(1, 9, 0) "Turn OFF LED"; + end if; + end if; +//Threshold 1 +//Threshold 2 + when time >= 10 then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 1)); + end pot_threshold; + end pot; + + package thermistor + extends Modelica.Icons.ExamplesPackage; + + model therm_buzzer "Sound buzzer depending on thermistor readings" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer analog_in(fixed = false); + Integer digital_out(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200"; + sCOmm.delay(2000); + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + analog_in := sComm.cmd_analog_in(1, 4) "read analog pin 4"; + if analog_in > 500 then + digital_out := sComm.cmd_digital_out(1, 3, 1) "Turn ON Buzzer"; + else + digital_out := sComm.cmd_digital_out(1, 3, 0) "Turn OFF Buzzer"; + end if; + sComm.delay(500); + end if; +//for i in 1:500 loop +//end for; +//Run for 500 iterations +//Setting Threshold value of 500 + when terminal() then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 0.1)); + end therm_buzzer; + + + model therm_read "Thermistor Readings" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer analog_in(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200"; + sComm.delay(2000); + end when; + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + analog_in := sComm.cmd_analog_in(1, 4) "read analog pin 5 (ldr)"; + strm.print("Thermistor Readings " + " : " + String(analog_in)); + sComm.delay(500); + end if; + when terminal() then + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 20, Tolerance = 1e-6, Interval = 1)); + end therm_read; + + end thermistor; + + package dcmotor + extends Modelica.Icons.ExamplesPackage; + + model dcmotor_clock "Rotate DC Motor clockwise" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "COM port is 2 and baud rate is 115200"; + sComm.delay(2000); + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + sComm.delay(1000); + sComm.cmd_dcmotor_setup(1, 3, 1, 9, 10) "Setup DC motor of type 3 (L293D), motor 1, pin 9 and 10"; + sComm.cmd_dcmotor_run(1, 1, 100) "Motor 1 runs at PWM 100"; + sComm.delay(3000) "This is allowed to continue for 3 seconds"; + sComm.cmd_dcmotor_release(1, 1) "Motor 1 is released"; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end dcmotor_clock; + + model dcmotor_both "Rotate DC Motor in both directions" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "COM port is 2 and baud rate is 115200"; + sComm.delay(2000); + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + sComm.cmd_dcmotor_setup(1, 3, 1, 9, 10) "Setup DC motor of type 3 (L293D), motor 1, pin 9 and 10"; + sComm.cmd_dcmotor_run(1, 1, 100) "Motor 1 runs at PWM 100"; + sComm.delay(3000) "for 3 seconds"; + sComm.cmd_dcmotor_run(1, 1, -100) "Motor 1 runs at PWM -100 in reverse direction"; + sComm.delay(2000) "for 2 seconds"; + sComm.cmd_dcmotor_release(1, 1) "Motor 1 is released"; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end dcmotor_both; + + model dcmotor_loop "Rotate DC Motor in both directions in a loop" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "COM port is 2 and baud rate is 115200"; + sComm.delay(2000); + if ok <> 0 then + strm.print("Unable to open serial port, please check"); + else + sComm.cmd_dcmotor_setup(1, 3, 1, 9, 10) "Setup DC motor of type 3 (L293D), motor 1, pins 9 and 10"; + for i in 1:4 loop + sComm.cmd_dcmotor_run(1, 1, 100) "Motor 1 runs at PWM 100"; + sComm.delay(3000) "for 3 seconds"; + sComm.cmd_dcmotor_run(1, 1, 0) "Halt the motor"; + sComm.delay(2000) "for 2 seconds"; + sComm.cmd_dcmotor_run(1, 1, -100) "Run it at PWM 100 in reverse direction"; + sComm.delay(2000) "for 2 seconds"; + end for; + sComm.cmd_dcmotor_release(1, 1) "Motor 1 is released"; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); + end dcmotor_loop; + + + end dcmotor; + + package servo + extends Modelica.Icons.ExamplesPackage; + + model servo_init "Rotate Servo Motor " + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "COM port is 2 and baud rate is 115200"; + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + sComm.cmd_servo_attach(1, 1) "To attach the motor to pin 9 of servo1"; + sComm.cmd_servo_move(1, 1, 30) "tell servo to rotate by 30 degrees"; + sComm.delay(3000); + //sComm.cmd_servo_detach(1,1); + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + + annotation( + experiment(StartTime = 0, StopTime = 5, Tolerance = 1e-6, Interval = 5)); + end servo_init; + + + + + + + + model servo_loop "Rotate servo motor by 20 degrees 10 times" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + Integer angle(fixed = true); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "COM port is 2 and baud rate is 115200"; + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + sComm.cmd_servo_attach(1, 1) "Attach motor to pin 9. 1 means pin 9."; + sComm.delay(2000); + angle := 20 "Angle by which it has to move"; + for i in 1:10 loop + sComm.cmd_servo_move(1, 1, angle * i) "tell servo to rotate by 20 degrees"; + sComm.delay(1000) "waits for a sec"; + end for; + sComm.cmd_servo_detach(1, 1) "Detach the motor"; + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 5, Tolerance = 1e-6, Interval = 5)); + end servo_loop; + + model servo_reverse + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "COM port is 2 and baud rate is 115200"; + sComm.delay(2000); + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + sComm.cmd_servo_attach(1, 1) "Attach the motor to pin 9. 1 means 9"; + sComm.cmd_servo_move(1, 1, 90) "Move the servo to 90 degree"; + sComm.delay(1000) "be there for one second"; + sComm.cmd_servo_move(1, 1, 45) "Move the servo to 45 degree"; + sComm.delay(1000) "be there for one second"; + sComm.cmd_servo_detach(1, 1) "Detach the motor"; + sComm.delay(1000); + end if; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 5, Tolerance = 1e-6, Interval = 5)); + end servo_reverse; + + model servo_pot "Control Servo Motor using Potentiometer" + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import strm = Modelica.Utilities.Streams; + Integer ok(fixed = false); + Integer c_ok(fixed = false); + Integer analog_in(fixed = false); + algorithm + when initial() then + ok := sComm.open_serial(1, 2, 115200) "COM port is 2 and baud rate is 115200"; + sComm.delay(2000); + if ok <> 0 then + strm.print("Check the serial port and try again"); + else + sComm.cmd_servo_attach(1, 1) "Attach the motor to pin 9"; + sComm.delay(2000); + for i in 1:5000 loop + analog_in := sComm.cmd_analog_in(1, 2) "Read potentiometer value"; + sComm.cmd_servo_move(1, 1, analog_in) "Command the servo motor"; + sComm.delay(1000) "sleep for 1000 milliseconds"; + end for; + sComm.cmd_servo_detach(1, 1) "Detach the motor"; + end if; + analog_in := sComm.math_floor(analog_in * (180 / 1023)) "Scale Potentiometer value to 0-180"; + c_ok := sComm.close_serial(1) "To close the connection safely"; + end when; +//5,000 itterations +//strm.print(String(analog_in)); + annotation( + experiment(StartTime = 0, StopTime = 5, Tolerance = 1e-6, Interval = 5)); + end servo_pot; + + end servo; + + package modbus + extends Modelica.Icons.ExamplesPackage; + + function read_voltage + extends Modelica.Icons.Function; + + external read_voltage() annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Examples.modbus.<b>read_voltage</b>(); + </pre></blockquote> + <h4>Description</h4> + <p> + </p> + </html>")); + end read_voltage; + + function read_current + extends Modelica.Icons.Function; + + external read_current() annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Examples.modbus.<b>read_current</b>(); + </pre></blockquote> + <h4>Description</h4> + <p> + </p> + </html>")); + end read_current; + + + function read_val + extends Modelica.Icons.Function; + input Integer addr_byte; + output Real p; + + external p = read_val(addr_byte) annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Examples.modbus.<b>read_val</b>(address_byte); + </pre></blockquote> + <h4>Description</h4> + <p> + </p> + </html>")); + end read_val; + + function read_active_power + extends Modelica.Icons.Function; + + external read_active_power() annotation( + Library = "SerialComm"); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.Examples.modbus.<b>read_active_power</b>(); + </pre></blockquote> + <h4>Description</h4> + <p> + </p> + </html>")); + end read_active_power; + + model modbus_test + extends Modelica.Icons.Example; + import sComm = Arduino.SerialCommunication.Functions; + import modbus = Arduino.SerialCommunication.Examples.modbus; + //Integer ok(fixed = false); + //Integer c_ok(fixed = false); + algorithm + when initial() then + //ok:=sComm.open_serial(1,2,9600); + modbus.read_voltage(); + modbus.read_current(); + modbus.read_active_power(); + sComm.delay(2000); + //c_ok:=sComm.close_serial(1); + end when; + end modbus_test; + + + + + + + + end modbus; + end Examples; + + package MDD_Examples "Interfacing arduino with OpenModelica using Modelica Device Drivers" + extends Modelica.Icons.ExamplesPackage; + + package MDD_led + extends Modelica.Icons.ExamplesPackage; + + model MDD_led_blue "" + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {39, 41}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {39, -21}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = true) annotation( + Placement(visible = true, transformation(origin = {-41, -21}, extent = {{-15, -17}, {15, 17}}, rotation = 0))); + equation + connect(booleanExpression1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{-24, -20}, {14, -20}, {14, -20}, {16, -20}}, color = {255, 0, 255})); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.MDD_Examples.MDD_led.<b>MDD-led_blue</b>(); + </pre></blockquote> + <h4>Description</h4> + <p> + </p> + </html>")); + end MDD_led_blue; + + model MDD_led_blue_delay + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {31, 41}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {41, -17}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = if time < 5 then true else false) annotation( + Placement(visible = true, transformation(origin = {-27, -16}, extent = {{-21, -16}, {21, 16}}, rotation = 0))); + equation + connect(booleanExpression1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{-4, -16}, {20, -16}}, color = {255, 0, 255})); + end MDD_led_blue_delay; + + model MDD_led_blink + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-45, 71}, extent = {{-23, -23}, {23, 23}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'5', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {42, -22}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {23, 71}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = mod(time, 2) >= 1) annotation( + Placement(visible = true, transformation(origin = {-24, -21}, extent = {{-16, -15}, {16, 15}}, rotation = 0))); + equation + connect(booleanExpression1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{-6, -21}, {16, -21}, {16, -22}, {18, -22}}, color = {255, 0, 255})); + end MDD_led_blink; + + model MDD_led_blue_red + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-47, 47}, extent = {{-21, -21}, {21, 21}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {38, -16}, extent = {{-16, -16}, {16, 16}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {40, 44}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean2(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'3', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {38, -62}, extent = {{-16, -16}, {16, 16}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = if time < 1 then true else false) annotation( + Placement(visible = true, transformation(origin = {-32, -16}, extent = {{-18, -14}, {18, 14}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression2(y = if time < 1.6 then true else false) annotation( + Placement(visible = true, transformation(origin = {-32, -62}, extent = {{-18, -16}, {18, 16}}, rotation = 0))); + equation + connect(digitalWriteBoolean2.u, booleanExpression2.y) annotation( + Line(points = {{18, -62}, {-12, -62}, {-12, -62}, {-12, -62}}, color = {255, 0, 255})); + connect(booleanExpression2.y, digitalWriteBoolean2.u) annotation( + Line(points = {{-12, -62}, {18, -62}, {18, -62}, {18, -62}}, color = {255, 0, 255})); + connect(booleanExpression1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{-12, -16}, {18, -16}, {18, -16}, {18, -16}}, color = {255, 0, 255})); + end MDD_led_blue_red; + + model MDD_led_green_blink + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'2', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {46, -30}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {39, 39}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = mod(time, 2) >= 1) annotation( + Placement(visible = true, transformation(origin = {-17, -30}, extent = {{-15, -14}, {15, 14}}, rotation = 0))); + equation + connect(booleanExpression1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{0, -30}, {24, -30}, {24, -30}, {24, -30}}, color = {255, 0, 255})); + end MDD_led_green_blink; + end MDD_led; + + package MDD_push + extends Modelica.Icons.ExamplesPackage; + + model MDD_led_push_button + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-38, 40}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {64, -26}, extent = {{-16, -16}, {16, 16}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1) annotation( + Placement(visible = true, transformation(origin = {39, 41}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica.Blocks.Logical.LogicalSwitch logicalSwitch1 annotation( + Placement(visible = true, transformation(origin = {16, -26}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = true) annotation( + Placement(visible = true, transformation(origin = {-20, 8}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression2(y = false) annotation( + Placement(visible = true, transformation(origin = {-18, -62}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalReadBoolean digitalReadBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'4', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.D) annotation( + Placement(visible = true, transformation(origin = {-60, -26}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(logicalSwitch1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{28, -26}, {44, -26}, {44, -26}, {44, -26}}, color = {255, 0, 255})); + connect(digitalReadBoolean1.y, logicalSwitch1.u2) annotation( + Line(points = {{-48, -26}, {2, -26}, {2, -26}, {4, -26}}, color = {255, 0, 255})); + connect(booleanExpression1.y, logicalSwitch1.u1) annotation( + Line(points = {{-8, 8}, {-2, 8}, {-2, -18}, {4, -18}, {4, -18}}, color = {255, 0, 255})); + connect(booleanExpression2.y, logicalSwitch1.u3) annotation( + Line(points = {{-6, -62}, {-2, -62}, {-2, -34}, {4, -34}, {4, -34}}, color = {255, 0, 255})); + end MDD_led_push_button; + + model MDD_push_button_status + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-43, 43}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {20, 42}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalReadBoolean digitalReadBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'4', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {-39, -19}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Interaction.Show.BooleanValue booleanValue1(use_activePort = true) annotation( + Placement(visible = true, transformation(origin = {31, -19}, extent = {{-15, -17}, {15, 17}}, rotation = 0))); + equation + connect(digitalReadBoolean1.y, booleanValue1.activePort) annotation( + Line(points = {{-18, -18}, {14, -18}, {14, -18}, {14, -18}}, color = {255, 0, 255})); + end MDD_push_button_status; + end MDD_push; + + package MDD_ldr + extends Modelica.Icons.ExamplesPackage; + + model MDD_ldr_led + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-45, 65}, extent = {{-21, -21}, {21, 21}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {40, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {79, -23}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = true) annotation( + Placement(visible = true, transformation(origin = {-60, 12}, extent = {{-14, -16}, {14, 16}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression2 annotation( + Placement(visible = true, transformation(origin = {-59, -79}, extent = {{-13, -17}, {13, 17}}, rotation = 0))); + Modelica.Blocks.Logical.LogicalSwitch logicalSwitch1 annotation( + Placement(visible = true, transformation(origin = {28, -22}, extent = {{-16, -16}, {16, 16}}, rotation = 0))); + Modelica.Blocks.Logical.GreaterThreshold greaterThreshold1(threshold = 600) annotation( + Placement(visible = true, transformation(origin = {-21, -23}, extent = {{-11, -11}, {11, 11}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A5, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 1024, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-72, -22}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + equation + connect(adc.y, greaterThreshold1.u) annotation( + Line(points = {{-50, -22}, {-34, -22}}, color = {0, 0, 127})); + connect(greaterThreshold1.y, logicalSwitch1.u2) annotation( + Line(points = {{-8, -22}, {8, -22}, {8, -22}, {8, -22}}, color = {255, 0, 255})); + connect(logicalSwitch1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{46, -22}, {58, -22}, {58, -22}, {58, -22}}, color = {255, 0, 255})); + connect(booleanExpression1.y, logicalSwitch1.u1) annotation( + Line(points = {{-44, 12}, {8, 12}, {8, -10}, {8, -10}}, color = {255, 0, 255})); + connect(booleanExpression2.y, logicalSwitch1.u3) annotation( + Line(points = {{-44, -78}, {6, -78}, {6, -34}, {8, -34}}, color = {255, 0, 255})); + end MDD_ldr_led; + + model MDD_ldr_read + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-37, 39}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {50, 38}, extent = {{-22, -22}, {22, 22}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A5, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 1024, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-39, -17}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica.Blocks.Interaction.Show.RealValue realValue1(use_numberPort = true) annotation( + Placement(visible = true, transformation(origin = {30, -17}, extent = {{-18, -17}, {18, 17}}, rotation = 0))); + equation + connect(adc.y, realValue1.numberPort) annotation( + Line(points = {{-20, -17}, {7, -17}}, color = {0, 0, 127})); + end MDD_ldr_read; + end MDD_ldr; + + package MDD_pot + extends Modelica.Icons.ExamplesPackage; + + model MDD_pot_threshold "" + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-79, 79}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {80, 80}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica.Blocks.Logical.Switch switch11 annotation( + Placement(visible = true, transformation(origin = {2, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.Switch switch12 annotation( + Placement(visible = true, transformation(origin = {10, -64}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.Greater greater1 annotation( + Placement(visible = true, transformation(origin = {42, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.Greater greater2 annotation( + Placement(visible = true, transformation(origin = {36, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'1', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {82, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean2(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'2', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {82, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean3(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'3', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.B) annotation( + Placement(visible = true, transformation(origin = {82, -64}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.GreaterEqualThreshold greaterEqualThreshold1(threshold = 0) annotation( + Placement(visible = true, transformation(origin = {-42, 44}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.GreaterEqualThreshold greaterEqualThreshold2(threshold = 320) annotation( + Placement(visible = true, transformation(origin = {-42, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.GreaterEqualThreshold greaterEqualThreshold3(threshold = 900) annotation( + Placement(visible = true, transformation(origin = {-40, -64}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.RealExpression realExpression1(y = 0) annotation( + Placement(visible = true, transformation(origin = {-40, -92}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.RealExpression realExpression2(y = 1) annotation( + Placement(visible = true, transformation(origin = {-44, 84}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.Switch switch1 annotation( + Placement(visible = true, transformation(origin = {0, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Math.RealToBoolean realToBoolean1(threshold = 0.5) annotation( + Placement(visible = true, transformation(origin = {44, -64}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A2, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 1024, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-88, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(adc.y, greaterEqualThreshold1.u) annotation( + Line(points = {{-76, 0}, {-70, 0}, {-70, 46}, {-54, 46}}, color = {0, 0, 127})); + connect(greaterEqualThreshold1.y, switch1.u2) annotation( + Line(points = {{-31, 46}, {-24, 46}, {-24, 70}, {-12, 70}}, color = {255, 0, 255})); + connect(adc.y, greaterEqualThreshold3.u) annotation( + Line(points = {{-76, 0}, {-70, 0}, {-70, -64}, {-52, -64}, {-52, -64}}, color = {0, 0, 127})); + connect(adc.y, greaterEqualThreshold2.u) annotation( + Line(points = {{-76, 0}, {-54, 0}, {-54, 0}, {-54, 0}}, color = {0, 0, 127})); + connect(realToBoolean1.y, digitalWriteBoolean3.u) annotation( + Line(points = {{56, -64}, {70, -64}, {70, -64}, {70, -64}}, color = {255, 0, 255})); + connect(switch12.y, realToBoolean1.u) annotation( + Line(points = {{22, -64}, {32, -64}, {32, -64}, {32, -64}}, color = {0, 0, 127})); + connect(realExpression1.y, switch1.u3) annotation( + Line(points = {{-28, -92}, {-16, -92}, {-16, 62}, {-12, 62}, {-12, 62}}, color = {0, 0, 127})); + connect(realExpression2.y, switch1.u1) annotation( + Line(points = {{-32, 84}, {-20, 84}, {-20, 78}, {-12, 78}, {-12, 78}}, color = {0, 0, 127})); + connect(switch1.y, greater2.u1) annotation( + Line(points = {{12, 70}, {22, 70}, {22, 70}, {24, 70}}, color = {0, 0, 127})); + connect(greater1.y, digitalWriteBoolean2.u) annotation( + Line(points = {{54, 0}, {70, 0}}, color = {255, 0, 255})); + connect(switch11.y, greater2.u2) annotation( + Line(points = {{14, 0}, {18, 0}, {18, 62}, {24, 62}, {24, 62}}, color = {0, 0, 127})); + connect(switch11.y, greater1.u1) annotation( + Line(points = {{14, 0}, {30, 0}}, color = {0, 0, 127})); + connect(switch12.y, greater1.u2) annotation( + Line(points = {{22, -64}, {22, -64}, {22, -8}, {30, -8}, {30, -8}}, color = {0, 0, 127})); + connect(greaterEqualThreshold2.y, switch11.u2) annotation( + Line(points = {{-30, 0}, {-10, 0}, {-10, 0}, {-10, 0}}, color = {255, 0, 255})); + connect(greater2.y, digitalWriteBoolean1.u) annotation( + Line(points = {{48, 70}, {56, 70}, {56, 40}, {70, 40}, {70, 40}}, color = {255, 0, 255})); + connect(realExpression2.y, switch12.u1) annotation( + Line(points = {{-32, 84}, {-20, 84}, {-20, -56}, {-2, -56}, {-2, -56}}, color = {0, 0, 127})); + connect(realExpression2.y, switch11.u1) annotation( + Line(points = {{-32, 84}, {-20, 84}, {-20, 8}, {-10, 8}, {-10, 8}}, color = {0, 0, 127})); + connect(realExpression1.y, switch11.u3) annotation( + Line(points = {{-28, -92}, {-16, -92}, {-16, -8}, {-10, -8}, {-10, -8}}, color = {0, 0, 127})); + connect(realExpression1.y, switch12.u3) annotation( + Line(points = {{-28, -92}, {-16, -92}, {-16, -72}, {-2, -72}, {-2, -72}}, color = {0, 0, 127})); + connect(greaterEqualThreshold3.y, switch12.u2) annotation( + Line(points = {{-28, -64}, {-2, -64}, {-2, -64}, {-2, -64}}, color = {255, 0, 255})); + annotation( + Documentation(info = "<html> + <h4>Syntax</h4> + <blockquote><pre> + Arduino.SerialCommunication.MDD_Examples.MDD_pot.<b>MDD_pot_threshold</b>(); + </pre></blockquote> + <h4>Description</h4> + <p>Voltage reference used to represent 10 bit precision(1024) of ADC along with prescaling by by 128.Internal voltage reference is applied to adc. + </p> + </html>")); + end MDD_pot_threshold; + end MDD_pot; + + package MDD_thermistor + extends Modelica.Icons.ExamplesPackage; + + model MDD_therm_read + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {40, 42}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A4, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 1024, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-40, -20}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica.Blocks.Interaction.Show.RealValue realValue1(use_numberPort = true) annotation( + Placement(visible = true, transformation(origin = {39, -21}, extent = {{-15, -19}, {15, 19}}, rotation = 0))); + equation + connect(adc.y, realValue1.numberPort) annotation( + Line(points = {{-18, -20}, {20, -20}, {20, -20}, {22, -20}}, color = {0, 0, 127})); + end MDD_therm_read; + + model MDD_therm_buzzer + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-61, 61}, extent = {{-21, -21}, {21, 21}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A4, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 1024, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-68, 1.77636e-15}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {41, 61}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Interaction.Show.RealValue realValue1(use_numberPort = true) annotation( + Placement(visible = true, transformation(origin = {12, -56}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.DigitalWriteBoolean digitalWriteBoolean1(pin = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Pin.'3', port = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Port.D) annotation( + Placement(visible = true, transformation(origin = {78, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.LogicalSwitch logicalSwitch1 annotation( + Placement(visible = true, transformation(origin = {40, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1(y = false) annotation( + Placement(visible = true, transformation(origin = {10, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression2(y = true) annotation( + Placement(visible = true, transformation(origin = {10, 32}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.GreaterEqualThreshold greaterEqualThreshold1(threshold = 550) annotation( + Placement(visible = true, transformation(origin = {-4, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(greaterEqualThreshold1.y, logicalSwitch1.u2) annotation( + Line(points = {{8, 0}, {28, 0}, {28, 0}, {28, 0}}, color = {255, 0, 255})); + connect(adc.y, greaterEqualThreshold1.u) annotation( + Line(points = {{-46, 0}, {-16, 0}, {-16, 0}, {-16, 0}}, color = {0, 0, 127})); + connect(adc.y, realValue1.numberPort) annotation( + Line(points = {{-46, 0}, {-32, 0}, {-32, -56}, {0, -56}}, color = {0, 0, 127})); + connect(logicalSwitch1.y, digitalWriteBoolean1.u) annotation( + Line(points = {{52, 0}, {66, 0}, {66, 0}, {66, 0}}, color = {255, 0, 255})); + connect(booleanExpression2.y, logicalSwitch1.u1) annotation( + Line(points = {{22, 32}, {24, 32}, {24, 8}, {28, 8}, {28, 8}}, color = {255, 0, 255})); + connect(booleanExpression1.y, logicalSwitch1.u3) annotation( + Line(points = {{22, -32}, {24, -32}, {24, -8}, {28, -8}, {28, -8}}, color = {255, 0, 255})); + end MDD_therm_buzzer; + end MDD_thermistor; + + package MDD_dcmotor + extends Modelica.Icons.ExamplesPackage; + + model MDD_dcmotor_clock + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {39, 41}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.A}) annotation( + Placement(visible = true, transformation(origin = {51, -3}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = if time < 5 then 100 else 0) annotation( + Placement(visible = true, transformation(origin = {-40, -3}, extent = {{-16, -13}, {16, 13}}, rotation = 0))); + equation + connect(pwm.u[1], integerExpression1.y) annotation( + Line(points = {{28, -3}, {-22, -3}}, color = {255, 127, 0}, thickness = 0.5)); + end MDD_dcmotor_clock; + + model MDD_dcmotor_both + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {56, 60}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.A}) annotation( + Placement(visible = true, transformation(origin = {54, 1.77636e-15}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = if mod(time, 5) >= 2.5 then 100 else 0) annotation( + Placement(visible = true, transformation(origin = {-41, 3.55271e-15}, extent = {{-23, -20}, {23, 20}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression2(y = if mod(time, 5) < 2.5 then 100 else 0) annotation( + Placement(visible = true, transformation(origin = {-39, -48}, extent = {{-23, -20}, {23, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm1(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.B}) annotation( + Placement(visible = true, transformation(origin = {54, -48}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + equation + connect(integerExpression2.y, pwm1.u[1]) annotation( + Line(points = {{-14, -48}, {28, -48}, {28, -48}, {30, -48}}, color = {255, 127, 0})); + connect(integerExpression1.y, pwm.u[1]) annotation( + Line(points = {{-16, 0}, {28, 0}, {28, 0}, {30, 0}}, color = {255, 127, 0})); + end MDD_dcmotor_both; + + model MDD_dcmotor_loop + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 62}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {40, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.A}) annotation( + Placement(visible = true, transformation(origin = {44, 16}, extent = {{-16, -16}, {16, 16}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.PWM pwm1(fastPWM = true, initialValues = {0}, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1, timerNumbers = {Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerNumber.B}) annotation( + Placement(visible = true, transformation(origin = {44, -30}, extent = {{-16, -16}, {16, 16}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = if time < 3 then 100 else 0) annotation( + Placement(visible = true, transformation(origin = {-53, 16}, extent = {{-17, -16}, {17, 16}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression2(y = if time >= 3 then 100 else 0) annotation( + Placement(visible = true, transformation(origin = {-52, -30}, extent = {{-16, -14}, {16, 14}}, rotation = 0))); + equation + connect(integerExpression2.y, pwm1.u[1]) annotation( + Line(points = {{-34, -30}, {24, -30}}, color = {255, 127, 0})); + connect(integerExpression1.y, pwm.u[1]) annotation( + Line(points = {{-34, 16}, {24, 16}}, color = {255, 127, 0})); + end MDD_dcmotor_loop; + end MDD_dcmotor; + + package MDD_servo + extends Modelica.Icons.ExamplesPackage; + + model MDD_servo_init + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 40}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {61, 41}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = 30) annotation( + Placement(visible = true, transformation(origin = {-39, -7}, extent = {{-15, -15}, {15, 15}}, rotation = 0))); + Arduino.SerialCommunication.Blocks.Servo Servo(prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', servo_no = Arduino.SerialCommunication.Types.Servo_no.'1', timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer1) annotation( + Placement(visible = true, transformation(origin = {36, -8}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + equation + connect(integerExpression1.y, Servo.u) annotation( + Line(points = {{-22.5, -7}, {14, -7}, {14, -8}}, color = {255, 127, 0})); + end MDD_servo_init; + + model MDD_servo_loop + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-41, 41}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1 annotation( + Placement(visible = true, transformation(origin = {39, 41}, extent = {{-17, -17}, {17, 17}}, rotation = 0))); + Modelica.Blocks.Math.Gain gain1(k = 20) annotation( + Placement(visible = true, transformation(origin = {38, -6}, extent = {{-14, -14}, {14, 14}}, rotation = 0))); + Modelica.Blocks.Sources.Clock clock1(offset = 0, startTime = 0) annotation( + Placement(visible = true, transformation(origin = {-74, 2}, extent = {{-18, -18}, {18, 18}}, rotation = 0))); + Modelica.Blocks.Logical.LessEqual lessEqual1 annotation( + Placement(visible = true, transformation(origin = {-58, -50}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Logical.Switch switch1 annotation( + Placement(visible = true, transformation(origin = {-22, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = 0) annotation( + Placement(visible = true, transformation(origin = {-30, -42}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression2(y = 10) annotation( + Placement(visible = true, transformation(origin = {-84, -84}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Math.RealToInteger realToInteger1 annotation( + Placement(visible = true, transformation(origin = {4, -34}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Blocks.Servo Servo(prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', servo_no = 1, timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {78, -6}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(gain1.y, Servo.u) annotation( + Line(points = {{54, -6}, {66, -6}, {66, -6}, {66, -6}}, color = {0, 0, 127})); + connect(integerExpression2.y, lessEqual1.u2) annotation( + Line(points = {{-73, -84}, {-64, -84}, {-64, -68}, {-84, -68}, {-84, -58}, {-70, -58}}, color = {255, 127, 0})); + connect(realToInteger1.y, gain1.u) annotation( + Line(points = {{16, -34}, {16, -6}, {21, -6}}, color = {255, 127, 0})); + connect(clock1.y, lessEqual1.u1) annotation( + Line(points = {{-54, 2}, {-50, 2}, {-50, -32}, {-84, -32}, {-84, -50}, {-70, -50}, {-70, -50}}, color = {0, 0, 127})); + connect(clock1.y, switch1.u1) annotation( + Line(points = {{-54, 2}, {-34, 2}}, color = {0, 0, 127})); + connect(integerExpression1.y, switch1.u3) annotation( + Line(points = {{-18, -42}, {-16, -42}, {-16, -24}, {-40, -24}, {-40, -14}, {-34, -14}, {-34, -14}}, color = {255, 127, 0})); + connect(lessEqual1.y, switch1.u2) annotation( + Line(points = {{-46, -50}, {-44, -50}, {-44, -6}, {-34, -6}, {-34, -6}}, color = {255, 0, 255})); + connect(switch1.y, realToInteger1.u) annotation( + Line(points = {{-10, -6}, {-8, -6}, {-8, -34}, {-8, -34}}, color = {0, 0, 127})); + end MDD_servo_loop; + + model MDD_servo_pot + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-40, 60}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {39, 61}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.ADC adc(analogPort = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPort.A2, prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.AnalogPrescaler.'1/128', voltageReference = 1023, voltageReferenceSelect = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.VRefSelect.Internal) annotation( + Placement(visible = true, transformation(origin = {-52, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Math.RealToInteger realToInteger1 annotation( + Placement(visible = true, transformation(origin = {-4, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Blocks.Servo Servo(prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', servo_no = 1, timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {46, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(realToInteger1.y, Servo.u) annotation( + Line(points = {{8, -10}, {34, -10}, {34, -10}, {34, -10}}, color = {255, 127, 0})); + connect(adc.y, realToInteger1.u) annotation( + Line(points = {{-40, -10}, {-16, -10}, {-16, -10}, {-16, -10}}, color = {0, 0, 127})); + end MDD_servo_pot; + + model MDD_servo_reverse + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-59, 61}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {55, 61}, extent = {{-19, -19}, {19, 19}}, rotation = 0))); + Modelica.Blocks.Sources.IntegerExpression integerExpression1(y = 90) annotation( + Placement(visible = true, transformation(origin = {-44, 0}, extent = {{-22, -22}, {22, 22}}, rotation = 0))); + Blocks.Servo Servo(prescaler = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerPrescaler.'1/1024', servo_no = 1, timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {26, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(integerExpression1.y, Servo.u) annotation( + Line(points = {{-20, 0}, {14, 0}, {14, 0}, {14, 0}}, color = {255, 127, 0})); + end MDD_servo_reverse; + end MDD_servo; + + package MDD_modbus + extends Modelica.Icons.ExamplesPackage; + + model MDD_read_val + extends Modelica.Icons.Example; + inner Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu(desiredPeriod = 0.002, platform = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.Platform.ATmega328P) annotation( + Placement(visible = true, transformation(origin = {-45, 67}, extent = {{-15, -15}, {15, 15}}, rotation = 0))); + Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.SynchronizeRealtime synchronizeRealtime1(timer = Modelica_DeviceDrivers.EmbeddedTargets.AVR.Types.TimerSelect.Timer0) annotation( + Placement(visible = true, transformation(origin = {28, 68}, extent = {{-12, -12}, {12, 12}}, rotation = 0))); + Modelica.Blocks.MathInteger.MultiSwitch multiSwitch1(expr = {86, 88, 78}, nu = 3, use_pre_as_default = true, y_default = 0) annotation( + Placement(visible = true, transformation(origin = {-32.6577, -10}, extent = {{-10.0019, -22}, {30.0056, 22}}, rotation = 0))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression1 annotation( + Placement(visible = true, transformation(origin = {-78, -12}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Modelica.Blocks.Interaction.Show.RealValue realValue1 annotation( + Placement(visible = true, transformation(origin = {60, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + Blocks.Read_Val read_Val1 annotation( + Placement(visible = true, transformation(origin = {26, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + equation + connect(read_Val1.y, realValue1.numberPort) annotation( + Line(points = {{38, -10}, {48, -10}, {48, -10}, {48, -10}}, color = {0, 0, 127})); + connect(multiSwitch1.y, read_Val1.u) annotation( + Line(points = {{-2, -10}, {14, -10}, {14, -10}, {14, -10}}, color = {255, 127, 0})); + end MDD_read_val; + end MDD_modbus; + end MDD_Examples; + + package Blocks + extends Modelica.Icons.Package; + + model Servo + extends Modelica.Blocks.Icons.Block; + import Modelica_DeviceDrivers.EmbeddedTargets.AVR; + import sComm = Arduino.SerialCommunication.Functions; + outer Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu; + constant AVR.Types.TimerSelect timer annotation( + Dialog(enable = true, tab = "General", group = "Constants")); + constant AVR.Types.TimerPrescaler prescaler "Pre-scaler for the clock." annotation( + Dialog(enable = true, tab = "General", group = "Constants")); + constant sComm.Types.Servo_no servo_no annotation( + Dialog(enable = true, tab = "General", group = "Constants")); + Modelica.Blocks.Interfaces.IntegerInput u "Connector of Servo input signals (integer 0..255)" annotation( + Placement(transformation(extent = {{-140, -20}, {-100, 20}}))); + protected + AVR.Functions.Timers.Timer clock = AVR.Functions.Timers.Timer(timer, prescaler, clearTimerOnMatch = true); + sComm.Functions.MDD_Servo.Init servo = sComm.Functions.MDD_Servo.Init(servo_no); + algorithm + sComm.Functions.MDD_Servo.Move(servo, u); + annotation( + defaultComponentName = "Servo", + Icon(graphics = {Text(extent = {{-95, -95}, {95, 95}}, textString = "Servo %servo_no", fontName = "Arial")})); + end Servo; + + model Read_Val + extends Modelica.Blocks.Interfaces.SISO; + import Modelica_DeviceDrivers.EmbeddedTargets.AVR; + import sComm = Arduino.SerialCommunication.Functions; + outer Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller mcu; + annotation( + defaultComponentName = "Read_Val", + Icon(graphics = {Text(extent = {{-95, -95}, {95, 95}}, textString = "Read_Val", fontName = "Arial")})); + end Read_Val; + end Blocks; + + type Types + extends Modelica.Icons.TypesPackage; + type Servo_no = enumeration('1' "Servo1", '2' "Servo2") "Servo ID"; + end Types; + + package Icons "Collection of icons used for library components" + extends Modelica.Icons.IconsPackage; + + partial package GenericICPackage "Icon with a generic IC" + annotation(Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}), graphics = {Bitmap(extent = {{-95, -95}, {95, 95}}, fileName = "Resources/Images/Icons/tqfp32.png", rotation = 0)}), Documentation(info = "<html> +<p> +This partial class is intended to design a <em>default icon for microcontrollers</em>. +</p> +</html>")); +end GenericICPackage; + + + +partial block GenericIC "Icon with a generic IC" + annotation(Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}), graphics = {Bitmap(extent = {{-95, -95}, {95, 95}}, fileName = "Resources/Images/Icons/tqfp32.png", rotation = 0)}), Documentation(info = "<html> +<p> +This partial class is intended to design a <em>default icon for microcontrollers</em>. +</p> +</html>")); +end GenericIC; + + + +partial package FunctionLayerIcon + "Icon for packages that represent the function layer" + extends Modelica.Icons.Package; + + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={ + Text( + lineColor={128,128,128}, + extent={{-90,-90},{90,90}}, + textString="f"), + Ellipse( + lineColor={128,128,128}, + extent={{-80,-80},{80,80}})}), +Documentation(info="<html> +<p>This icon indicates Modelica functions.</p> +</html>")); +end FunctionLayerIcon; + + + annotation ( + preferredView="info", + Documentation( + info="<html> +<p> +A collection of basic icons to be used for different elements of the library. +</p> +</html>")); +end Icons; + + annotation( + Documentation(info = "<html> +<h4>Description</h4> +<p> +A serial communication package for hardware interfacing. +</p> +</html>")); + end SerialCommunication; + annotation( + uses(Modelica_DeviceDrivers(version = "1.5.0"), Modelica(version = "3.2.2"))); +end Arduino; diff --git a/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both Binary files differnew file mode 100644 index 0000000..8e427ab --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both diff --git a/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both.hex b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both.hex new file mode 100644 index 0000000..d0aa91f --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both.hex @@ -0,0 +1,121 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C942C0140 +:100020000C9451000C9451000C9451000C94FB0062 +:100030000C9451000C9451000C94CA000C94510083 +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0E4E5F7E002C0F3 +:1000800005900D92A831B107D9F711E0A8E1B1E0D0 +:1000900001C01D92AD31B107E1F70E94A4010C949B +:1000A000A8030C940000CF92DF92EF92FF92CF93BF +:1000B000DF93EC01C880D980EA80FB80C701B601DC +:1000C0000E9479029B01AC01C701B6010E94D301D5 +:1000D0006B017C0120E030E040E05FE30E944103DF +:1000E00087FF03C080E090E002C084E690E09D833B +:1000F0008C8320E030E040E05FE3C701B6010E945E +:10010000380287FD03C080E090E002C084E690E002 +:100110009F838E838E899F898230910561F0833021 +:10012000910599F00197C9F416BC80916E00826028 +:1001300080936E0016C0109285001092840080910A +:100140006F00826080936F000CC01092B2008091AB +:10015000700082608093700004C081E090E00E9493 +:10016000A80378949FB7F89480911A019FBF8823C1 +:10017000C9F310921A01EE85FF858C818083EA898C +:10018000FB898E818083DF91CF91FF90EF90DF908C +:10019000CF9008951F920F920FB60F9211242F93B4 +:1001A0003F938F939F93809118019091190101962D +:1001B000909319018093180180911A01813091F078 +:1001C000209118013091190180911B0190911C011F +:1001D0002817390738F081E080931A01109219012D +:1001E000109218019F918F913F912F910F900FBE08 +:1001F0000F901F9018951F920F920FB60F92112417 +:100200002F933F938F939F938091180190911901A1 +:100210000196909319018093180180911A01813001 +:1002200091F0209118013091190180911B0190915A +:100230001C012817390738F081E080931A011092C9 +:100240001901109218019F918F913F912F910F905A +:100250000FBE0F901F9018951F920F920FB60F921E +:1002600011242F933F938F939F9380911801909126 +:1002700019010196909319018093180180911A0138 +:10028000813091F0209118013091190180911B016A +:1002900090911C012817390738F081E080931A01EA +:1002A00010921901109218019F918F913F912F91F7 +:1002B0000F900FBE0F901F901895CF93DF93FC0106 +:1002C000C1E8D0E088818D60888322E030E0318B06 +:1002D000208B229A40E850E0DA018C9181628C9365 +:1002E0008AE890E0DC0111961C921E921C92938B7E +:1002F000828B88818D60888335872487219ADA01F3 +:100300008C9181688C93A8E8B0E011961C921E92A3 +:100310001C92B787A68785B5836085BD21E030E054 +:10032000358B248B8AE090E090931C0180931B0115 +:1003300084B5826084BD89EF87BD378B268B80E0D2 +:1003400090E0DF91CF910895CF92DF92EF92FF92EC +:1003500080E091E00E945D01C12CD12C760160E02B +:1003600070E0CB0160930001709301018093020162 +:100370009093030180E091E00E9453008FEFC81A30 +:10038000D80AE80AF80AC701B6010E943C022FE623 +:1003900032E143E05BE30E94450320E030E0A90145 +:1003A0000E94D401DFCF5058BB27AA270ED018C116 +:1003B00009D130F00ED120F031F49F3F11F41EF43A +:1003C000FEC00EF4E095E7FBCBC0E92F1AD180F315 +:1003D000BA17620773078407950718F071F49EF542 +:1003E00049C10EF4E0950B2EBA2FA02D0B01B901D7 +:1003F00090010C01CA01A0011124FF27591B99F09B +:10040000593F50F4503E68F11A16F040A22F232FA6 +:10041000342F4427585FF3CF469537952795A795F6 +:10042000F0405395C9F77EF41F16BA0B620B730B9D +:10043000840BBAF09150A1F0FF0FBB1F661F771F0E +:10044000881FC2F70EC0BA0F621F731F841F48F4C3 +:10045000879577956795B795F7959E3F08F0B3CF49 +:100460009395880F08F09927EE0F97958795089533 +:1004700053D008F481E00895E89409C097FB3EF456 +:1004800090958095709561957F4F8F4F9F4F9923E1 +:10049000A9F0F92F96E9BB279395F695879577955F +:1004A0006795B795F111F8CFFAF4BB0F11F460FF1F +:1004B0001BC06F5F7F4F8F4F9F4F16C0882311F077 +:1004C00096E911C0772321F09EE8872F762F05C08B +:1004D000662371F096E8862F70E060E02AF09A9526 +:1004E000660F771F881FDAF7880F9695879597F91B +:1004F0000895A9D080F09F3740F491110EF0BBC051 +:1005000060E070E080E89FEB089526F41B16611D03 +:10051000711D811D2BC045C0990F0008550FAA0BF6 +:10052000E0E8FEEF16161706E807F907C0F0121606 +:100530001306E407F50798F0621B730B840B950B09 +:1005400039F40A2661F0232B242B252B21F408955E +:100550000A2609F4A140A6958FEF811D811D0895FB +:1005600097F99F6780E870E060E00895882371F450 +:10057000772321F09850872B762F07C0662311F43C +:1005800099270DC09051862B70E060E02AF09A9573 +:10059000660F771F881FDAF7880F9695879597F96A +:1005A00008959F3F31F0915020F487957795679596 +:1005B000B795880F911D9695879597F908959FEFA8 +:1005C00080EC089500240A941616170618060906EA +:1005D000089500240A9412161306140605060895B9 +:1005E000092E0394000C11F4882352F0BB0F40F441 +:1005F000BF2B11F460FF04C06F5F7F4F8F4F9F4F81 +:10060000089557FD9058440F551F59F05F3F71F002 +:100610004795880F97FB991F61F09F3F79F0879569 +:100620000895121613061406551FF2CF4695F1DFF2 +:1006300008C0161617061806991FF1CF8695710582 +:10064000610508940895E5DFA0F0BEE7B91788F4C6 +:10065000BB279F3860F41616B11D672F782F8827A7 +:10066000985FF7CF869577956795B11D93959639E5 +:10067000C8F30895E894BB2766277727CB0197F93D +:1006800008954ADF08F48FEF08950BD0A9CF9ADFC1 +:1006900028F09FDF18F0952309F062CF90CF112446 +:1006A000EACFAFDFA0F3959FD1F3950F50E0551F30 +:1006B000629FF001729FBB27F00DB11D639FAA27B7 +:1006C000F00DB11DAA1F649F6627B00DA11D661F06 +:1006D000829F2227B00DA11D621F739FB00DA11D27 +:1006E000621F839FA00D611D221F749F3327A00DE1 +:1006F000611D231F849F600D211D822F762F6A2F7D +:1007000011249F5750408AF0E1F088234AF0EE0F01 +:10071000FF1FBB1F661F771F881F91505040A9F70E +:100720009E3F510570F01CCFA6CF5F3FECF3983E83 +:10073000DCF3869577956795B795F795E7959F5F75 +:10074000C1F7FE2B880F911D9695879597F908950F +:04075000F894FFCF4B +:1007540000000000000000000AD7233C0000000055 +:0807640000000000000000008D +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both_main.c b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both_main.c new file mode 100644 index 0000000..08a9ca0 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_both_main.c @@ -0,0 +1,217 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_dcmotor_both_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_dcmotor_both_fmi2Component_s { + fmi2Real currentTime; + fmi2Integer fmi2IntegerVars[2]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[6]; +} MDD_dcmotor_both_fmi2Component; + +MDD_dcmotor_both_fmi2Component MDD_dcmotor_both_component = { + .fmi2IntegerVars = { + 0 /*pwm._u[1]*/, + 0 /*pwm1._u[1]*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value) +{ + MDD_avr_pwm_set(om_pwm, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted) +{ + void* om_pwm; + om_pwm = MDD_avr_pwm_init(om_timer, om_pin, om_initialValue, om_inverted); + return om_pwm; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm) +{ + MDD_avr_pwm_close(om_pwm); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_dcmotor_both_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_dcmotor_both_component; +} + +fmi2Status MDD_dcmotor_both_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_dcmotor_both_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[2] /* pwm1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[3] /* pwm1._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[2] /* pwm1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 2, 0, fmi2False); + comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 1, 0, fmi2False); + comp->extObjs[4] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[5] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[4] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + return fmi2OK; +} + +fmi2Status MDD_dcmotor_both_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_dcmotor_both_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_dcmotor_both_functionOutputs(fmi2Component comp) +{ + comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */ = ((om_mod(comp->currentTime,1.0))>=(0.5)) ? (100) : (0); /* equation 4 */ + comp->fmi2IntegerVars[1] /* pwm1._u[1] DISCRETE */ = ((om_mod(comp->currentTime,1.0))<(0.5)) ? (100) : (0); /* equation 5 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[5] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[3] /* pwm1._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, comp->fmi2IntegerVars[1] /* pwm1._u[1] DISCRETE */); +} + +fmi2Status MDD_dcmotor_both_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_dcmotor_both_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_dcmotor_both_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_dcmotor_both_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_dcmotor_both_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_dcmotor_both_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_dcmotor_both_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock Binary files differnew file mode 100644 index 0000000..249910a --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock diff --git a/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock.hex b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock.hex new file mode 100644 index 0000000..afe0f97 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock.hex @@ -0,0 +1,94 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C94E50088 +:100020000C9451000C9451000C9451000C94B400A9 +:100030000C9451000C9451000C9483000C945100CA +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0E6EAF5E002C0EE +:1000800005900D92A231B107D9F711E0A2E1B1E0DC +:1000900001C01D92A731B107E1F70E9445010C9400 +:1000A000D1020C9400008230910561F083309105FB +:1000B00099F00197C9F416BC80916E00826080931C +:1000C0006E0016C0109285001092840080916F001F +:1000D000826080936F000CC01092B200809170001B +:1000E00082608093700004C081E090E00E94D102A1 +:1000F00078949FB7F894809114019FBF8823C9F327 +:100100001092140108951F920F920FB60F921124AE +:100110002F933F938F939F9380911201909113019E +:100120000196909313018093120180911401813004 +:1001300091F020911201309113018091150190915D +:1001400016012817390738F081E0809314011092C6 +:100150001301109212019F918F913F912F910F9057 +:100160000FBE0F901F9018951F920F920FB60F920F +:1001700011242F933F938F939F938091120190911D +:100180001301019690931301809312018091140141 +:10019000813091F02091120130911301809115016D +:1001A000909116012817390738F081E080931401E7 +:1001B00010921301109212019F918F913F912F91F4 +:1001C0000F900FBE0F901F9018951F920F920FB6B1 +:1001D0000F9211242F933F938F939F93809112013D +:1001E00090911301019690931301809312018091D5 +:1001F0001401813091F0209112013091130180910E +:100200001501909116012817390738F081E0809385 +:10021000140110921301109212019F918F913F913E +:100220002F910F900FBE0F901F901895FC01A1E821 +:10023000B0E08C918D608C9382E090E09387828710 +:10024000219AA0E8B0E08C9181688C93A8E8B0E096 +:1002500011961C921E921C92B587A48785B5836067 +:1002600085BD21E030E0378726878AE090E09093D3 +:1002700016018093150184B5826084BD89EF87BD26 +:10028000318B208B80E090E00895CF92DF92EF9247 +:10029000FF9280E091E00E941601C12CD12C7601E2 +:1002A00060E070E0CB0160930001709301018093E6 +:1002B00002019093030180911001909111010E941D +:1002C0005300E0910C01F0910D0110828FEFC81ADC +:1002D000D80AE80AF80AC701B6010E94E0012FE631 +:1002E00032E143E05BE30E946E0220E030E0A901CE +:1002F0000E947C01D8CF5058BB27AA270ED0B4C08B +:10030000A5D030F0AAD020F031F49F3F11F41EF4B4 +:100310009AC00EF4E095E7FB90C0E92FB6D080F3C9 +:10032000BA17620773078407950718F071F49EF5F2 +:10033000CEC00EF4E0950B2EBA2FA02D0B01B90103 +:1003400090010C01CA01A0011124FF27591B99F04B +:10035000593F50F4503E68F11A16F040A22F232F57 +:10036000342F4427585FF3CF469537952795A795A7 +:10037000F0405395C9F77EF41F16BA0B620B730B4E +:10038000840BBAF09150A1F0FF0FBB1F661F771FBF +:10039000881FC2F70EC0BA0F621F731F841F48F474 +:1003A000879577956795B795F7959E3F08F0B3CFFA +:1003B0009395880F08F09927EE0F979587950895E4 +:1003C000E89409C097FB3EF49095809570956195EF +:1003D0007F4F8F4F9F4F9923A9F0F92F96E9BB27A5 +:1003E0009395F695879577956795B795F111F8CF21 +:1003F000FAF4BB0F11F460FF1BC06F5F7F4F8F4F8C +:100400009F4F16C0882311F096E911C0772321F081 +:100410009EE8872F762F05C0662371F096E8862F19 +:1004200070E060E02AF09A95660F771F881FDAF770 +:10043000880F9695879597F9089597F99F6780E8B3 +:1004400070E060E008959FEF80EC089500240A9426 +:100450001616170618060906089500240A9412169F +:100460001306140605060895092E0394000C11F4D2 +:10047000882352F0BB0F40F4BF2B11F460FF04C07F +:100480006F5F7F4F8F4F9F4F089557FD9058440FD8 +:10049000551F59F05F3F71F04795880F97FB991FE3 +:1004A00061F09F3F79F087950895121613061406A0 +:1004B000551FF2CF4695F1DF08C01616170618062D +:1004C000991FF1CF86957105610508940895E89408 +:1004D000BB2766277727CB0197F908950BD0C4CFA8 +:1004E000B5DF28F0BADF18F0952309F0A6CFABCF1F +:1004F0001124EECFCADFA0F3959FD1F3950F50E002 +:10050000551F629FF001729FBB27F00DB11D639FC5 +:10051000AA27F00DB11DAA1F649F6627B00DA11D6B +:10052000661F829F2227B00DA11D621F739FB00D11 +:10053000A11D621F839FA00D611D221F749F332781 +:10054000A00D611D231F849F600D211D822F762F1A +:100550006A2F11249F5750408AF0E1F088234AF017 +:10056000EE0FFF1FBB1F661F771F881F9150504063 +:10057000A9F79E3F510570F060CFAACF5F3FECF323 +:10058000983EDCF3869577956795B795F795E7954F +:100590009F5FC1F7FE2B880F911D9695879597F960 +:0605A0000895F894FFCF5E +:1005A6000000000000000AD7233C00000000000005 +:0205B600000043 +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock_main.c b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock_main.c new file mode 100644 index 0000000..f11c915 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_clock_main.c @@ -0,0 +1,213 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_dcmotor_clock_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_dcmotor_clock_fmi2Component_s { + fmi2Real currentTime; + fmi2Integer fmi2IntegerVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[4]; +} MDD_dcmotor_clock_fmi2Component; + +MDD_dcmotor_clock_fmi2Component MDD_dcmotor_clock_component = { + .fmi2IntegerVars = { + 0 /*integerExpression1._y*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value) +{ + MDD_avr_pwm_set(om_pwm, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted) +{ + void* om_pwm; + om_pwm = MDD_avr_pwm_init(om_timer, om_pin, om_initialValue, om_inverted); + return om_pwm; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm) +{ + MDD_avr_pwm_close(om_pwm); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_dcmotor_clock_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_dcmotor_clock_component; +} + +fmi2Status MDD_dcmotor_clock_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_dcmotor_clock_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 1, 0, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + return fmi2OK; +} + +fmi2Status MDD_dcmotor_clock_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_dcmotor_clock_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_dcmotor_clock_functionOutputs(fmi2Component comp) +{ + Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, 0); +} + +fmi2Status MDD_dcmotor_clock_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_dcmotor_clock_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_dcmotor_clock_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_dcmotor_clock_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_dcmotor_clock_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_dcmotor_clock_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_dcmotor_clock_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_loop_main.c b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_loop_main.c new file mode 100644 index 0000000..4a0dad8 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/dcmotor/MDD_dcmotor_loop_main.c @@ -0,0 +1,235 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_dcmotor_loop_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_dcmotor_loop_fmi2Component_s { + fmi2Real currentTime; + fmi2Real fmi2RealVars[4]; + fmi2Integer fmi2IntegerVars[1]; + fmi2Real fmi2RealParameter[4]; + void* extObjs[4]; +} MDD_dcmotor_loop_fmi2Component; + +MDD_dcmotor_loop_fmi2Component MDD_dcmotor_loop_component = { + .fmi2RealVars = { + 100.0 /*add31._u1*/, + 0.0 /*add31._u2*/, + 0.0 /*add31._u3*/, + 100.0 /*add31._y*/, + }, + .fmi2IntegerVars = { + 0 /*pwm._u[1]*/, + }, + .fmi2RealParameter = { + 1.0 /*add31._k1*/, + -1.0 /*add31._k2*/, + 1.0 /*add31._k3*/, + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(fmi2Component comp, void* om_pwm, fmi2Integer om_value) +{ + MDD_avr_pwm_set(om_pwm, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_pin, fmi2Integer om_initialValue, fmi2Boolean om_inverted) +{ + void* om_pwm; + om_pwm = MDD_avr_pwm_init(om_timer, om_pin, om_initialValue, om_inverted); + return om_pwm; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_destructor(fmi2Component comp, void* om_pwm) +{ + MDD_avr_pwm_close(om_pwm); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_dcmotor_loop_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_dcmotor_loop_component; +} + +fmi2Status MDD_dcmotor_loop_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_dcmotor_loop_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 2, 7, fmi2True); + comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_Init_constructor(comp, comp->extObjs[0] /* pwm._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 1, 0, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + return fmi2OK; +} + +fmi2Status MDD_dcmotor_loop_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_dcmotor_loop_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_dcmotor_loop_functionOutputs(fmi2Component comp) +{ + comp->fmi2RealVars[0] /* add31._u1 variable */ = ( + #error "[CodegenEmbeddedC.tpl:474:14-474:14] daeExpBinary: Not supporting operator? time <= 1.0" + ) ? (100.0) : (0.0); /* equation 7 */ + comp->fmi2RealVars[1] /* add31._u2 variable */ = ( + #error "[CodegenEmbeddedC.tpl:460:14-460:14] daeExp: Not supporting time <= 1.4 and time > 1.0" + ) ? (100.0) : (0.0); /* equation 8 */ + comp->fmi2RealVars[2] /* add31._u3 variable */ = ((comp->currentTime)>(1.4)) ? (100.0) : (0.0); /* equation 9 */ + comp->fmi2RealVars[3] /* add31._y variable */ = ((comp->fmi2RealParameter[0] /* add31._k1 PARAM */)*(comp->fmi2RealVars[0] /* add31._u1 variable */))+(((comp->fmi2RealParameter[1] /* add31._k2 PARAM */)*(comp->fmi2RealVars[1] /* add31._u2 variable */))+((comp->fmi2RealParameter[2] /* add31._k3 PARAM */)*(comp->fmi2RealVars[2] /* add31._u3 variable */))); /* equation 10 */ + comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */ = ((comp->fmi2RealVars[3] /* add31._y variable */)>(0.0)) ? (((int) + #error "[CodegenEmbeddedC.tpl:490:28-490:28] daeExpCallBuiltin: Not supported: floor(0.5 + add31.y, 1)" + )) : (((int) + #error "[CodegenEmbeddedC.tpl:490:28-490:28] daeExpCallBuiltin: Not supported: ceil(-0.5 + add31.y, 3)" + )); /* equation 11 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_PWM_set(comp, comp->extObjs[1] /* pwm._pwm[1] EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.PWM.Init */, comp->fmi2IntegerVars[0] /* pwm._u[1] DISCRETE */); +} + +fmi2Status MDD_dcmotor_loop_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_dcmotor_loop_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_dcmotor_loop_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_dcmotor_loop_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_dcmotor_loop_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_dcmotor_loop_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_dcmotor_loop_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_both.mos b/tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_both.mos new file mode 100644 index 0000000..876a5d6 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_both.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_dcmotor.MDD_dcmotor_both, fileNamePrefix="MDD_dcmotor_both"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_clock.mos b/tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_clock.mos new file mode 100644 index 0000000..cdd2767 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_clock.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_dcmotor.MDD_dcmotor_clock, fileNamePrefix="MDD_dcmotor_clock"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_loop.mos b/tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_loop.mos new file mode 100644 index 0000000..e9207ed --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/dcmotor/run_dcmotor_loop.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_dcmotor.MDD_dcmotor_loop, fileNamePrefix="MDD_dcmotor_loop"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr Binary files differnew file mode 100644 index 0000000..c87ce1f --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr diff --git a/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led Binary files differnew file mode 100644 index 0000000..542fc5b --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led diff --git a/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led.hex b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led.hex new file mode 100644 index 0000000..f845f70 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led.hex @@ -0,0 +1,120 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C9431013B +:100020000C9451000C9451000C9451000C9400015C +:100030000C9451000C9451000C94CF000C9451007E +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0E4E4F7E002C0F4 +:1000800005900D92AE31B107D9F711E0AEE1B1E0C4 +:1000900001C01D92A332B107E1F70E948B010C94BD +:1000A000A0030C9400000F931F93CF93DF93EC01F8 +:1000B00080917C00857E856080937C0080917A00B1 +:1000C000806480937A0080917A0086FDFCCF6091F5 +:1000D00078007091790080E090E00E94870220E033 +:1000E00030E040E854E40E94190320E030EC4FE790 +:1000F00054E40E941F026C837D838E839F8301E002 +:1001000010E02E853F85488959890E9415031816ED +:1001100014F000E010E01D870C878C8D9D8D8230DF +:10012000910561F08330910599F00197C9F416BCEF +:1001300080916E00826080936E0016C010928500E0 +:100140001092840080916F00826080936F000CC0D9 +:100150001092B2008091700082608093700004C0A1 +:1001600081E090E00E94A00378949FB7F89480917A +:1001700020019FBF8823C9F310922001E88DF98DDB +:100180008C859D85892B19F08081826002C08081D9 +:100190008D7F8083DF91CF911F910F9108951F92E2 +:1001A0000F920FB60F9211242F933F938F939F932B +:1001B00080911E0190911F01019690931F018093E1 +:1001C0001E0180912001813091F020911E0130911B +:1001D0001F0180912101909122012817390738F0E1 +:1001E00081E08093200110921F0110921E019F91C7 +:1001F0008F913F912F910F900FBE0F901F901895E8 +:100200001F920F920FB60F9211242F933F938F934B +:100210009F9380911E0190911F01019690931F0161 +:1002200080931E0180912001813091F020911E0168 +:1002300030911F01809121019091220128173907E7 +:1002400038F081E08093200110921F0110921E016E +:100250009F918F913F912F910F900FBE0F901F9004 +:1002600018951F920F920FB60F9211242F933F9360 +:100270008F939F9380911E0190911F0101969093FF +:100280001F0180931E0180912001813091F0209107 +:100290001E0130911F0180912101909122012817A8 +:1002A000390738F081E08093200110921F011092ED +:1002B0001E019F918F913F912F910F900FBE0F9034 +:1002C0001F901895FC01ACE7B0E08C91806C8C938A +:1002D000AAE7B0E08C9187688C93178A168A219AD6 +:1002E00085E290E0918F808F85B5836085BD21E0A8 +:1002F00030E0338F228F8AE090E090932201809348 +:10030000210184B5826084BD89EF87BD358F248F3C +:1003100080E090E00895CF92DF92EF92FF9280E02C +:1003200091E00E946201C12CD12C760160E070E066 +:10033000CB016093000170930101809302019093BF +:10034000030180E091E00E9453008FEFC81AD80AA1 +:10035000E80AF80AC701B6010E9487022FE632E1D7 +:1003600043E05BE30E94190320E030E0A9010E9412 +:10037000BB01DFCF5058BB27AA270ED01CC10DD11F +:1003800030F012D120F031F49F3F11F41EF402C17D +:100390000EF4E095E7FBF8C0E92F1ED180F3BA1701 +:1003A000620773078407950718F071F49EF536C14C +:1003B0000EF4E0950B2EBA2FA02D0B01B901900180 +:1003C0000C01CA01A0011124FF27591B99F0593FC4 +:1003D00050F4503E68F11A16F040A22F232F342F0C +:1003E0004427585FF3CF469537952795A795F0405A +:1003F0005395C9F77EF41F16BA0B620B730B840B6F +:10040000BAF09150A1F0FF0FBB1F661F771F881F26 +:10041000C2F70EC0BA0F621F731F841F48F487957E +:1004200077956795B795F7959E3F08F0B3CF93956D +:10043000880F08F09927EE0F9795879508950CD0AF +:10044000BAC0B2D040F0A9D030F021F45F3F19F02B +:100450009BC05111E4C09EC0BFD098F39923C9F34B +:100460005523B1F3951B550BBB27AA2762177307BA +:10047000840738F09F5F5F4F220F331F441FAA1F6E +:10048000A9F333D00E2E3AF0E0E830D0915050402E +:10049000E695001CCAF729D0FE2F27D0660F771FDC +:1004A000881FBB1F261737074807AB07B0E809F0BE +:1004B000BB0B802DBF01FF2793585F4F2AF09E3F53 +:1004C000510568F061C0ABC05F3FECF3983EDCF3D0 +:1004D000869577956795B795F7959F5FC9F7880FCC +:1004E000911D9695879597F90895E1E0660F771F1E +:1004F000881FBB1F621773078407BA0720F0621BAF +:10050000730B840BBA0BEE1F88F7E0950895E894FF +:1005100009C097FB3EF490958095709561957F4F4B +:100520008F4F9F4F9923A9F0F92F96E9BB279395F9 +:10053000F695879577956795B795F111F8CFFAF409 +:10054000BB0F11F460FF1BC06F5F7F4F8F4F9F4F3A +:1005500016C0882311F096E911C0772321F09EE898 +:10056000872F762F05C0662371F096E8862F70E0FE +:1005700060E02AF09A95660F771F881FDAF7880FD8 +:100580009695879597F9089597F99F6780E870E0A9 +:1005900060E008959FEF80EC089500240A941616F9 +:1005A000170618060906089500240A941216130661 +:1005B000140605060895092E0394000C11F48823EF +:1005C00052F0BB0F40F4BF2B11F460FF04C06F5F0B +:1005D0007F4F8F4F9F4F089557FD9058440F551FE1 +:1005E00059F05F3F71F04795880F97FB991F61F0B5 +:1005F0009F3F79F087950895121613061406551F2C +:10060000F2CF4695F1DF08C0161617061806991F97 +:10061000F1CF86957105610508940895E894BB278C +:1006200066277727CB0197F9089566D008F48FEFF6 +:1006300008950BD0C0CFB1DF28F0B6DF18F09523B6 +:1006400009F0A2CFA7CF1124EACFC6DFA0F3959F70 +:10065000D1F3950F50E0551F629FF001729FBB27A9 +:10066000F00DB11D639FAA27F00DB11DAA1F649F55 +:100670006627B00DA11D661F829F2227B00DA11D08 +:10068000621F739FB00DA11D621F839FA00D611D8E +:10069000221F749F3327A00D611D231F849F600DAF +:1006A000211D822F762F6A2F11249F5750408AF0E8 +:1006B000E1F088234AF0EE0FFF1FBB1F661F771F74 +:1006C000881F91505040A9F79E3F510570F05CCFB4 +:1006D000A6CF5F3FECF3983EDCF386957795679560 +:1006E000B795F795E7959F5FC1F7FE2B880F911D92 +:1006F0009695879597F90895990F0008550FAA0BBD +:10070000E0E8FEEF16161706E807F907C0F0121624 +:100710001306E407F50798F0621B730B840B950B27 +:1007200039F40A2661F0232B242B252B21F408957C +:100730000A2609F4A140A6958FEF811D811D089519 +:04074000F894FFCF5B +:1007440000000000000000000000000000000000A5 +:0E07540016440AD7233C0000000000000000FD +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led_main.c b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led_main.c new file mode 100644 index 0000000..36a97c9 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_led_main.c @@ -0,0 +1,243 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_ldr_led_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_ldr_led_fmi2Component_s { + fmi2Real currentTime; + fmi2Real fmi2RealVars[1]; + fmi2Boolean fmi2BooleanVars[3]; + fmi2Real fmi2RealParameter[2]; + void* extObjs[4]; +} MDD_ldr_led_fmi2Component; + +MDD_ldr_led_fmi2Component MDD_ldr_led_component = { + .fmi2RealVars = { + 0.0 /*adc._y*/, + }, + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + fmi2False /*booleanExpression2._y*/, + fmi2False /*digitalWriteBoolean1._u*/, + }, + .fmi2RealParameter = { + 600.0 /*greaterThreshold1._threshold*/, + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +static const char * const OMCLIT0 = "ElectricPotential"; +static const char * const OMCLIT1 = "V"; +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" +#include "MDDAVRAnalog.h" + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution) +{ + fmi2Real om_value; + om_value = MDD_avr_analog_read(om_analogPort, om_vref, om_voltageResolution); + return om_value; +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage) +{ + void* om_avr; + om_avr = MDD_avr_analog_init(om_divisionFactor, om_referenceVoltage); + return om_avr; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr) +{ + MDD_avr_analog_close(om_avr); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_ldr_led_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_ldr_led_component; +} + +fmi2Status MDD_ldr_led_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_ldr_led_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* adc._analog EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Analog.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(comp, 7, 4); + comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + return fmi2OK; +} + +fmi2Status MDD_ldr_led_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_ldr_led_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_ldr_led_functionOutputs(fmi2Component comp) +{ + comp->fmi2RealVars[0] /* adc._y variable */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(comp, 6, 1024.0, 10); /* equation 6 */ + comp->fmi2BooleanVars[2] /* digitalWriteBoolean1._u DISCRETE */ = (comp->fmi2RealVars[0] /* adc._y variable */)>(comp->fmi2RealParameter[0] /* greaterThreshold1._threshold PARAM */); /* equation 7 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, comp->fmi2BooleanVars[2] /* digitalWriteBoolean1._u DISCRETE */); +} + +fmi2Status MDD_ldr_led_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_ldr_led_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_ldr_led_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_ldr_led_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_ldr_led_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_ldr_led_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_ldr_led_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read Binary files differnew file mode 100644 index 0000000..f939bf9 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read diff --git a/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read.hex b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read.hex new file mode 100644 index 0000000..1040803 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read.hex @@ -0,0 +1,110 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C94130159 +:100020000C9451000C9451000C9451000C94E2007B +:100030000C9451000C9451000C94B1000C9451009C +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0EEEAF6E002C0E5 +:1000800005900D92AC31B107D9F711E0ACE1B1E0C8 +:1000900001C01D92A132B107E1F70E9468010C94E2 +:1000A00055030C940000CF93DF93EC0190917C00FA +:1000B000957E956090937C0080917A008064809317 +:1000C0007A0080917A0086FDFCCF60917800709173 +:1000D000790080E090E00E94640220E030E040E897 +:1000E00054E40E94F20220E030EC4FE754E40E9416 +:1000F000FC016C837D838E839F838A8D9B8D8230F0 +:10010000910561F08330910599F00197C9F416BC0F +:1001100080916E00826080936E0016C01092850000 +:100120001092840080916F00826080936F000CC0F9 +:100130001092B2008091700082608093700004C0C1 +:1001400081E090E00E94550378949FB7F8948091E5 +:100150001E019FBF8823C9F310921E01DF91CF912A +:1001600008951F920F920FB60F9211242F933F9371 +:100170008F939F9380911C0190911D010196909304 +:100180001D0180931C0180911E01813091F020910E +:100190001C0130911D0180911F01909120012817B1 +:1001A000390738F081E080931E0110921D011092F2 +:1001B0001C019F918F913F912F910F900FBE0F9037 +:1001C0001F9018951F920F920FB60F9211242F9324 +:1001D0003F938F939F9380911C0190911D010196F5 +:1001E00090931D0180931C0180911E01813091F03C +:1001F00020911C0130911D0180911F0190912001DF +:100200002817390738F081E080931E0110921D01F4 +:1002100010921C019F918F913F912F910F900FBED3 +:100220000F901F9018951F920F920FB60F921124E6 +:100230002F933F938F939F9380911C0190911D0169 +:10024000019690931D0180931C0180911E018130C5 +:1002500091F020911C0130911D0180911F0190911E +:1002600020012817390738F081E080931E01109291 +:100270001D0110921C019F918F913F912F910F9022 +:100280000FBE0F901F901895FC01ACE7B0E08C9169 +:10029000806C8C93AAE7B0E08C9187688C93178A66 +:1002A000168A85B5836085BD21E030E0318F208FCF +:1002B0008AE090E09093200180931F0184B58260D2 +:1002C00084BD89EF87BD338F228F80E090E0089551 +:1002D000CF92DF92EF92FF9280E091E00E94440182 +:1002E000C12CD12C760160E070E0CB01609300015D +:1002F00070930101809302019093030180E091E0EB +:100300000E9453008FEFC81AD80AE80AF80AC701FA +:10031000B6010E9464022FE632E143E05BE30E94F3 +:10032000F20220E030E0A9010E949801DFCF50588E +:10033000BB27AA270ED01CC10DD130F012D120F05E +:1003400031F49F3F11F41EF402C10EF4E095E7FB77 +:10035000F8C0E92F1ED180F3BA176207730784072C +:10036000950718F071F49EF536C10EF4E0950B2E4A +:10037000BA2FA02D0B01B90190010C01CA01A001F7 +:100380001124FF27591B99F0593F50F4503E68F152 +:100390001A16F040A22F232F342F4427585FF3CF93 +:1003A000469537952795A795F0405395C9F77EF464 +:1003B0001F16BA0B620B730B840BBAF09150A1F0AD +:1003C000FF0FBB1F661F771F881FC2F70EC0BA0F33 +:1003D000621F731F841F48F4879577956795B795BB +:1003E000F7959E3F08F0B3CF9395880F08F09927B3 +:1003F000EE0F9795879508950CD0BAC0B2D040F013 +:10040000A9D030F021F45F3F19F09BC05111E4C036 +:100410009EC0BFD098F39923C9F35523B1F3951B20 +:10042000550BBB27AA2762177307840738F09F5F15 +:100430005F4F220F331F441FAA1FA9F333D00E2E84 +:100440003AF0E0E830D091505040E695001CCAF7F1 +:1004500029D0FE2F27D0660F771F881FBB1F2617B6 +:1004600037074807AB07B0E809F0BB0B802DBF0189 +:10047000FF2793585F4F2AF09E3F510568F061C0F7 +:10048000ABC05F3FECF3983EDCF3869577956795BC +:10049000B795F7959F5FC9F7880F911D969587953A +:1004A00097F90895E1E0660F771F881FBB1F621759 +:1004B00073078407BA0720F0621B730B840BBA0B17 +:1004C000EE1F88F7E0950895E89409C097FB3EF485 +:1004D00090958095709561957F4F8F4F9F4F992391 +:1004E000A9F0F92F96E9BB279395F695879577950F +:1004F0006795B795F111F8CFFAF4BB0F11F460FFCF +:100500001BC06F5F7F4F8F4F9F4F16C0882311F026 +:1005100096E911C0772321F09EE8872F762F05C03A +:10052000662371F096E8862F70E060E02AF09A95D5 +:10053000660F771F881FDAF7880F9695879597F9CA +:10054000089597F99F6780E870E060E008959FEF55 +:1005500080EC089500240A9416161706180609065A +:10056000089500240A941216130614060506089529 +:10057000092E0394000C11F4882352F0BB0F40F4B1 +:10058000BF2B11F460FF04C06F5F7F4F8F4F9F4FF1 +:10059000089557FD9058440F551F59F05F3F71F073 +:1005A0004795880F97FB991F61F09F3F79F08795DA +:1005B0000895121613061406551FF2CF4695F1DF63 +:1005C00008C0161617061806991FF1CF86957105F3 +:1005D000610508940895E894BB2766277727CB0127 +:1005E00097F908950BD0C4CFB5DF28F0BADF18F023 +:1005F000952309F0A6CFABCF1124EECFCADFA0F32D +:10060000959FD1F3950F50E0551F629FF001729FA7 +:10061000BB27F00DB11D639FAA27F00DB11DAA1FC6 +:10062000649F6627B00DA11D661F829F2227B00D13 +:10063000A11D621F739FB00DA11D621F839FA00D9E +:10064000611D221F749F3327A00D611D231F849FEE +:10065000600D211D822F762F6A2F11249F57504045 +:100660008AF0E1F088234AF0EE0FFF1FBB1F661FE0 +:10067000771F881F91505040A9F79E3F510570F099 +:1006800060CFAACF5F3FECF3983EDCF38695779579 +:100690006795B795F795E7959F5FC1F7FE2B880F94 +:0E06A000911D9695879597F90895F894FFCFD0 +:1006AE000000000000000000000000000AD7233CFC +:0C06BE000200010000000000000000002D +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read_main.c b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read_main.c new file mode 100644 index 0000000..fa60b33 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/ldr/MDD_ldr_read_main.c @@ -0,0 +1,226 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_ldr_read_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_ldr_read_fmi2Component_s { + fmi2Real currentTime; + fmi2Real fmi2RealVars[2]; + fmi2Real fmi2RealParameter[1]; + fmi2Integer fmi2IntegerParameter[1]; + fmi2Boolean fmi2BooleanParameter[1]; + fmi2String fmi2StringParameter[1]; + void* extObjs[3]; +} MDD_ldr_read_fmi2Component; + +MDD_ldr_read_fmi2Component MDD_ldr_read_component = { + .fmi2RealVars = { + 0.0 /*adc._y*/, + 0.0 /*realValue1._number*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, + .fmi2IntegerParameter = { + 2 /*realValue1._significantDigits*/, + }, + .fmi2BooleanParameter = { + fmi2True /*realValue1._use_numberPort*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +static const char * const OMCLIT0 = "ElectricPotential"; +static const char * const OMCLIT1 = "V"; +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRAnalog.h" + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution) +{ + fmi2Real om_value; + om_value = MDD_avr_analog_read(om_analogPort, om_vref, om_voltageResolution); + return om_value; +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage) +{ + void* om_avr; + om_avr = MDD_avr_analog_init(om_divisionFactor, om_referenceVoltage); + return om_avr; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr) +{ + MDD_avr_analog_close(om_avr); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_ldr_read_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_ldr_read_component; +} + +fmi2Status MDD_ldr_read_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_ldr_read_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* adc._analog EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Analog.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(comp, 7, 4); + comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + return fmi2OK; +} + +fmi2Status MDD_ldr_read_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_ldr_read_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_ldr_read_functionOutputs(fmi2Component comp) +{ + comp->fmi2RealVars[0] /* adc._y variable */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(comp, 6, 1024.0, 10); /* equation 4 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */); +} + +fmi2Status MDD_ldr_read_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_ldr_read_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_ldr_read_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_ldr_read_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_ldr_read_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_ldr_read_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_ldr_read_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/ldr/run_ldr_led.mos b/tools/openmodelica/windows/MDD_build/ldr/run_ldr_led.mos new file mode 100644 index 0000000..312d62a --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/ldr/run_ldr_led.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_ldr.MDD_ldr_led, fileNamePrefix="MDD_ldr_led"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/ldr/run_ldr_read.mos b/tools/openmodelica/windows/MDD_build/ldr/run_ldr_read.mos new file mode 100644 index 0000000..9e99912 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/ldr/run_ldr_read.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_ldr.MDD_ldr_read, fileNamePrefix="MDD_ldr_read"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blink b/tools/openmodelica/windows/MDD_build/led/MDD_led_blink Binary files differnew file mode 100644 index 0000000..cdb6635 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blink diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blink.hex b/tools/openmodelica/windows/MDD_build/led/MDD_led_blink.hex new file mode 100644 index 0000000..a896b22 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blink.hex @@ -0,0 +1,114 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C942A0142 +:100020000C9451000C9451000C9451000C94F90064 +:100030000C9451000C9451000C94C8000C94510085 +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0E4EFF6E002C0EA +:1000800005900D92A031B107D9F711E0A0E1B1E0E0 +:1000900001C01D92A531B107E1F70E9478010C94CF +:1000A00078030C940000CF92DF92EF92FF920F93AF +:1000B0001F93CF93DF93EC01C880D980EA80FB8047 +:1000C00020E030E040E05FE3C701B6010E94F102AA +:1000D0000E9449029B01AC010E94A8019B01AC0156 +:1000E000C701B6010E94A70101E010E020E030E066 +:1000F00040E85FE30E94ED0287FF02C000E010E0ED +:100100001D830C838E859F858230910561F083303D +:10011000910599F00197C9F416BC80916E00826038 +:1001200080936E0016C0109285001092840080911A +:100130006F00826080936F000CC01092B2008091BB +:10014000700082608093700004C081E090E00E94A3 +:10015000780378949FB7F894809112019FBF882309 +:10016000C9F310921201EA85FB858C819D81892B50 +:1001700019F08081806202C080818F7D8083DF9151 +:10018000CF911F910F91FF90EF90DF90CF90089546 +:100190001F920F920FB60F9211242F933F938F93BC +:1001A0009F938091100190911101019690931101FC +:1001B0008093100180911201813091F02091100103 +:1001C0003091110180911301909114012817390782 +:1001D00038F081E080931201109211011092100109 +:1001E0009F918F913F912F910F900FBE0F901F9075 +:1001F00018951F920F920FB60F9211242F933F93D1 +:100200008F939F938091100190911101019690938B +:1002100011018093100180911201813091F02091A1 +:100220001001309111018091130190911401281750 +:10023000390738F081E08093120110921101109279 +:1002400010019F918F913F912F910F900FBE0F90B2 +:100250001F9018951F920F920FB60F9211242F9393 +:100260003F938F939F93809110019091110101967C +:10027000909311018093100180911201813091F0CF +:10028000209110013091110180911301909114017E +:100290002817390738F081E080931201109211017C +:1002A000109210019F918F913F912F910F900FBE4F +:1002B0000F901F901895FC0185B5836085BD21E0E6 +:1002C00030E0358724878AE090E090931401809392 +:1002D000130184B5826084BD89EF87BD3787268787 +:1002E000259A85E290E09387828780E090E00895E8 +:1002F000CF92DF92EF92FF9280E091E00E945B014B +:10030000C12CD12C760160E070E0CB01609300013C +:1003100070930101809302019093030180E091E0CA +:100320000E9453008FEFC81AD80AE80AF80AC701DA +:10033000B6010E940C022FE632E143E05BE30E942B +:10034000F10220E030E0A9010E94A801DFCF50585F +:10035000BB27AA270ED0F0C0E1D030F0E6D020F0C5 +:1003600031F49F3F11F41EF4D6C00EF4E095E7FB84 +:10037000A3C0E92FF2D080F3BA176207730784078E +:10038000950718F071F49EF521C10EF4E0950B2E3F +:10039000BA2FA02D0B01B90190010C01CA01A001D7 +:1003A0001124FF27591B99F0593F50F4503E68F132 +:1003B0001A16F040A22F232F342F4427585FF3CF73 +:1003C000469537952795A795F0405395C9F77EF444 +:1003D0001F16BA0B620B730B840BBAF09150A1F08D +:1003E000FF0FBB1F661F771F881FC2F70EC0BA0F13 +:1003F000621F731F841F48F4879577956795B7959B +:10040000F7959E3F08F0B3CF9395880F08F0992792 +:10041000EE0F979587950895E89409C097FB3EF4F1 +:1004200090958095709561957F4F8F4F9F4F992341 +:10043000A9F0F92F96E9BB279395F69587957795BF +:100440006795B795F111F8CFFAF4BB0F11F460FF7F +:100450001BC06F5F7F4F8F4F9F4F16C0882311F0D7 +:1004600096E911C0772321F09EE8872F762F05C0EB +:10047000662371F096E8862F70E060E02AF09A9586 +:10048000660F771F881FDAF7880F9695879597F97B +:10049000089585D080F09F3740F491110EF097C0F9 +:1004A00060E070E080E89FEB089526F41B16611D64 +:1004B000711D811D07C021C097F99F6780E870E01A +:1004C00060E00895882371F4772321F09850872BFA +:1004D000762F07C0662311F499270DC09051862B03 +:1004E00070E060E02AF09A95660F771F881FDAF7B0 +:1004F000880F9695879597F908959F3F31F0915011 +:1005000020F4879577956795B795880F911D9695F7 +:10051000879597F908959FEF80EC089500240A9439 +:100520001616170618060906089500240A941216CE +:100530001306140605060895092E0394000C11F401 +:10054000882352F0BB0F40F4BF2B11F460FF04C0AE +:100550006F5F7F4F8F4F9F4F089557FD9058440F07 +:10056000551F59F05F3F71F04795880F97FB991F12 +:1005700061F09F3F79F087950895121613061406CF +:10058000551FF2CF4695F1DF08C01616170618065C +:10059000991FF1CF86957105610508940895E5DFEF +:1005A000A0F0BEE7B91788F4BB279F3860F4161691 +:1005B000B11D672F782F8827985FF7CF869577959D +:1005C0006795B11D93959639C8F30895E894BB27B4 +:1005D00066277727CB0197F9089566D008F48FEF47 +:1005E00008950BD0A9CF9ADF28F09FDF18F095234C +:1005F00009F062CF90CF1124EACFAFDFA0F3959F2F +:10060000D1F3950F50E0551F629FF001729FBB27F9 +:10061000F00DB11D639FAA27F00DB11DAA1F649FA5 +:100620006627B00DA11D661F829F2227B00DA11D58 +:10063000621F739FB00DA11D621F839FA00D611DDE +:10064000221F749F3327A00D611D231F849F600DFF +:10065000211D822F762F6A2F11249F5750408AF038 +:10066000E1F088234AF0EE0FFF1FBB1F661F771FC4 +:10067000881F91505040A9F79E3F510570F01CCF44 +:10068000A6CF5F3FECF3983EDCF3869577956795B0 +:10069000B795F795E7959F5FC1F7FE2B880F911DE2 +:1006A0009695879597F90895990F0008550FAA0B0D +:1006B000E0E8FEEF16161706E807F907C0F0121675 +:1006C0001306E407F50798F0621B730B840B950B78 +:1006D00039F40A2661F0232B242B252B21F40895CD +:1006E0000A2609F4A140A6958FEF811D811D08956A +:0406F000F894FFCFAC +:1006F4000000000000000AD7233C000000000000B6 +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blink_main.c b/tools/openmodelica/windows/MDD_build/led/MDD_led_blink_main.c new file mode 100644 index 0000000..cb41d72 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blink_main.c @@ -0,0 +1,253 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_led_blink_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_led_blink_fmi2Component_s { + fmi2Real currentTime; + fmi2Real fmi2RealVars[2]; + fmi2Boolean fmi2BooleanVars[3]; + fmi2Real fmi2RealParameter[2]; + fmi2Integer fmi2IntegerParameter[1]; + fmi2Boolean fmi2BooleanParameter[1]; + fmi2String fmi2StringParameter[1]; + void* extObjs[4]; +} MDD_led_blink_fmi2Component; + +MDD_led_blink_fmi2Component MDD_led_blink_component = { + .fmi2RealVars = { + 0.0 /*adc._y*/, + 0.0 /*realValue1._number*/, + }, + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + fmi2False /*booleanExpression2._y*/, + fmi2False /*digitalWriteBoolean1._u*/, + }, + .fmi2RealParameter = { + 550.0 /*greaterEqualThreshold1._threshold*/, + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, + .fmi2IntegerParameter = { + 2 /*realValue1._significantDigits*/, + }, + .fmi2BooleanParameter = { + fmi2True /*realValue1._use_numberPort*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +static const char * const OMCLIT0 = "ElectricPotential"; +static const char * const OMCLIT1 = "V"; +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" +#include "MDDAVRAnalog.h" + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution) +{ + fmi2Real om_value; + om_value = MDD_avr_analog_read(om_analogPort, om_vref, om_voltageResolution); + return om_value; +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage) +{ + void* om_avr; + om_avr = MDD_avr_analog_init(om_divisionFactor, om_referenceVoltage); + return om_avr; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr) +{ + MDD_avr_analog_close(om_avr); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_led_blink_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_led_blink_component; +} + +fmi2Status MDD_led_blink_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_led_blink_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 4, 4); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + comp->extObjs[0] /* adc._analog EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Analog.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(comp, 7, 4); + return fmi2OK; +} + +fmi2Status MDD_led_blink_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_led_blink_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_led_blink_functionOutputs(fmi2Component comp) +{ + comp->fmi2RealVars[0] /* adc._y variable */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(comp, 5, 1024.0, 10); /* equation 7 */ + comp->fmi2BooleanVars[2] /* digitalWriteBoolean1._u DISCRETE */ = (comp->fmi2RealVars[0] /* adc._y variable */)>=(comp->fmi2RealParameter[0] /* greaterEqualThreshold1._threshold PARAM */); /* equation 8 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 4, comp->fmi2BooleanVars[2] /* digitalWriteBoolean1._u DISCRETE */); +} + +fmi2Status MDD_led_blink_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_led_blink_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_led_blink_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_led_blink_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_led_blink_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_led_blink_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_led_blink_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blue b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue Binary files differnew file mode 100644 index 0000000..75f1105 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blue.hex b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue.hex new file mode 100644 index 0000000..46afcd9 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue.hex @@ -0,0 +1,91 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C94E50088 +:100020000C9451000C9451000C9451000C94B400A9 +:100030000C9451000C9451000C9483000C945100CA +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0E6E8F5E002C0F0 +:1000800005900D92A031B107D9F711E0A0E1B1E0E0 +:1000900001C01D92A531B107E1F70E9433010C9414 +:1000A000C1020C9400008230910561F0833091050B +:1000B00099F00197C9F416BC80916E00826080931C +:1000C0006E0016C0109285001092840080916F001F +:1000D000826080936F000CC01092B200809170001B +:1000E00082608093700004C081E090E00E94C102B1 +:1000F00078949FB7F894809112019FBF8823C9F329 +:100100001092120108951F920F920FB60F921124B0 +:100110002F933F938F939F938091100190911101A2 +:10012000019690931101809310018091120181300A +:1001300091F0209110013091110180911301909163 +:1001400014012817390738F081E0809312011092CA +:100150001101109210019F918F913F912F910F905B +:100160000FBE0F901F9018951F920F920FB60F920F +:1001700011242F933F938F939F938091100190911F +:100180001101019690931101809310018091120149 +:10019000813091F020911001309111018091130173 +:1001A000909114012817390738F081E080931201EB +:1001B00010921101109210019F918F913F912F91F8 +:1001C0000F900FBE0F901F9018951F920F920FB6B1 +:1001D0000F9211242F933F938F939F93809110013F +:1001E00090911101019690931101809310018091DB +:1001F0001201813091F02091100130911101809114 +:100200001301909114012817390738F081E0809389 +:10021000120110921101109210019F918F913F9144 +:100220002F910F900FBE0F901F901895FC01219AEF +:1002300085E290E09387828785B5836085BD21E064 +:1002400030E03587248785E090E090931401809317 +:10025000130184B5826084BD89EF87BD3787268707 +:1002600080E090E00895CF92DF92EF92FF9280E0DD +:1002700091E00E941601C12CD12C760160E070E063 +:10028000CB01609300017093010180930201909370 +:10029000030180910E0190910F010E945300E091A3 +:1002A0000A01F0910B018081826080838FEFC81A70 +:1002B000D80AE80AF80AC701B6010E94D0012FE661 +:1002C00032E143E05BE30E945E0220E030E0A901FE +:1002D0000E946C01D6CF5058BB27AA270ED0B4C0BD +:1002E000A5D030F0AAD020F031F49F3F11F41EF4D5 +:1002F0009AC00EF4E095E7FB90C0E92FB6D080F3EA +:10030000BA17620773078407950718F071F49EF512 +:10031000CEC00EF4E0950B2EBA2FA02D0B01B90123 +:1003200090010C01CA01A0011124FF27591B99F06B +:10033000593F50F4503E68F11A16F040A22F232F77 +:10034000342F4427585FF3CF469537952795A795C7 +:10035000F0405395C9F77EF41F16BA0B620B730B6E +:10036000840BBAF09150A1F0FF0FBB1F661F771FDF +:10037000881FC2F70EC0BA0F621F731F841F48F494 +:10038000879577956795B795F7959E3F08F0B3CF1A +:100390009395880F08F09927EE0F97958795089504 +:1003A000E89409C097FB3EF490958095709561950F +:1003B0007F4F8F4F9F4F9923A9F0F92F96E9BB27C5 +:1003C0009395F695879577956795B795F111F8CF41 +:1003D000FAF4BB0F11F460FF1BC06F5F7F4F8F4FAC +:1003E0009F4F16C0882311F096E911C0772321F0A2 +:1003F0009EE8872F762F05C0662371F096E8862F3A +:1004000070E060E02AF09A95660F771F881FDAF790 +:10041000880F9695879597F9089597F99F6780E8D3 +:1004200070E060E008959FEF80EC089500240A9446 +:100430001616170618060906089500240A941216BF +:100440001306140605060895092E0394000C11F4F2 +:10045000882352F0BB0F40F4BF2B11F460FF04C09F +:100460006F5F7F4F8F4F9F4F089557FD9058440FF8 +:10047000551F59F05F3F71F04795880F97FB991F03 +:1004800061F09F3F79F087950895121613061406C0 +:10049000551FF2CF4695F1DF08C01616170618064D +:1004A000991FF1CF86957105610508940895E89428 +:1004B000BB2766277727CB0197F908950BD0C4CFC8 +:1004C000B5DF28F0BADF18F0952309F0A6CFABCF3F +:1004D0001124EECFCADFA0F3959FD1F3950F50E022 +:1004E000551F629FF001729FBB27F00DB11D639FE6 +:1004F000AA27F00DB11DAA1F649F6627B00DA11D8C +:10050000661F829F2227B00DA11D621F739FB00D31 +:10051000A11D621F839FA00D611D221F749F3327A1 +:10052000A00D611D231F849F600D211D822F762F3A +:100530006A2F11249F5750408AF0E1F088234AF037 +:10054000EE0FFF1FBB1F661F771F881F9150504083 +:10055000A9F79E3F510570F060CFAACF5F3FECF343 +:10056000983EDCF3869577956795B795F795E7956F +:100570009F5FC1F7FE2B880F911D9695879597F980 +:060580000895F894FFCF7E +:100586000000000000000AD7233C00000000000025 +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay Binary files differnew file mode 100644 index 0000000..9d821fe --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay.hex b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay.hex new file mode 100644 index 0000000..f120f88 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay.hex @@ -0,0 +1,100 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C940E015E +:100020000C9451000C9451000C9451000C94DD0080 +:100030000C9451000C9451000C94AC000C945100A1 +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0E6E1F6E002C0F6 +:1000800005900D92A031B107D9F711E0A0E1B1E0E0 +:1000900001C01D92A531B107E1F70E945C010C94EB +:1000A00009030C9400000F931F93CF93DF93EC018F +:1000B00001E010E020E030E040E85FE36881798112 +:1000C0008A819B810E94F00187FD02C000E010E060 +:1000D0001D830C838E859F858230910561F083306E +:1000E000910599F00197C9F416BC80916E00826069 +:1000F00080936E0016C0109285001092840080914B +:100100006F00826080936F000CC01092B2008091EB +:10011000700082608093700004C081E090E00E94D3 +:10012000090378949FB7F894809112019FBF8823A8 +:10013000C9F310921201EA85FB858C819D81892B80 +:1001400019F08081826002C080818D7F8083DF9181 +:10015000CF911F910F9108951F920F920FB60F929A +:1001600011242F933F938F939F938091100190912F +:100170001101019690931101809310018091120159 +:10018000813091F020911001309111018091130183 +:10019000909114012817390738F081E080931201FB +:1001A00010921101109210019F918F913F912F9108 +:1001B0000F900FBE0F901F9018951F920F920FB6C1 +:1001C0000F9211242F933F938F939F93809110014F +:1001D00090911101019690931101809310018091EB +:1001E0001201813091F02091100130911101809124 +:1001F0001301909114012817390738F081E080939A +:10020000120110921101109210019F918F913F9154 +:100210002F910F900FBE0F901F9018951F920F9265 +:100220000FB60F9211242F933F938F939F9380913A +:10023000100190911101019690931101809310018A +:1002400080911201813091F02091100130911101C3 +:1002500080911301909114012817390738F081E03B +:100260008093120110921101109210019F918F91B1 +:100270003F912F910F900FBE0F901F901895FC018A +:10028000219A85E290E09387828785B5836085BD5A +:1002900021E030E0358724878AE090E090931401D4 +:1002A0008093130184B5826084BD89EF87BD378751 +:1002B000268780E090E00895CF92DF92EF92FF9240 +:1002C00080E091E00E943F01C12CD12C760160E0DA +:1002D00070E0CB01609300017093010180930201F3 +:1002E0009093030180E091E00E9453008FEFC81AC1 +:1002F000D80AE80AF80AC701B6010E94F4012FE6FD +:1003000032E143E05BE30E94A60220E030E0A90175 +:100310000E948C01DFCF5058BB27AA270ED0DCC02B +:10032000CDD030F0D2D020F031F49F3F11F41EF444 +:10033000C2C00EF4E095E7FBB8C0E92FDED080F331 +:10034000BA17620773078407950718F071F49EF5D2 +:10035000F6C00EF4E0950B2EBA2FA02D0B01B901BB +:1003600090010C01CA01A0011124FF27591B99F02B +:10037000593F50F4503E68F11A16F040A22F232F37 +:10038000342F4427585FF3CF469537952795A79587 +:10039000F0405395C9F77EF41F16BA0B620B730B2E +:1003A000840BBAF09150A1F0FF0FBB1F661F771F9F +:1003B000881FC2F70EC0BA0F621F731F841F48F454 +:1003C000879577956795B795F7959E3F08F0B3CFDA +:1003D0009395880F08F09927EE0F979587950895C4 +:1003E00040D008F481E00895E89409C097FB3EF4FA +:1003F00090958095709561957F4F8F4F9F4F992372 +:10040000A9F0F92F96E9BB279395F69587957795EF +:100410006795B795F111F8CFFAF4BB0F11F460FFAF +:100420001BC06F5F7F4F8F4F9F4F16C0882311F007 +:1004300096E911C0772321F09EE8872F762F05C01B +:10044000662371F096E8862F70E060E02AF09A95B6 +:10045000660F771F881FDAF7880F9695879597F9AB +:100460000895990F0008550FAA0BE0E8FEEF161645 +:100470001706E807F907C0F012161306E407F50798 +:1004800098F0621B730B840B950B39F40A2661F00C +:10049000232B242B252B21F408950A2609F4A140AF +:1004A000A6958FEF811D811D089597F99F6780E8BC +:1004B00070E060E008959FEF80EC089500240A94B6 +:1004C0001616170618060906089500240A9412162F +:1004D0001306140605060895092E0394000C11F462 +:1004E000882352F0BB0F40F4BF2B11F460FF04C00F +:1004F0006F5F7F4F8F4F9F4F089557FD9058440F68 +:10050000551F59F05F3F71F04795880F97FB991F72 +:1005100061F09F3F79F0879508951216130614062F +:10052000551FF2CF4695F1DF08C0161617061806BC +:10053000991FF1CF86957105610508940895E89497 +:10054000BB2766277727CB0197F908950BD0C4CF37 +:10055000B5DF28F0BADF18F0952309F0A6CFABCFAE +:100560001124EECFCADFA0F3959FD1F3950F50E091 +:10057000551F629FF001729FBB27F00DB11D639F55 +:10058000AA27F00DB11DAA1F649F6627B00DA11DFB +:10059000661F829F2227B00DA11D621F739FB00DA1 +:1005A000A11D621F839FA00D611D221F749F332711 +:1005B000A00D611D231F849F600D211D822F762FAA +:1005C0006A2F11249F5750408AF0E1F088234AF0A7 +:1005D000EE0FFF1FBB1F661F771F881F91505040F3 +:1005E000A9F79E3F510570F060CFAACF5F3FECF3B3 +:1005F000983EDCF3869577956795B795F795E795DF +:100600009F5FC1F7FE2B880F911D9695879597F9EF +:060610000895F894FFCFED +:100616000000000001000AD7233C00000000000093 +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay_main.c b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay_main.c new file mode 100644 index 0000000..e369c99 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_delay_main.c @@ -0,0 +1,212 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_led_blue_delay_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_led_blue_delay_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[3]; +} MDD_led_blue_delay_fmi2Component; + +MDD_led_blue_delay_fmi2Component MDD_led_blue_delay_component = { + .fmi2BooleanVars = { + fmi2True /*booleanExpression1._y*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_led_blue_delay_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_led_blue_delay_component; +} + +fmi2Status MDD_led_blue_delay_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_led_blue_delay_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + return fmi2OK; +} + +fmi2Status MDD_led_blue_delay_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_led_blue_delay_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_led_blue_delay_functionOutputs(fmi2Component comp) +{ + comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */ = (comp->currentTime)<(1.0); /* equation 3 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */); +} + +fmi2Status MDD_led_blue_delay_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_led_blue_delay_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_led_blue_delay_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_led_blue_delay_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_led_blue_delay_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_led_blue_delay_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_led_blue_delay_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_main.c b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_main.c new file mode 100644 index 0000000..19d0a0f --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_main.c @@ -0,0 +1,212 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_led_blue_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_led_blue_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[3]; +} MDD_led_blue_fmi2Component; + +MDD_led_blue_fmi2Component MDD_led_blue_component = { + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_led_blue_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_led_blue_component; +} + +fmi2Status MDD_led_blue_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_led_blue_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 5); + return fmi2OK; +} + +fmi2Status MDD_led_blue_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_led_blue_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_led_blue_functionOutputs(fmi2Component comp) +{ + Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, fmi2True); +} + +fmi2Status MDD_led_blue_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_led_blue_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_led_blue_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_led_blue_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_led_blue_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_led_blue_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_led_blue_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red Binary files differnew file mode 100644 index 0000000..06777b5 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red.hex b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red.hex new file mode 100644 index 0000000..37cdb21 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red.hex @@ -0,0 +1,106 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C94340138 +:100020000C9451000C9451000C9451000C94030159 +:100030000C9451000C9451000C94D2000C9451007B +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0E8E6F6E002C0EF +:1000800005900D92A431B107D9F711E0A4E1B1E0D8 +:1000900001C01D92A931B107E1F70E9485010C94BE +:1000A00032030C940000CF92DF92EF92FF920F93F5 +:1000B0001F93CF93DF93EC01C880D980EA80FB8047 +:1000C00001E010E020E030E040E85FE3C701B60166 +:1000D0000E94190287FD02C000E010E01D830C831E +:1000E00001E010E02DEC3CEC4CEC5FE3C701B60105 +:1000F0000E94190287FD02C000E010E01F830E83FA +:100100008A899B898230910561F08330910599F04D +:100110000197C9F416BC80916E00826080936E00D6 +:1001200016C0109285001092840080916F0082604A +:1001300080936F000CC01092B200809170008260BA +:100140008093700004C081E090E00E9432037894B4 +:100150009FB7F894809116019FBF8823C9F310922E +:100160001601EC85FD858C819D81892B19F080819C +:10017000826002C080818D7F8083EE85FF858E81C5 +:100180009F81892B19F08081886002C08081877FE0 +:100190008083DF91CF911F910F91FF90EF90DF90BF +:1001A000CF9008951F920F920FB60F9211242F93A4 +:1001B0003F938F939F938091140190911501019625 +:1001C000909315018093140180911601813091F074 +:1001D000209114013091150180911701909118011F +:1001E0002817390738F081E0809316011092150125 +:1001F000109214019F918F913F912F910F900FBEFC +:100200000F901F9018951F920F920FB60F92112406 +:100210002F933F938F939F93809114019091150199 +:1002200001969093150180931401809116018130FD +:1002300091F0209114013091150180911701909156 +:1002400018012817390738F081E0809316011092C1 +:100250001501109214019F918F913F912F910F9052 +:100260000FBE0F901F9018951F920F920FB60F920E +:1002700011242F933F938F939F938091140190911A +:100280001501019690931501809314018091160138 +:10029000813091F020911401309115018091170166 +:1002A000909118012817390738F081E080931601E2 +:1002B00010921501109214019F918F913F912F91EF +:1002C0000F900FBE0F901F901895FC01239A25E206 +:1002D00030E03787268785B5836085BD41E050E0F3 +:1002E000518B408B8AE090E0909318018093170126 +:1002F00084B5826084BD89EF87BD538B428B219A80 +:100300003587248780E090E00895CF92DF92EF92C6 +:10031000FF9280E091E00E946501C12CD12C760112 +:1003200060E070E0CB016093000170930101809365 +:1003300002019093030180E091E00E9453008FEF4F +:10034000C81AD80AE80AF80AC701B6010E941D02B5 +:100350002FE632E143E05BE30E94CF0220E030E091 +:10036000A9010E94B501DFCF5058BB27AA270ED0A4 +:10037000DCC0CDD030F0D2D020F031F49F3F11F46A +:100380001EF4C2C00EF4E095E7FBB8C0E92FDED042 +:1003900080F3BA17620773078407950718F071F4A2 +:1003A0009EF5F6C00EF4E0950B2EBA2FA02D0B0192 +:1003B000B90190010C01CA01A0011124FF27591BAA +:1003C00099F0593F50F4503E68F11A16F040A22FB0 +:1003D000232F342F4427585FF3CF46953795279521 +:1003E000A795F0405395C9F77EF41F16BA0B620B20 +:1003F000730B840BBAF09150A1F0FF0FBB1F661F67 +:10040000771F881FC2F70EC0BA0F621F731F841FA9 +:1004100048F4879577956795B795F7959E3F08F0CF +:10042000B3CF9395880F08F09927EE0F979587958E +:10043000089540D008F481E00895E89409C097FB3E +:100440003EF490958095709561957F4F8F4F9F4FAB +:100450009923A9F0F92F96E9BB279395F6958795EF +:1004600077956795B795F111F8CFFAF4BB0F11F4B2 +:1004700060FF1BC06F5F7F4F8F4F9F4F16C0882359 +:1004800011F096E911C0772321F09EE8872F762F8F +:1004900005C0662371F096E8862F70E060E02AF0D0 +:1004A0009A95660F771F881FDAF7880F96958795BC +:1004B00097F90895990F0008550FAA0BE0E8FEEF91 +:1004C00016161706E807F907C0F012161306E40718 +:1004D000F50798F0621B730B840B950B39F40A2611 +:1004E00061F0232B242B252B21F408950A2609F4EF +:1004F000A140A6958FEF811D811D089597F99F67F3 +:1005000080E870E060E008959FEF80EC089500249B +:100510000A941616170618060906089500240A9468 +:1005200012161306140605060895092E0394000CEE +:1005300011F4882352F0BB0F40F4BF2B11F460FF7D +:1005400004C06F5F7F4F8F4F9F4F089557FD9058A6 +:10055000440F551F59F05F3F71F04795880F97FB87 +:10056000991F61F09F3F79F0879508951216130641 +:100570001406551FF2CF4695F1DF08C01616170670 +:100580001806991FF1CF86957105610508940895A5 +:10059000E894BB2766277727CB0197F908950BD0FE +:1005A000C4CFB5DF28F0BADF18F0952309F0A6CF45 +:1005B000ABCF1124EECFCADFA0F3959FD1F3950FF7 +:1005C00050E0551F629FF001729FBB27F00DB11DD7 +:1005D000639FAA27F00DB11DAA1F649F6627B00D67 +:1005E000A11D661F829F2227B00DA11D621F739F50 +:1005F000B00DA11D621F839FA00D611D221F749F5E +:100600003327A00D611D231F849F600D211D822FA4 +:10061000762F6A2F11249F5750408AF0E1F08823EB +:100620004AF0EE0FFF1FBB1F661F771F881F9150F8 +:100630005040A9F79E3F510570F060CFAACF5F3FB1 +:10064000ECF3983EDCF3869577956795B795F7952B +:10065000E7959F5FC1F7FE2B880F911D96958795B3 +:0806600097F90895F894FFCF0B +:1006680000000000010001000AD7233C0000000040 +:04067800000000007E +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red_main.c b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red_main.c new file mode 100644 index 0000000..8118bcc --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_blue_red_main.c @@ -0,0 +1,215 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_led_blue_red_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_led_blue_red_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[2]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[4]; +} MDD_led_blue_red_fmi2Component; + +MDD_led_blue_red_fmi2Component MDD_led_blue_red_component = { + .fmi2BooleanVars = { + fmi2True /*booleanExpression1._y*/, + fmi2True /*booleanExpression2._y*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_led_blue_red_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_led_blue_red_component; +} + +fmi2Status MDD_led_blue_red_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_led_blue_red_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[1] /* digitalWriteBoolean2._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 4); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + return fmi2OK; +} + +fmi2Status MDD_led_blue_red_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_led_blue_red_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_led_blue_red_functionOutputs(fmi2Component comp) +{ + comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */ = (comp->currentTime)<(1.0); /* equation 4 */ + comp->fmi2BooleanVars[1] /* booleanExpression2._y DISCRETE */ = (comp->currentTime)<(1.6); /* equation 5 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean2._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 4, comp->fmi2BooleanVars[1] /* booleanExpression2._y DISCRETE */); +} + +fmi2Status MDD_led_blue_red_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_led_blue_red_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_led_blue_red_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_led_blue_red_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_led_blue_red_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_led_blue_red_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_led_blue_red_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_green_bink b/tools/openmodelica/windows/MDD_build/led/MDD_led_green_bink Binary files differnew file mode 100644 index 0000000..d4a1f15 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_green_bink diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink b/tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink Binary files differnew file mode 100644 index 0000000..d4a1f15 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink.hex b/tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink.hex new file mode 100644 index 0000000..30ec824 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink.hex @@ -0,0 +1,127 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C942C0140 +:100020000C9451000C9451000C9451000C94FB0062 +:100030000C9451000C9451000C94CA000C94510083 +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0E8ECF7E002C0E8 +:1000800005900D92A031B107D9F711E0A0E1B1E0E0 +:1000900001C01D92A531B107E1F70E947A010C94CD +:1000A000E2030C940000CF92DF92EF92FF920F9345 +:1000B0001F93CF93DF93EC01C880D980EA80FB8047 +:1000C0002DEC3CEC4CEC5EE3C701B6010E940E0245 +:1000D0000E94B3022DEC3CEC4CEC5EE30E945B030F +:1000E0009B01AC01C701B6010E94A90101E010E02B +:1000F0002DEC3CEC4CE45EE30E94570387FF02C00A +:1001000000E010E01D830C838E859F858230910571 +:1001100061F08330910599F00197C9F416BC809184 +:100120006E00826080936E0016C01092850010925F +:10013000840080916F00826080936F000CC01092E9 +:10014000B2008091700082608093700004C081E0F2 +:1001500090E00E94E20378949FB7F8948091120196 +:100160009FBF8823C9F310921201EA85FB858C8119 +:100170009D81892B19F08081846002C080818B7FF2 +:100180008083DF91CF911F910F91FF90EF90DF90CF +:10019000CF9008951F920F920FB60F9211242F93B4 +:1001A0003F938F939F93809110019091110101963D +:1001B000909311018093100180911201813091F090 +:1001C000209110013091110180911301909114013F +:1001D0002817390738F081E080931201109211013D +:1001E000109210019F918F913F912F910F900FBE10 +:1001F0000F901F9018951F920F920FB60F92112417 +:100200002F933F938F939F938091100190911101B1 +:100210000196909311018093100180911201813019 +:1002200091F0209110013091110180911301909172 +:1002300014012817390738F081E0809312011092D9 +:100240001101109210019F918F913F912F910F906A +:100250000FBE0F901F9018951F920F920FB60F921E +:1002600011242F933F938F939F938091100190912E +:100270001101019690931101809310018091120158 +:10028000813091F020911001309111018091130182 +:10029000909114012817390738F081E080931201FA +:1002A00010921101109210019F918F913F912F9107 +:1002B0000F900FBE0F901F901895FC0185B58360BD +:1002C00085BD21E030E0358724878AE090E0909377 +:1002D00014018093130184B5826084BD89EF87BDCA +:1002E00037872687229A85E290E09387828780E08D +:1002F00090E00895CF92DF92EF92FF9280E091E03C +:100300000E945D01C12CD12C760160E070E0CB0130 +:1003100060930001709301018093020190930301A7 +:1003200080E091E00E9453008FEFC81AD80AE80AD3 +:10033000F80AC701B6010E9476022FE632E143E0D7 +:100340005BE30E945B0320E030E0A9010E94AA0168 +:10035000DFCF5058BB27AA270ED058C149D130F063 +:100360004ED120F031F49F3F11F41EF43EC10EF443 +:10037000E095E7FB0BC1E92F5AD180F3BA1762076A +:1003800073078407950718F071F49EF589C10EF480 +:10039000E0950B2EBA2FA02D0B01B90190010C0195 +:1003A000CA01A0011124FF27591B99F0593F50F4AD +:1003B000503E68F11A16F040A22F232F342F442705 +:1003C000585FF3CF469537952795A795F0405395FD +:1003D000C9F77EF41F16BA0B620B730B840BBAF0CD +:1003E0009150A1F0FF0FBB1F661F771F881FC2F738 +:1003F0000EC0BA0F621F731F841F48F4879577954C +:100400006795B795F7959E3F08F0B3CF9395880F02 +:1004100008F09927EE0F9795879508950CD0F6C0B0 +:10042000EED040F0E5D030F021F45F3F19F0AEC0DF +:10043000511137C1DAC0FBD098F39923C9F3552382 +:10044000B1F3951B550BBB27AA27621773078407C7 +:1004500038F09F5F5F4F220F331F441FAA1FA9F37D +:1004600033D00E2E3AF0E0E830D091505040E6956F +:10047000001CCAF729D0FE2F27D0660F771F881FD0 +:10048000BB1F261737074807AB07B0E809F0BB0BBF +:10049000802DBF01FF2793585F4F2AF09E3F5105E3 +:1004A00068F074C0FEC05F3FECF3983EDCF38695C5 +:1004B00077956795B795F7959F5FC9F7880F911D59 +:1004C0009695879597F90895E1E0660F771F881F45 +:1004D000BB1F621773078407BA0720F0621B730BF8 +:1004E000840BBA0BEE1F88F7E0950895E89409C0D5 +:1004F00097FB3EF490958095709561957F4F8F4F57 +:100500009F4F9923A9F0F92F96E9BB279395F6956C +:10051000879577956795B795F111F8CFFAF4BB0FEA +:1005200011F460FF1BC06F5F7F4F8F4F9F4F16C04E +:10053000882311F096E911C0772321F09EE8872FD8 +:10054000762F05C0662371F096E8862F70E060E094 +:100550002AF09A95660F771F881FDAF7880F96950D +:10056000879597F9089585D080F09F3740F49111D1 +:100570000EF097C060E070E080E89FEB089526F4ED +:100580001B16611D711D811D07C021C097F99F6752 +:1005900080E870E060E00895882371F4772321F00B +:1005A0009850872B762F07C0662311F499270DC02A +:1005B0009051862B70E060E02AF09A95660F771FC5 +:1005C000881FDAF7880F9695879597F908959F3FCA +:1005D00031F0915020F4879577956795B795880FFE +:1005E000911D9695879597F908959FEF80EC089552 +:1005F00000240A9416161706180609060895002402 +:100600000A9412161306140605060895092E03947B +:10061000000C11F4882352F0BB0F40F4BF2B11F4EF +:1006200060FF04C06F5F7F4F8F4F9F4F089557FD4E +:100630009058440F551F59F05F3F71F04795880F50 +:1006400097FB991F61F09F3F79F0879508951216E7 +:1006500013061406551FF2CF4695F1DF08C0161693 +:1006600017061806991FF1CF869571056105089444 +:100670000895E5DFA0F0BEE7B91788F4BB279F38DF +:1006800060F41616B11D672F782F8827985FF7CF73 +:10069000869577956795B11D93959639C8F308951A +:1006A000E894BB2766277727CB0197F9089566D092 +:1006B00008F48FEF08950BD0A9CF9ADF28F09FDFC1 +:1006C00018F0952309F062CF90CF1124EACFAFDF65 +:1006D000A0F3959FD1F3950F50E0551F629FF00155 +:1006E000729FBB27F00DB11D639FAA27F00DB11DAE +:1006F000AA1F649F6627B00DA11D661F829F222737 +:10070000B00DA11D621F739FB00DA11D621F839FBD +:10071000A00D611D221F749F3327A00D611D231F93 +:10072000849F600D211D822F762F6A2F11249F57E1 +:1007300050408AF0E1F088234AF0EE0FFF1FBB1F04 +:10074000661F771F881F91505040A9F79E3F5105A3 +:1007500070F01CCFA6CF5F3FECF3983EDCF386959C +:1007600077956795B795F795E7959F5FC1F7FE2B4E +:10077000880F911D9695879597F90895990F000810 +:10078000550FAA0BE0E8FEEF16161706E807F90763 +:10079000C0F012161306E407F50798F0621B730BFE +:1007A000840B950B39F40A2661F0232B242B252B7F +:1007B00021F408950A2609F4A140A6958FEF811D22 +:0807C000811D0895F894FFCF9C +:1007C8000000000000000AD7233C000000000000E1 +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink_main.c b/tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink_main.c new file mode 100644 index 0000000..e01a62c --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/MDD_led_green_blink_main.c @@ -0,0 +1,212 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_led_green_blink_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_led_green_blink_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[1]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[3]; +} MDD_led_green_blink_fmi2Component; + +MDD_led_green_blink_fmi2Component MDD_led_green_blink_component = { + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_led_green_blink_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_led_green_blink_component; +} + +fmi2Status MDD_led_green_blink_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_led_green_blink_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[1] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 3); + return fmi2OK; +} + +fmi2Status MDD_led_green_blink_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_led_green_blink_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_led_green_blink_functionOutputs(fmi2Component comp) +{ + comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */ = (om_mod(comp->currentTime,0.4))>=(0.2); /* equation 3 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[2] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[0] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 3, comp->fmi2BooleanVars[0] /* booleanExpression1._y DISCRETE */); +} + +fmi2Status MDD_led_green_blink_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_led_green_blink_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_led_green_blink_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_led_green_blink_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_led_green_blink_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_led_green_blink_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_led_green_blink_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/led/run_led_blink.mos b/tools/openmodelica/windows/MDD_build/led/run_led_blink.mos new file mode 100644 index 0000000..35a7bde --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/run_led_blink.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_blink, fileNamePrefix="MDD_led_blink"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/led/run_led_blue.mos b/tools/openmodelica/windows/MDD_build/led/run_led_blue.mos new file mode 100644 index 0000000..7ba6686 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/run_led_blue.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_blue, fileNamePrefix="MDD_led_blue"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/led/run_led_blue_delay.mos b/tools/openmodelica/windows/MDD_build/led/run_led_blue_delay.mos new file mode 100644 index 0000000..f5e8f16 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/run_led_blue_delay.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_blue_delay, fileNamePrefix="MDD_led_blue_delay"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/led/run_led_blue_red.mos b/tools/openmodelica/windows/MDD_build/led/run_led_blue_red.mos new file mode 100644 index 0000000..9e1c130 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/run_led_blue_red.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_blue_red, fileNamePrefix="MDD_led_blue_red"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/led/run_led_green_blink.mos b/tools/openmodelica/windows/MDD_build/led/run_led_green_blink.mos new file mode 100644 index 0000000..dc3fad8 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/led/run_led_green_blink.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_led.MDD_led_green_blink, fileNamePrefix="MDD_led_green_blink"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold b/tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold Binary files differnew file mode 100644 index 0000000..a272504 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold diff --git a/tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold.hex b/tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold.hex new file mode 100644 index 0000000..70434e9 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold.hex @@ -0,0 +1,147 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C94E30189 +:100020000C9451000C9451000C9451000C94B201AA +:100030000C9451000C9451000C9481010C945100CB +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0E2ECF8E002C0ED +:1000800005900D92A834B107D9F711E0A8E4B1E0CA +:1000900001C01D92AD34B107E1F70E944A020C94F1 +:1000A0005F040C9400004F925F926F927F928F9248 +:1000B0009F92AF92BF92CF92DF92EF92FF920F93F7 +:1000C0001F93CF93DF93EC0180917C00857E82604B +:1000D00080937C0080917A00806480937A00809184 +:1000E0007A0086FDFCCF609178007091790080E005 +:1000F00090E00E94460320E030E040E854E40E9493 +:10010000D80320E030EC4FE754E40E94DE026B019C +:100110007C016C837D838E839F8311E028A939A99C +:100120004AA95BA90E94D40387FD10E0812F90E0CB +:100130009FA38EA3111104C0812C912C540106C0E1 +:10014000812C912C90E8A92E9FE3B92E8C869D8658 +:10015000AE86BF8601E010E02CA93DA94EA95FA99B +:10016000C501B4010E94D40387FF02C000E010E083 +:1001700019A308A311E02CA53DA54EA55FA5C701B5 +:10018000B6010E94D40387FD10E0812F90E09DA36B +:100190008CA3111104C0412C512C320106C0412CFA +:1001A000512C80E8682E8FE3782E488659866A861F +:1001B0007B8601E010E0A5019401C301B2010E9419 +:1001C000D403181614F000E010E01F8F0E8F11E01A +:1001D00028A539A54AA55BA5C701B6010E94D4038D +:1001E00087FD10E0812F90E09BA38AA3111104C02A +:1001F00060E070E0CB0104C060E070E080E89FE365 +:10020000688B798B8A8B9B8B01E010E0A3019201B4 +:100210000E94D403181614F000E010E01D8F0C8F1C +:10022000FE01EA5BFF4F808191818230910561F090 +:100230008330910599F00197C9F416BC80916E0046 +:10024000826080936E0016C0109285001092840028 +:1002500080916F00826080936F000CC01092B2009A +:100260008091700082608093700004C081E090E013 +:100270000E945F0478949FB7F89480914A019FBFD1 +:100280008823C9F310924A01EEADFFAD8C8D9D8D90 +:10029000892B19F08081826002C080818D7F8083EC +:1002A000FE01E05CFF4F0190F081E02D8E8D9F8D6F +:1002B000892B19F08081846002C080818B7F8083CC +:1002C000FE01EE5BFF4F0190F081E02D88A199A126 +:1002D000892B19F08081886002C08081877F8083AC +:1002E000DF91CF911F910F91FF90EF90DF90CF9012 +:1002F000BF90AF909F908F907F906F905F904F9046 +:1003000008951F920F920FB60F9211242F933F93CF +:100310008F939F938091480190914901019690930A +:1003200049018093480180914A01813091F02091E8 +:1003300048013091490180914B0190914C0128175F +:10034000390738F081E080934A01109249011092F8 +:1003500048019F918F913F912F910F900FBE0F9069 +:100360001F9018951F920F920FB60F9211242F9382 +:100370003F938F939F9380914801909149010196FB +:10038000909349018093480180914A01813091F016 +:10039000209148013091490180914B0190914C018D +:1003A0002817390738F081E080934A0110924901FB +:1003B000109248019F918F913F912F910F900FBE06 +:1003C0000F901F9018951F920F920FB60F92112445 +:1003D0002F933F938F939F93809148019091490170 +:1003E0000196909349018093480180914A018130A0 +:1003F00091F0209148013091490180914B019091F9 +:100400004C012817390738F081E080934A01109297 +:100410004901109248019F918F913F912F910F9028 +:100420000FBE0F901F901895ECE7F0E02081206C34 +:100430002083EAE7F0E0208127682083FC0115AEE5 +:1004400014AE239AEE5BFF4F25E230E03183208328 +:10045000229A329731832083219AFC0137AF26AF4D +:1004600025B5236025BDEC5BFF4F41E050E0518393 +:1004700040832AE030E030934C0120934B0124B5B7 +:10048000226024BD29EF27BD32965183408380E04E +:1004900090E00895CF92DF92EF92FF9280E091E09A +:1004A0000E941402C12CD12C760160E070E0CB01D7 +:1004B0006093000170930101809302019093030106 +:1004C00080E091E00E9453008FEFC81AD80AE80A32 +:1004D000F80AC701B6010E9446032FE632E143E065 +:1004E0005BE30E94D80320E030E0A9010E947A0279 +:1004F000DFCF5058BB27AA270ED01CC10DD130F03A +:1005000012D120F031F49F3F11F41EF402C10EF419 +:10051000E095E7FBF8C0E92F1ED180F3BA17620718 +:1005200073078407950718F071F49EF536C10EF431 +:10053000E0950B2EBA2FA02D0B01B90190010C01F3 +:10054000CA01A0011124FF27591B99F0593F50F40B +:10055000503E68F11A16F040A22F232F342F442763 +:10056000585FF3CF469537952795A795F04053955B +:10057000C9F77EF41F16BA0B620B730B840BBAF02B +:100580009150A1F0FF0FBB1F661F771F881FC2F796 +:100590000EC0BA0F621F731F841F48F487957795AA +:1005A0006795B795F7959E3F08F0B3CF9395880F61 +:1005B00008F09927EE0F9795879508950CD0BAC04B +:1005C000B2D040F0A9D030F021F45F3F19F09BC0C9 +:1005D0005111E4C09EC0BFD098F39923C9F35523AD +:1005E000B1F3951B550BBB27AA2762177307840726 +:1005F00038F09F5F5F4F220F331F441FAA1FA9F3DC +:1006000033D00E2E3AF0E0E830D091505040E695CD +:10061000001CCAF729D0FE2F27D0660F771F881F2E +:10062000BB1F261737074807AB07B0E809F0BB0B1D +:10063000802DBF01FF2793585F4F2AF09E3F510541 +:1006400068F061C0ABC05F3FECF3983EDCF3869589 +:1006500077956795B795F7959F5FC9F7880F911DB7 +:100660009695879597F90895E1E0660F771F881FA3 +:10067000BB1F621773078407BA0720F0621B730B56 +:10068000840BBA0BEE1F88F7E0950895E89409C033 +:1006900097FB3EF490958095709561957F4F8F4FB5 +:1006A0009F4F9923A9F0F92F96E9BB279395F695CB +:1006B000879577956795B795F111F8CFFAF4BB0F49 +:1006C00011F460FF1BC06F5F7F4F8F4F9F4F16C0AD +:1006D000882311F096E911C0772321F09EE8872F37 +:1006E000762F05C0662371F096E8862F70E060E0F3 +:1006F0002AF09A95660F771F881FDAF7880F96956C +:10070000879597F9089597F99F6780E870E060E012 +:1007100008959FEF80EC089500240A94161617069A +:1007200018060906089500240A94121613061406E2 +:1007300005060895092E0394000C11F4882352F045 +:10074000BB0F40F4BF2B11F460FF04C06F5F7F4FFD +:100750008F4F9F4F089557FD9058440F551F59F0E4 +:100760005F3F71F04795880F97FB991F61F09F3F9E +:1007700079F087950895121613061406551FF2CFC7 +:100780004695F1DF08C0161617061806991FF1CF17 +:1007900086957105610508940895E894BB2766273E +:1007A0007727CB0197F9089566D008F48FEF089565 +:1007B0000BD0C0CFB1DF28F0B6DF18F0952309F0D9 +:1007C000A2CFA7CF1124EACFC6DFA0F3959FD1F324 +:1007D000950F50E0551F629FF001729FBB27F00DEF +:1007E000B11D639FAA27F00DB11DAA1F649F662744 +:1007F000B00DA11D661F829F2227B00DA11D621F93 +:10080000739FB00DA11D621F839FA00D611D221F4C +:10081000749F3327A00D611D231F849F600D211D30 +:10082000822F762F6A2F11249F5750408AF0E1F0D3 +:1008300088234AF0EE0FFF1FBB1F661F771F881F1C +:1008400091505040A9F79E3F510570F05CCFA6CF64 +:100850005F3FECF3983EDCF3869577956795B79507 +:10086000F795E7959F5FC1F7FE2B880F911D969531 +:10087000879597F90895990F0008550FAA0BE0E89E +:10088000FEEF16161706E807F907C0F01216130652 +:10089000E407F50798F0621B730B840B950B39F492 +:1008A0000A2661F0232B242B252B21F408950A26F8 +:1008B00009F4A140A6958FEF811D811D0895F8943C +:0208C000FFCF68 +:1008C2000000000000000000000000000000000026 +:1008D2000000000000000000000000000000000016 +:1008E2000000000000000000000000000000A04323 +:1008F200000061440000003F0AD7233C00000000D2 +:080902000000000000000000ED +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold_main.c b/tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold_main.c new file mode 100644 index 0000000..d484565 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/pot/MDD_pot_threshold_main.c @@ -0,0 +1,264 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_pot_threshold_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_pot_threshold_fmi2Component_s { + fmi2Real currentTime; + fmi2Real fmi2RealVars[6]; + fmi2Boolean fmi2BooleanVars[6]; + fmi2Real fmi2RealParameter[5]; + void* extObjs[6]; +} MDD_pot_threshold_fmi2Component; + +MDD_pot_threshold_fmi2Component MDD_pot_threshold_component = { + .fmi2RealVars = { + 0.0 /*adc._y*/, + 0.0 /*greater1._u1*/, + 0.0 /*greater1._u2*/, + 0.0 /*greater2._u1*/, + 0.0 /*realExpression1._y*/, + 0.0 /*realExpression2._y*/, + }, + .fmi2BooleanVars = { + fmi2False /*digitalWriteBoolean1._u*/, + fmi2False /*digitalWriteBoolean2._u*/, + fmi2False /*digitalWriteBoolean3._u*/, + fmi2False /*greaterEqualThreshold1._y*/, + fmi2False /*greaterEqualThreshold2._y*/, + fmi2False /*greaterEqualThreshold3._y*/, + }, + .fmi2RealParameter = { + 0.0 /*greaterEqualThreshold1._threshold*/, + 320.0 /*greaterEqualThreshold2._threshold*/, + 900.0 /*greaterEqualThreshold3._threshold*/, + 0.5 /*realToBoolean1._threshold*/, + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +static const char * const OMCLIT0 = "ElectricPotential"; +static const char * const OMCLIT1 = "V"; +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" +#include "MDDAVRAnalog.h" + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution) +{ + fmi2Real om_value; + om_value = MDD_avr_analog_read(om_analogPort, om_vref, om_voltageResolution); + return om_value; +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage) +{ + void* om_avr; + om_avr = MDD_avr_analog_init(om_divisionFactor, om_referenceVoltage); + return om_avr; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr) +{ + MDD_avr_analog_close(om_avr); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_pot_threshold_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_pot_threshold_component; +} + +fmi2Status MDD_pot_threshold_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_pot_threshold_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* adc._analog EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Analog.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(comp, 7, 4); + comp->extObjs[3] /* digitalWriteBoolean3._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 4); + comp->extObjs[2] /* digitalWriteBoolean2._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 3); + comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + comp->extObjs[4] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[5] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[4] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + return fmi2OK; +} + +fmi2Status MDD_pot_threshold_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_pot_threshold_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_pot_threshold_functionOutputs(fmi2Component comp) +{ + comp->fmi2RealVars[0] /* adc._y variable */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(comp, 3, 1024.0, 10); /* equation 14 */ + comp->fmi2BooleanVars[5] /* greaterEqualThreshold3._y DISCRETE */ = (comp->fmi2RealVars[0] /* adc._y variable */)>=(comp->fmi2RealParameter[2] /* greaterEqualThreshold3._threshold PARAM */); /* equation 15 */ + comp->fmi2RealVars[2] /* greater1._u2 variable */ = (comp->fmi2BooleanVars[5] /* greaterEqualThreshold3._y DISCRETE */) ? (1.0) : (0.0); /* equation 16 */ + comp->fmi2BooleanVars[2] /* digitalWriteBoolean3._u DISCRETE */ = (comp->fmi2RealVars[2] /* greater1._u2 variable */)>=(comp->fmi2RealParameter[3] /* realToBoolean1._threshold PARAM */); /* equation 17 */ + comp->fmi2BooleanVars[4] /* greaterEqualThreshold2._y DISCRETE */ = (comp->fmi2RealVars[0] /* adc._y variable */)>=(comp->fmi2RealParameter[1] /* greaterEqualThreshold2._threshold PARAM */); /* equation 18 */ + comp->fmi2RealVars[1] /* greater1._u1 variable */ = (comp->fmi2BooleanVars[4] /* greaterEqualThreshold2._y DISCRETE */) ? (1.0) : (0.0); /* equation 19 */ + comp->fmi2BooleanVars[1] /* digitalWriteBoolean2._u DISCRETE */ = (comp->fmi2RealVars[1] /* greater1._u1 variable */)>(comp->fmi2RealVars[2] /* greater1._u2 variable */); /* equation 20 */ + comp->fmi2BooleanVars[3] /* greaterEqualThreshold1._y DISCRETE */ = (comp->fmi2RealVars[0] /* adc._y variable */)>=(comp->fmi2RealParameter[0] /* greaterEqualThreshold1._threshold PARAM */); /* equation 21 */ + comp->fmi2RealVars[3] /* greater2._u1 variable */ = (comp->fmi2BooleanVars[3] /* greaterEqualThreshold1._y DISCRETE */) ? (1.0) : (0.0); /* equation 22 */ + comp->fmi2BooleanVars[0] /* digitalWriteBoolean1._u DISCRETE */ = (comp->fmi2RealVars[3] /* greater2._u1 variable */)>(comp->fmi2RealVars[1] /* greater1._u1 variable */); /* equation 23 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[5] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, comp->fmi2BooleanVars[0] /* digitalWriteBoolean1._u DISCRETE */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[2] /* digitalWriteBoolean2._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 3, comp->fmi2BooleanVars[1] /* digitalWriteBoolean2._u DISCRETE */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[3] /* digitalWriteBoolean3._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 4, comp->fmi2BooleanVars[2] /* digitalWriteBoolean3._u DISCRETE */); +} + +fmi2Status MDD_pot_threshold_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_pot_threshold_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_pot_threshold_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_pot_threshold_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_pot_threshold_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_pot_threshold_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_pot_threshold_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/pot/run_pot_threshold.mos b/tools/openmodelica/windows/MDD_build/pot/run_pot_threshold.mos new file mode 100644 index 0000000..843fc0f --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/pot/run_pot_threshold.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_pot.MDD_pot_threshold, fileNamePrefix="MDD_pot_threshold"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/push/MDD_led_push_button b/tools/openmodelica/windows/MDD_build/push/MDD_led_push_button Binary files differnew file mode 100644 index 0000000..bd67382 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/push/MDD_led_push_button diff --git a/tools/openmodelica/windows/MDD_build/push/MDD_led_push_button.hex b/tools/openmodelica/windows/MDD_build/push/MDD_led_push_button.hex new file mode 100644 index 0000000..dc5d712 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/push/MDD_led_push_button.hex @@ -0,0 +1,94 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C94FB0072 +:100020000C9451000C9451000C9451000C94CA0093 +:100030000C9451000C9451000C9499000C945100B4 +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0E6EAF5E002C0EE +:1000800005900D92A631B107D9F711E0A6E1B1E0D4 +:1000900001C01D92AB31B107E1F70E944C010C94F5 +:1000A000D1020C940000DC0154968D919C915597DF +:1000B0008230910561F08330910599F00197C9F480 +:1000C00016BC80916E00826080936E0016C0109204 +:1000D00085001092840080916F00826080936F0091 +:1000E0000CC01092B200809170008260809370000A +:1000F00004C081E090E00E94D10278949FB7F89408 +:10010000809118019FBF8823C9F31092180150965F +:10011000ED91FC91519718968D919C9119970097AC +:1001200021F4808182608083089580818D7F808327 +:1001300008951F920F920FB60F9211242F933F93A1 +:100140008F939F9380911601909117010196909340 +:1001500017018093160180911801813091F0209150 +:100160001601309117018091190190911A012817F9 +:10017000390738F081E0809318011092170110922E +:1001800016019F918F913F912F910F900FBE0F906D +:100190001F9018951F920F920FB60F9211242F9354 +:1001A0003F938F939F938091160190911701019631 +:1001B000909317018093160180911801813091F07E +:1001C00020911601309117018091190190911A0127 +:1001D0002817390738F081E0809318011092170131 +:1001E000109216019F918F913F912F910F900FBE0A +:1001F0000F901F9018951F920F920FB60F92112417 +:100200002F933F938F939F938091160190911701A5 +:100210000196909317018093160180911801813007 +:1002200091F0209116013091170180911901909160 +:100230001A012817390738F081E0809318011092CD +:100240001701109216019F918F913F912F910F905E +:100250000FBE0F901F901895FC01249825E230E006 +:100260003787268785B5836085BD41E050E0538B95 +:10027000428B8AE090E090931A018093190184B533 +:10028000826084BD89EF87BD558B448B219A318B69 +:10029000208B80E090E00895CF92DF92EF92FF9262 +:1002A00080E091E00E942C01C12CD12C760160E00D +:1002B00070E0CB0160930001709301018093020113 +:1002C0009093030180E091E00E9453008FEFC81AE1 +:1002D000D80AE80AF80AC701B6010E94E0012FE631 +:1002E00032E143E05BE30E946E0220E030E0A901CE +:1002F0000E947C01DFCF5058BB27AA270ED0B4C084 +:10030000A5D030F0AAD020F031F49F3F11F41EF4B4 +:100310009AC00EF4E095E7FB90C0E92FB6D080F3C9 +:10032000BA17620773078407950718F071F49EF5F2 +:10033000CEC00EF4E0950B2EBA2FA02D0B01B90103 +:1003400090010C01CA01A0011124FF27591B99F04B +:10035000593F50F4503E68F11A16F040A22F232F57 +:10036000342F4427585FF3CF469537952795A795A7 +:10037000F0405395C9F77EF41F16BA0B620B730B4E +:10038000840BBAF09150A1F0FF0FBB1F661F771FBF +:10039000881FC2F70EC0BA0F621F731F841F48F474 +:1003A000879577956795B795F7959E3F08F0B3CFFA +:1003B0009395880F08F09927EE0F979587950895E4 +:1003C000E89409C097FB3EF49095809570956195EF +:1003D0007F4F8F4F9F4F9923A9F0F92F96E9BB27A5 +:1003E0009395F695879577956795B795F111F8CF21 +:1003F000FAF4BB0F11F460FF1BC06F5F7F4F8F4F8C +:100400009F4F16C0882311F096E911C0772321F081 +:100410009EE8872F762F05C0662371F096E8862F19 +:1004200070E060E02AF09A95660F771F881FDAF770 +:10043000880F9695879597F9089597F99F6780E8B3 +:1004400070E060E008959FEF80EC089500240A9426 +:100450001616170618060906089500240A9412169F +:100460001306140605060895092E0394000C11F4D2 +:10047000882352F0BB0F40F4BF2B11F460FF04C07F +:100480006F5F7F4F8F4F9F4F089557FD9058440FD8 +:10049000551F59F05F3F71F04795880F97FB991FE3 +:1004A00061F09F3F79F087950895121613061406A0 +:1004B000551FF2CF4695F1DF08C01616170618062D +:1004C000991FF1CF86957105610508940895E89408 +:1004D000BB2766277727CB0197F908950BD0C4CFA8 +:1004E000B5DF28F0BADF18F0952309F0A6CFABCF1F +:1004F0001124EECFCADFA0F3959FD1F3950F50E002 +:10050000551F629FF001729FBB27F00DB11D639FC5 +:10051000AA27F00DB11DAA1F649F6627B00DA11D6B +:10052000661F829F2227B00DA11D621F739FB00D11 +:10053000A11D621F839FA00D611D221F749F332781 +:10054000A00D611D231F849F600D211D822F762F1A +:100550006A2F11249F5750408AF0E1F088234AF017 +:10056000EE0FFF1FBB1F661F771F881F9150504063 +:10057000A9F79E3F510570F060CFAACF5F3FECF323 +:10058000983EDCF3869577956795B795F795E7954F +:100590009F5FC1F7FE2B880F911D9695879597F960 +:0605A0000895F894FFCF5E +:1005A600000000000000000000000AD7233C000005 +:0605B6000000000000003F +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/push/MDD_led_push_button_main.c b/tools/openmodelica/windows/MDD_build/push/MDD_led_push_button_main.c new file mode 100644 index 0000000..8deaf13 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/push/MDD_led_push_button_main.c @@ -0,0 +1,234 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_led_push_button_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_led_push_button_fmi2Component_s { + fmi2Real currentTime; + fmi2Boolean fmi2BooleanVars[3]; + fmi2Real fmi2RealParameter[1]; + void* extObjs[4]; +} MDD_led_push_button_fmi2Component; + +MDD_led_push_button_fmi2Component MDD_led_push_button_component = { + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + fmi2False /*booleanExpression2._y*/, + fmi2False /*digitalReadBoolean1._y*/, + }, + .fmi2RealParameter = { + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" + +static inline fmi2Boolean Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_read(fmi2Component comp, void* om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_destructor(fmi2Component comp, void* om_digital); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Boolean Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_read(fmi2Component comp, void* om_port, fmi2Integer om_pin) +{ + fmi2Boolean om_b; + om_b = MDD_avr_digital_pin_read(om_port, om_pin); + return om_b; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2False); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_led_push_button_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_led_push_button_component; +} + +fmi2Status MDD_led_push_button_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_led_push_button_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[0] /* digitalReadBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitRead */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitRead_constructor(comp, 2, 5); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 2, 2); + return fmi2OK; +} + +fmi2Status MDD_led_push_button_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_led_push_button_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_led_push_button_functionOutputs(fmi2Component comp) +{ + Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 2, !(comp->fmi2BooleanVars[2] /* digitalReadBoolean1._y DISCRETE */)); +} + +fmi2Status MDD_led_push_button_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_led_push_button_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_led_push_button_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_led_push_button_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_led_push_button_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_led_push_button_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_led_push_button_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/push/run_led_push_button.mos b/tools/openmodelica/windows/MDD_build/push/run_led_push_button.mos new file mode 100644 index 0000000..3f96cb9 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/push/run_led_push_button.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_push.MDD_led_push_button, fileNamePrefix="MDD_led_push_button"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/push/run_led_push_button_status.mos b/tools/openmodelica/windows/MDD_build/push/run_led_push_button_status.mos new file mode 100644 index 0000000..9c12875 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/push/run_led_push_button_status.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_push.MDD_led_push_button_status, fileNamePrefix="MDD_led_push_button_status"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/runMDDAvr.mos b/tools/openmodelica/windows/MDD_build/runMDDAvr.mos new file mode 100644 index 0000000..b794222 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/runMDDAvr.mos @@ -0,0 +1,8 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +translateModel(Modelica_DeviceDrivers.EmbeddedTargets.AVR.Examples.Arduino.UNO.Blink, fileNamePrefix="Blink"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer b/tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer Binary files differnew file mode 100644 index 0000000..18920a7 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer diff --git a/tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer.hex b/tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer.hex new file mode 100644 index 0000000..7623dfb --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer.hex @@ -0,0 +1,121 @@ +:100000000C9434000C9451000C9451000C94510049 +:100010000C9451000C9451000C9451000C9431013B +:100020000C9451000C9451000C9451000C9400015C +:100030000C9451000C9451000C94CF000C9451007E +:100040000C9451000C9451000C9451000C945100EC +:100050000C9451000C9451000C9451000C945100DC +:100060000C9451000C94510011241FBECFEFD8E026 +:10007000DEBFCDBF11E0A0E0B1E0E4E4F7E002C0F4 +:1000800005900D92A832B107D9F711E0A8E2B1E0CE +:1000900001C01D92AD32B107E1F70E948B010C94B3 +:1000A000A0030C9400000F931F93CF93DF93EC01F8 +:1000B00080917C00857E846080937C0080917A00B2 +:1000C000806480937A0080917A0086FDFCCF6091F5 +:1000D00078007091790080E090E00E94870220E033 +:1000E00030E040E854E40E94190320E030EC4FE790 +:1000F00054E40E941F026C837D838E839F8301E002 +:1001000010E02A893B894C895D890E94150387FF8D +:1001100002C000E010E0198B088B8EA19FA18230F5 +:10012000910561F08330910599F00197C9F416BCEF +:1001300080916E00826080936E0016C010928500E0 +:100140001092840080916F00826080936F000CC0D9 +:100150001092B2008091700082608093700004C0A1 +:1001600081E090E00E94A00378949FB7F89480917A +:100170002A019FBF8823C9F310922A01EAA1FBA19B +:1001800088899989892B19F08081886002C08081D3 +:10019000877F8083DF91CF911F910F9108951F92E8 +:1001A0000F920FB60F9211242F933F938F939F932B +:1001B00080912801909129010196909329018093C3 +:1001C000280180912A01813091F0209128013091FD +:1001D000290180912B0190912C012817390738F0C3 +:1001E00081E080932A0110922901109228019F91A9 +:1001F0008F913F912F910F900FBE0F901F901895E8 +:100200001F920F920FB60F9211242F933F938F934B +:100210009F93809128019091290101969093290143 +:100220008093280180912A01813091F0209128014A +:100230003091290180912B0190912C0128173907C9 +:1002400038F081E080932A01109229011092280150 +:100250009F918F913F912F910F900FBE0F901F9004 +:1002600018951F920F920FB60F9211242F933F9360 +:100270008F939F93809128019091290101969093EB +:1002800029018093280180912A01813091F02091E9 +:1002900028013091290180912B0190912C01281780 +:1002A000390738F081E080932A01109229011092D9 +:1002B00028019F918F913F912F910F900FBE0F902A +:1002C0001F901895FC01539A8BE290E093A382A3B0 +:1002D00085B5836085BD21E030E035A324A38AE0A5 +:1002E00090E090932C0180932B0184B5826084BDB3 +:1002F00089EF87BD37A326A3ACE7B0E08C91806C73 +:100300008C93AAE7B0E08C9187688C9311A210A21D +:1003100080E090E00895CF92DF92EF92FF9280E02C +:1003200091E00E946201C12CD12C760160E070E066 +:10033000CB016093000170930101809302019093BF +:10034000030180E091E00E9453008FEFC81AD80AA1 +:10035000E80AF80AC701B6010E9487022FE632E1D7 +:1003600043E05BE30E94190320E030E0A9010E9412 +:10037000BB01DFCF5058BB27AA270ED01CC10DD11F +:1003800030F012D120F031F49F3F11F41EF402C17D +:100390000EF4E095E7FBF8C0E92F1ED180F3BA1701 +:1003A000620773078407950718F071F49EF536C14C +:1003B0000EF4E0950B2EBA2FA02D0B01B901900180 +:1003C0000C01CA01A0011124FF27591B99F0593FC4 +:1003D00050F4503E68F11A16F040A22F232F342F0C +:1003E0004427585FF3CF469537952795A795F0405A +:1003F0005395C9F77EF41F16BA0B620B730B840B6F +:10040000BAF09150A1F0FF0FBB1F661F771F881F26 +:10041000C2F70EC0BA0F621F731F841F48F487957E +:1004200077956795B795F7959E3F08F0B3CF93956D +:10043000880F08F09927EE0F9795879508950CD0AF +:10044000BAC0B2D040F0A9D030F021F45F3F19F02B +:100450009BC05111E4C09EC0BFD098F39923C9F34B +:100460005523B1F3951B550BBB27AA2762177307BA +:10047000840738F09F5F5F4F220F331F441FAA1F6E +:10048000A9F333D00E2E3AF0E0E830D0915050402E +:10049000E695001CCAF729D0FE2F27D0660F771FDC +:1004A000881FBB1F261737074807AB07B0E809F0BE +:1004B000BB0B802DBF01FF2793585F4F2AF09E3F53 +:1004C000510568F061C0ABC05F3FECF3983EDCF3D0 +:1004D000869577956795B795F7959F5FC9F7880FCC +:1004E000911D9695879597F90895E1E0660F771F1E +:1004F000881FBB1F621773078407BA0720F0621BAF +:10050000730B840BBA0BEE1F88F7E0950895E894FF +:1005100009C097FB3EF490958095709561957F4F4B +:100520008F4F9F4F9923A9F0F92F96E9BB279395F9 +:10053000F695879577956795B795F111F8CFFAF409 +:10054000BB0F11F460FF1BC06F5F7F4F8F4F9F4F3A +:1005500016C0882311F096E911C0772321F09EE898 +:10056000872F762F05C0662371F096E8862F70E0FE +:1005700060E02AF09A95660F771F881FDAF7880FD8 +:100580009695879597F9089597F99F6780E870E0A9 +:1005900060E008959FEF80EC089500240A941616F9 +:1005A000170618060906089500240A941216130661 +:1005B000140605060895092E0394000C11F48823EF +:1005C00052F0BB0F40F4BF2B11F460FF04C06F5F0B +:1005D0007F4F8F4F9F4F089557FD9058440F551FE1 +:1005E00059F05F3F71F04795880F97FB991F61F0B5 +:1005F0009F3F79F087950895121613061406551F2C +:10060000F2CF4695F1DF08C0161617061806991F97 +:10061000F1CF86957105610508940895E894BB278C +:1006200066277727CB0197F9089566D008F48FEFF6 +:1006300008950BD0C0CFB1DF28F0B6DF18F09523B6 +:1006400009F0A2CFA7CF1124EACFC6DFA0F3959F70 +:10065000D1F3950F50E0551F629FF001729FBB27A9 +:10066000F00DB11D639FAA27F00DB11DAA1F649F55 +:100670006627B00DA11D661F829F2227B00DA11D08 +:10068000621F739FB00DA11D621F839FA00D611D8E +:10069000221F749F3327A00D611D231F849F600DAF +:1006A000211D822F762F6A2F11249F5750408AF0E8 +:1006B000E1F088234AF0EE0FFF1FBB1F661F771F74 +:1006C000881F91505040A9F79E3F510570F05CCFB4 +:1006D000A6CF5F3FECF3983EDCF386957795679560 +:1006E000B795F795E7959F5FC1F7FE2B880F911D92 +:1006F0009695879597F90895990F0008550FAA0BBD +:10070000E0E8FEEF16161706E807F907C0F0121624 +:100710001306E407F50798F0621B730B840B950B27 +:1007200039F40A2661F0232B242B252B21F408957C +:100730000A2609F4A140A6958FEF811D811D089519 +:04074000F894FFCF5B +:1007440000000000000000000000000000000000A5 +:10075400000000002F440AD7233C020001000000DF +:0807640000000000000000008D +:00000001FF diff --git a/tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer_main.c b/tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer_main.c new file mode 100644 index 0000000..bd35c9c --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/thermistor/MDD_therm_buzzer_main.c @@ -0,0 +1,253 @@ +#define fmi2TypesPlatform_h + +#define fmi2TypesPlatform "default" /* Compatible */ + +typedef struct MDD_therm_buzzer_fmi2Component_s* fmi2Component; +typedef void* fmi2ComponentEnvironment; /* Pointer to FMU environment */ +typedef void* fmi2FMUstate; /* Pointer to internal FMU state */ +typedef unsigned int fmi2ValueReference; +typedef double fmi2Real; +typedef int fmi2Integer; +typedef int fmi2Boolean; +typedef char fmi2Char; +typedef const fmi2Char* fmi2String; +typedef char fmi2Byte; + +#define fmi2True 1 +#define fmi2False 0 + +#include "fmi2/fmi2Functions.h" + +#include <stdint.h> +#include <stdio.h> + +void ModelicaFormatMessage(const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +typedef struct MDD_therm_buzzer_fmi2Component_s { + fmi2Real currentTime; + fmi2Real fmi2RealVars[2]; + fmi2Boolean fmi2BooleanVars[3]; + fmi2Real fmi2RealParameter[2]; + fmi2Integer fmi2IntegerParameter[1]; + fmi2Boolean fmi2BooleanParameter[1]; + fmi2String fmi2StringParameter[1]; + void* extObjs[4]; +} MDD_therm_buzzer_fmi2Component; + +MDD_therm_buzzer_fmi2Component MDD_therm_buzzer_component = { + .fmi2RealVars = { + 0.0 /*adc._y*/, + 0.0 /*realValue1._number*/, + }, + .fmi2BooleanVars = { + fmi2False /*booleanExpression1._y*/, + fmi2False /*booleanExpression2._y*/, + fmi2False /*digitalWriteBoolean1._u*/, + }, + .fmi2RealParameter = { + 700.0 /*greaterEqualThreshold1._threshold*/, + 0.01 /*synchronizeRealtime1._actualInterval*/, + }, + .fmi2IntegerParameter = { + 2 /*realValue1._significantDigits*/, + }, + .fmi2BooleanParameter = { + fmi2True /*realValue1._use_numberPort*/, + }, +}; + +#include <math.h> +/* TODO: Generate used builtin functions before SimCode */ +static inline double om_mod(double x, double y) +{ + return x-floor(x/y)*y; +} + +static const char * const OMCLIT0 = "ElectricPotential"; +static const char * const OMCLIT1 = "V"; +#include "MDDAVRTimer.h" +#include "MDDAVRRealTime.h" +#include "MDDAVRDigital.h" +#include "MDDAVRAnalog.h" + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt); +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch); +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer); + +static inline fmi2Real Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(fmi2Component comp, fmi2Integer om_analogPort, fmi2Real om_vref, fmi2Integer om_voltageResolution) +{ + fmi2Real om_value; + om_value = MDD_avr_analog_read(om_analogPort, om_vref, om_voltageResolution); + return om_value; +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(fmi2Component comp, fmi2Integer om_divisionFactor, fmi2Integer om_referenceVoltage) +{ + void* om_avr; + om_avr = MDD_avr_analog_init(om_divisionFactor, om_referenceVoltage); + return om_avr; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_destructor(fmi2Component comp, void* om_avr) +{ + MDD_avr_analog_close(om_avr); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(fmi2Component comp, void* om_port, fmi2Integer om_pin, fmi2Boolean om_value) +{ + MDD_avr_digital_pin_write(om_port, om_pin, om_value); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(fmi2Component comp, fmi2Integer om_port, fmi2Integer om_pin) +{ + void* om_dig; + om_dig = MDD_avr_digital_pin_init(om_port, om_pin, fmi2True); + return om_dig; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_destructor(fmi2Component comp, void* om_digital) +{ + MDD_avr_digital_pin_close(om_digital); +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_wait(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(fmi2Component comp, void* om_timer, fmi2Integer om_timerValue, fmi2Integer om_numTimerInterruptsPerCycle) +{ + void* om_rt; + om_rt = MDD_avr_rt_init(om_timer, om_timerValue, om_numTimerInterruptsPerCycle); + return om_rt; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_destructor(fmi2Component comp, void* om_rt) +{ + MDD_avr_rt_close(om_rt); +} +static inline void* Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(fmi2Component comp, fmi2Integer om_timerSelect, fmi2Integer om_clockSelect, fmi2Boolean om_clearTimerOnMatch) +{ + void* om_timer; + om_timer = MDD_avr_timer_init(om_timerSelect, om_clockSelect, om_clearTimerOnMatch); + return om_timer; +} +static inline void Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_destructor(fmi2Component comp, void* om_timer) +{ + MDD_avr_timer_close(om_timer); +} + +fmi2Component MDD_therm_buzzer_fmi2Instantiate(fmi2String name, fmi2Type ty, fmi2String GUID, fmi2String resources, const fmi2CallbackFunctions* functions, fmi2Boolean visible, fmi2Boolean loggingOn) +{ + static int initDone=0; + if (initDone) { + return NULL; + } + return &MDD_therm_buzzer_component; +} + +fmi2Status MDD_therm_buzzer_fmi2SetupExperiment(fmi2Component comp, fmi2Boolean toleranceDefined, fmi2Real tolerance, fmi2Real startTime, fmi2Boolean stopTimeDefined, fmi2Real stopTime) +{ + return fmi2OK; +} + +fmi2Status MDD_therm_buzzer_fmi2EnterInitializationMode(fmi2Component comp) +{ + comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_InitWrite_constructor(comp, 4, 4); + comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Timers_Timer_constructor(comp, 1, 4, fmi2False); + comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_Init_constructor(comp, comp->extObjs[2] /* synchronizeRealtime1._clock EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Timers.Timer */, 249, 10); + comp->extObjs[0] /* adc._analog EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Analog.Init */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_Init_constructor(comp, 7, 4); + return fmi2OK; +} + +fmi2Status MDD_therm_buzzer_fmi2ExitInitializationMode(fmi2Component comp) +{ + return fmi2OK; +} + +static fmi2Status MDD_therm_buzzer_functionODE(fmi2Component comp) +{ +} + +static fmi2Status MDD_therm_buzzer_functionOutputs(fmi2Component comp) +{ + comp->fmi2RealVars[0] /* adc._y variable */ = Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Analog_read__voltage(comp, 5, 1024.0, 10); /* equation 7 */ + comp->fmi2BooleanVars[2] /* digitalWriteBoolean1._u DISCRETE */ = (comp->fmi2RealVars[0] /* adc._y variable */)>=(comp->fmi2RealParameter[0] /* greaterEqualThreshold1._threshold PARAM */); /* equation 8 */Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_RealTimeSynchronization_wait(comp, comp->extObjs[3] /* synchronizeRealtime1._sync EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.RealTimeSynchronization.Init */);Modelica__DeviceDrivers_EmbeddedTargets_AVR_Functions_Digital_write(comp, comp->extObjs[1] /* digitalWriteBoolean1._digital EXTOBJ: Modelica_DeviceDrivers.EmbeddedTargets.AVR.Functions.Digital.InitWrite */, 4, comp->fmi2BooleanVars[2] /* digitalWriteBoolean1._u DISCRETE */); +} + +fmi2Status MDD_therm_buzzer_fmi2DoStep(fmi2Component comp, fmi2Real currentCommunicationPoint, fmi2Real communicationStepSize, fmi2Boolean noSetFMUStatePriorToCurrentPoint) +{ + comp->currentTime = currentCommunicationPoint; + /* TODO: Calculate time/state-dependent variables here... */ + MDD_therm_buzzer_functionOutputs(comp); + return fmi2OK; +} + +int main(int argc, char **argv) +{ + int terminateSimulation = 0; + fmi2Status status = fmi2OK; + fmi2CallbackFunctions cbf = { + .logger = NULL, + .allocateMemory = NULL /*calloc*/, + .freeMemory = NULL /*free*/, + .stepFinished = NULL, //synchronous execution + .componentEnvironment = NULL + }; + + fmi2Component comp = MDD_therm_buzzer_fmi2Instantiate("", fmi2CoSimulation, "", "", &cbf, fmi2False, fmi2False); + if (comp==NULL) { + return 1; + } + MDD_therm_buzzer_fmi2SetupExperiment(comp, fmi2False, 0.0, 0.0, fmi2False, 1.0); + MDD_therm_buzzer_fmi2EnterInitializationMode(comp); + // Set start-values? Nah... + MDD_therm_buzzer_fmi2ExitInitializationMode(comp); + + double currentTime = 0.0; + double h = 0.002; + uint32_t i = 0; + + while (status == fmi2OK) { + //retrieve outputs + // fmi2GetReal(m, ..., 1, &y1); + //set inputs + // fmi2SetReal(m, ..., 1, &y2); + + //call slave and check status + status = MDD_therm_buzzer_fmi2DoStep(comp, currentTime, h, fmi2True); + switch (status) { + case fmi2Discard: + case fmi2Error: + case fmi2Fatal: + case fmi2Pending /* Cannot happen */: + terminateSimulation = 1; + break; + case fmi2OK: + case fmi2Warning: + break; + } + if (terminateSimulation) { + break; + } + i++; + /* increment master time */ + currentTime = 0.0 + h*i; + } + +#if 0 + if ((status != fmi2Error) && (status != fmi2Fatal)) { + fmi2Terminate(m); + } + if (status != fmi2Fatal) { + fmi2FreeInstance(m); + } +#endif +} + diff --git a/tools/openmodelica/windows/MDD_build/thermistor/run_therm_buzzer.mos b/tools/openmodelica/windows/MDD_build/thermistor/run_therm_buzzer.mos new file mode 100644 index 0000000..a510879 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/thermistor/run_therm_buzzer.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_thermistor.MDD_therm_buzzer, fileNamePrefix="MDD_therm_buzzer"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/MDD_build/thermistor/run_therm_read.mos b/tools/openmodelica/windows/MDD_build/thermistor/run_therm_read.mos new file mode 100644 index 0000000..6a13955 --- /dev/null +++ b/tools/openmodelica/windows/MDD_build/thermistor/run_therm_read.mos @@ -0,0 +1,11 @@ +loadModel(Modelica); +getErrorString(); + +loadFile("D:/Modelica_DeviceDrivers/package.mo"); +getErrorString(); + +loadFile("D:/Arduino.mo"); +getErrorString(); + +translateModel(Arduino.SerialCommunication.MDD_Examples.MDD_thermistor.MDD_therm_read, fileNamePrefix="MDD_therm_read"); +getErrorString();
\ No newline at end of file diff --git a/tools/openmodelica/windows/Resources/Images/Icons/tqfp32.png b/tools/openmodelica/windows/Resources/Images/Icons/tqfp32.png Binary files differnew file mode 100644 index 0000000..f933f6a --- /dev/null +++ b/tools/openmodelica/windows/Resources/Images/Icons/tqfp32.png diff --git a/tools/openmodelica/windows/Resources/Library/SerialComm.dll b/tools/openmodelica/windows/Resources/Library/SerialComm.dll Binary files differnew file mode 100644 index 0000000..37b83b8 --- /dev/null +++ b/tools/openmodelica/windows/Resources/Library/SerialComm.dll diff --git a/tools/openmodelica/windows/Resources/Library/SerialComm.o b/tools/openmodelica/windows/Resources/Library/SerialComm.o Binary files differnew file mode 100644 index 0000000..4a0f2c3 --- /dev/null +++ b/tools/openmodelica/windows/Resources/Library/SerialComm.o diff --git a/tools/openmodelica/windows/Resources/include/serial.h b/tools/openmodelica/windows/Resources/include/serial.h new file mode 100644 index 0000000..4e687d9 --- /dev/null +++ b/tools/openmodelica/windows/Resources/include/serial.h @@ -0,0 +1,34 @@ +#include <stdlib.h> +#include <stdio.h> +#include <time.h> +#include <Windows.h> +//prototypes for the functions used in SerialComm.c + +__declspec (dllexport) __stdcall int open_serial(int handle, int port, int baudrate); +__declspec (dllexport) __stdcall int write_serial(int handle, char str[],int size); +__declspec (dllexport) __stdcall int read_serial(int handle,char buf[],int size); +__declspec (dllexport) __stdcall int status_serial(int handle,int nb[]); +__declspec (dllexport) __stdcall int close_serial(int handle); +__declspec (dllexport) __stdcall int cmd_digital_out(int h,int pin_no,int val); +__declspec (dllexport) __stdcall int cmd_digital_in(int h,int pin_no); +__declspec (dllexport) __stdcall void delay(long int t); +__declspec (dllexport) __stdcall int cmd_analog_out(int h,int pin_no,double val); +__declspec (dllexport) __stdcall uint16_t cmd_analog_in(int h,int pin_no); +__declspec (dllexport) __stdcall void cmd_dcmotor_setup(int h,int driver_type,int motor_no,int pin_no_1,int pin_no_2); +__declspec (dllexport) __stdcall void cmd_dcmotor_run(int h,int motor_no,int u1); +__declspec (dllexport) __stdcall void cmd_dcmotor_release(int h,int motor_no); +__declspec (dllexport) __stdcall void cmd_servo_attach(int h,int servo_no); +__declspec (dllexport) __stdcall void cmd_servo_move(int h,int servo_no,int u1); +__declspec (dllexport) __stdcall void cmd_servo_detach(int h,int servo_no); +__declspec (dllexport) __stdcall int mfloor(float num); +__declspec (dllexport) __stdcall int cmd_analog_out_volt(int h,int pin_no,double val); +__declspec (dllexport) __stdcall uint16_t cmd_analog_in_volt(int h,int pin_no); +__declspec (dllexport) __stdcall long int hex2dec(char hexadecimal[]); +__declspec (dllexport) __stdcall void dec2hex(long int decimalnum,char hexadecimalnum[]); +__declspec (dllexport) __stdcall double ieeesingle2num(char hexa[]); +__declspec (dllexport) __stdcall void read_active_power(); +__declspec (dllexport) __stdcall void read_current(); +__declspec (dllexport) __stdcall void read_voltage(); +__declspec (dllexport) __stdcall double read_val(int addr_byte); +__declspec (dllexport) __stdcall int ascii_c(char c); +__declspec (dllexport) __stdcall char ascii_n(int num); diff --git a/tools/openmodelica/windows/Resources/src/SerialComm.c b/tools/openmodelica/windows/Resources/src/SerialComm.c new file mode 100644 index 0000000..d7f612a --- /dev/null +++ b/tools/openmodelica/windows/Resources/src/SerialComm.c @@ -0,0 +1,1021 @@ +/************************************************** + +file: main.c +purpose: serial librairie for Scilab + +Alain Caignot +**************************************************/ +#ifdef NAN +/* NAN is supported */ +#endif +#ifdef INFINITY +/* INFINITY is supported */ +#endif + + +#include <stdlib.h> +#include <stdio.h> +#include <time.h> +#include <unistd.h> +#include <errno.h> +#include <string.h> +#include <Windows.h> +#include <fcntl.h> +#include <math.h> +#include <ctype.h> +#include <stdint.h> +#include "../include/serial.h" + +#define abs(x) (x>=0?x:-x) +#define MAXPORTS 5 +// Static definition to stock HANDLE of Port. +static HANDLE hport; + +// Function to open port COM +__declspec (dllexport) __stdcall int open_serial(int handle,int port, int baudrate){ + DCB dcbSerialParams ; + DWORD dwBytesWrite = 0; + DWORD dwBytesRead = 10; + COMMTIMEOUTS timeouts={0}; + + char tmp[5]="COM5"; + itoa(port,&tmp[3],10); + + int OK=0; + + + hport = CreateFile(tmp, + GENERIC_READ | GENERIC_WRITE, + 0,//FILE_SHARE_READ | FILE_SHARE_WRITE //to test : recuperation COM port if simulation crashes + 0, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + 0); + + if(hport==INVALID_HANDLE_VALUE){ + if(GetLastError()==ERROR_FILE_NOT_FOUND){ + //serial port does not exist. Inform user. + OK = GetLastError(); + return OK; + } + //some other error occurred. Inform user. + OK = GetLastError(); + return OK; + } + + + + dcbSerialParams.DCBlength=sizeof(dcbSerialParams); + if (!GetCommState(hport, &dcbSerialParams)) { + //error getting state + OK = GetLastError(); + return OK; + } + dcbSerialParams.BaudRate=baudrate; + dcbSerialParams.ByteSize=8; + dcbSerialParams.StopBits=ONESTOPBIT; + dcbSerialParams.Parity=NOPARITY; + if(!SetCommState(hport, &dcbSerialParams)){ + //error setting serial port state + OK = GetLastError(); + return OK; + } + + + timeouts.ReadIntervalTimeout=50; + timeouts.ReadTotalTimeoutConstant=50; + timeouts.ReadTotalTimeoutMultiplier=1; + timeouts.WriteTotalTimeoutConstant=50; + timeouts.WriteTotalTimeoutMultiplier=1; + if(!SetCommTimeouts(hport, &timeouts)){ + //error occureed. Inform user + OK = GetLastError(); + return OK; + } + Sleep(1000); +} + +//Function to close port COM +__declspec (dllexport) __stdcall int close_serial(int handle){ + int res; + int OK=0; + res=CloseHandle(hport); + if (res==0)//error + OK = GetLastError(); + return OK; +} + +//Function to write to the port +__declspec (dllexport) __stdcall int write_serial(int handle, char str[],int size){ + DWORD dwBytesWrite = 0; + int res; + int OK=0; + res=WriteFile(hport,str,size,&dwBytesWrite,NULL); + + if (res==0) //error + OK = GetLastError(); + +} + +//Function to check status of the port +__declspec (dllexport) __stdcall int status_serial(int handle, int nb[]){ + DWORD dwErrorFlags; + COMSTAT ComStat; + int res; + + int OK=0; + res=ClearCommError( hport, &dwErrorFlags, &ComStat ); + if (res==0) {//error + OK = GetLastError(); + return OK; + } + nb[0] = 2; + nb[1] = 2; + OK=0; + //printf("Getting status.....\n"); + return OK; +} + +//Function to read from the port +__declspec (dllexport) __stdcall int read_serial(int handle,char buf[],int size){ + DWORD dwBytesRead = 0; + int res; + res=ReadFile(hport, buf, size, &dwBytesRead, NULL); + return res; + +} +//Function to provide delay +__declspec (dllexport) __stdcall void delay(long int t) +{ + Sleep(abs(t)); + return ; +} + +//digital output +__declspec (dllexport) __stdcall int cmd_digital_out(int h,int pin_no,int val) +{ + int wr=2; + char pin[6]="Da"; + char v[2],temp[2]; + sprintf(temp,"%c",pin_no+48); + strcat(pin,temp); + strcat(pin,"1"); + //printf("%s",pin); + wr=write_serial(h,pin,4); + if (val > 0.5) + val = 1; + else + val = 0; + + sprintf(v,"%d",val); + strcpy(pin,"Dw"); + strcat(pin,temp); + strcat(pin,v); + //printf("%s",pin); + wr=write_serial(h,pin,4); + return wr; +} + +//digital input +__declspec (dllexport) __stdcall int cmd_digital_in(int h,int pin_no) +{ + int value = 0; + char pin[6]="Da"; + char v1[2],v2[2]; + int wr1, wr2; + sprintf(v1,"%c",pin_no+48); + strcat(pin,v1); + strcat(pin,"0"); + //printf("%s\n",pin); + wr1=write_serial(h,pin,4); + + strcpy(pin,"Dr"); + sprintf(v2,"%c",pin_no+48); + strcat(pin,v2); + wr2=write_serial(1,pin,3); + //binary transfer + int stat; + int num_bytes[2]; + char st[10]; + stat=status_serial(h,num_bytes); + while(num_bytes[0]<1) + stat=status_serial(h,num_bytes); + char* temp; + int wr=read_serial(h,st,1); + value=strtod(st,&temp); + //printf("%d\n",value); + return value; +} +//Analog input +__declspec (dllexport) __stdcall uint16_t cmd_analog_in(int h,int pin_no) +{ + char pin[5],v1[2]; + int stat; + int read[3]; + sprintf(v1,"%c",pin_no+48); + strcpy(pin,"A"); + strcat(pin,v1); + int wr=write_serial(h,pin,2); + stat=status_serial(h,read); + while (read[0] < 2) + stat=status_serial(h,read); + char values[5]; + int a_rd=read_serial(h,values,2); + values[2]='\0'; + //printf("%s\n",values); + int l=strlen(values); + uint8_t temp[l+1]; + //int temp[l]; + int i; + for (i = 0; i < l; ++i) + { + temp[i]=(uint8_t)values[i]; + } + //printf("%u %u\n",temp[0],temp[1]); + uint16_t result=(uint16_t)(256*temp[1]+temp[0]); + //printf("%d\n",result); + return result; +} + +//Analog output +__declspec (dllexport) __stdcall int cmd_analog_out(int h,int pin_no,double val) +{ + char v1[2],v2[2]; + if(val > 255) + val = 255; + else if(val < 0) + val = 0; + //printf("%f\n",val); + char code_sent[10]; + strcpy(code_sent,"W"); + sprintf(v1,"%c",pin_no+48); + sprintf(v2,"%c",abs(ceil(val))); + strcat(code_sent,v1); + strcat(code_sent,v2); + //printf("%s\n",code_sent); + return write_serial(h,code_sent,3); + +} + +//Servo Attach +__declspec (dllexport) __stdcall void cmd_servo_attach(int h,int servo_no) +{ + char pin[5]; + int wr; + printf("init servo write"); + if(servo_no==1)//servo 1 on pin 9 + { + strcpy(pin,"Sa1"); + wr=write_serial(h,pin,3); + } + else if(servo_no==2)//servo 2 on pin 10 + { + strcpy(pin,"Sa2"); + wr=write_serial(h,pin,3); + } + else + perror("Error."); +} + +//Servo Move +__declspec (dllexport) __stdcall void cmd_servo_move(int h,int servo_no,int u1) +{ + int wr; + char servo[2]; + char v[2]; + char pin[5]="Sw"; + if (u1<0) + { + sprintf(servo,"%c",48+servo_no); + sprintf(v,"%c",0); + strcat(pin,servo); + strcat(pin,v); + //pin="Sw"+ascii(48+servo_no)+ascii(0); + } + else if(u1>180) + { + sprintf(servo,"%c",48+servo_no); + sprintf(v,"%c",180); + strcat(pin,servo); + strcat(pin,v); + } //pin="Sw"+ascii(48+servo_no)+ascii(180); + else + { + sprintf(servo,"%c",48+servo_no); + sprintf(v,"%c",(uint8_t)u1); + strcat(pin,servo); + strcat(pin,v); + } //pin="Sw"+ascii(48+servo_no)+ascii(uint8(u1)); + wr=write_serial(1,pin,4); +} + +//Servo Detach +__declspec (dllexport) __stdcall void cmd_servo_detach(int h,int servo_no) +{ + int wr; + char pin[5]="Sd"; + if(servo_no==1) //servo 1 on pin 10 + { + strcat(pin,"1"); + //pin="Sd1" + wr=write_serial(h,pin,3); + } + else if(servo_no==2) //servo 2 on pin 9 + { + strcat(pin,"2"); + //pin="Sd2" + wr=write_serial(h,pin,3); + } + else + perror("Error."); + +} +//Calculating floor odf a number +__declspec (dllexport) __stdcall int mfloor(float num) +{ + int n = floor(num) ; + return n; +} +//DC Motor setup +__declspec (dllexport) __stdcall void cmd_dcmotor_setup(int h,int driver_type,int motor_no,int pin_no_1,int pin_no_2) +{ + printf("init DCmotor\n"); + char code_sent[10]="C"; + int wr; + char v1[2],v2[2],motor[2]; + if(driver_type==1) + { + sprintf(v1,"%c",pin_no_1+48); + sprintf(v2,"%c",pin_no_2+48); + sprintf(motor,"%c",motor_no+48); + strcat(code_sent,motor); + strcat(code_sent,v1); + strcat(code_sent,v2); + strcat(code_sent,"1"); + } + //code_sent="C"+string(motor_no)+ascii(48+pin_no_1)+ascii(48+pin_no_2)+"1"; //adafruit + else if(driver_type==2) + { + sprintf(v1,"%c",pin_no_1+48); + sprintf(v2,"%c",pin_no_2+48); + sprintf(motor,"%c",motor_no+48); + strcat(code_sent,motor); + strcat(code_sent,v1); + strcat(code_sent,v2); + strcat(code_sent,"1"); + } + //code_sent="C"+string(motor_no)+ascii(48+pin_no_1)+ascii(48+pin_no_2)+"1"; //code pour initialiser L298 + else if(driver_type==3) + { + sprintf(v1,"%c",pin_no_1+48); + sprintf(v2,"%c",pin_no_2+48); + sprintf(motor,"%c",motor_no+48); + strcat(code_sent,motor); + strcat(code_sent,v1); + strcat(code_sent,v2); + strcat(code_sent,"0"); + + } + // code_sent="C"+string(motor_no)+ascii(48+pin_no_1)+ascii(48+pin_no_2)+"0"; //code pour initialiser L293 + //printf("%s\n",code_sent); + wr=write_serial(h,code_sent,5); + + int stat; + int num_bytes[2]; + //Attente que l'arduino reponde OK + stat=status_serial(1,num_bytes); + while (num_bytes[0] < 2) + stat=status_serial(1,num_bytes); + char values[5]; + int dcm_rd=read_serial(1,values,2); + //printf("%d\n",dcm_rd ); + //printf("%s\n",values ); + if (dcm_rd == 0) + printf("Init motor successful\n"); + else + printf("Init motor unsuccessful\n"); +} + +//DC Motor run +__declspec (dllexport) __stdcall void cmd_dcmotor_run(int h,int motor_no,int u1) +{ + char code_dir[2]; + char code_sent[10]="M"; + char motor[2]; + int val; + char v[2]; + if(u1>=0) + sprintf(code_dir,"%c",49); + //code_dir=ascii(49); + else + sprintf(code_dir,"%c",48); + //code_dir=ascii(48); + if(abs(u1)>255) + val=255; + else + val=abs(ceil(u1)); + //printf("%d\n",val); + sprintf(motor,"%c",motor_no+48); + sprintf(v,"%c",val); + strcat(code_sent,motor); + strcat(code_sent,code_dir); + strcat(code_sent,v); + //printf("%s\n",code_sent); + //code_sent="M"+ascii(48+motor_no)+code_dir+ascii(val); + int wr=write_serial(h,code_sent,4); +} + +//DC Motor release +__declspec (dllexport) __stdcall void cmd_dcmotor_release(int h,int motor_no) +{ + char code_sent[6]="M"; + char motor[2]; + char v[2]; + sprintf(motor,"%c",motor_no+48); + sprintf(v,"%c",0); + strcat(code_sent,motor); + strcat(code_sent,"1"); + strcat(code_sent,v); + //code_sent="M"+ascii(48+motor_no)+"1"+ascii(0); + //printf("%s\n",code_sent); + int wr=write_serial(h,code_sent,4); + strcpy(code_sent,"M"); + strcat(code_sent,motor); + strcat(code_sent,"r"); + //printf("%s\n",code_sent); + //code_sent="M"+ascii(48+motor_no)+"r"; + wr=write_serial(h,code_sent,3); +} + +//***********************************MODBUS***********************************************************// + +__declspec (dllexport) __stdcall long int hex2dec(char hexadecimal[]) +{ + long int decimalNumber=0; + char hexDigits[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', + '9', 'A', 'B', 'C', 'D', 'E', 'F'}; + int i, j, power=0; + + //Converting hexadecimal number to decimal number + for(i=strlen(hexadecimal)-1; i >= 0; i--) { + // search currect character in hexDigits array + if(isalpha(hexadecimal[i])) + hexadecimal[i]=toupper(hexadecimal[i]); + for(j=0; j<16; j++){ + if(hexadecimal[i] == hexDigits[j]){ + decimalNumber += j*pow(16, power); + } + } + power++; + } + return decimalNumber; +} + +__declspec (dllexport) __stdcall void dec2hex(long int decimalnum,char hexadecimalnum[]) +{ + long quotient, remainder; + int j = 1; + quotient = decimalnum; + + while (quotient != 0) + { + remainder = quotient % 16; + if (remainder < 10) + hexadecimalnum[j--] = 48 + remainder; + else + hexadecimalnum[j--] = 55 + remainder; + quotient = quotient / 16; + } + hexadecimalnum[2]='\0'; + +} + +__declspec (dllexport) __stdcall double ieeesingle2num(char hexa[]) +{ + long int x=hex2dec(hexa); + long int k =(long int)pow(2,31); //pow2(31); + int s = (x >= k); + if (s) + x = x - k; + //t = pow2(x,-23); + double t = x*pow(2,-23); + long int e = floor(t); + double f = t - e; + double y; + if (e == 255) + if(f == 0) + y = INFINITY; + else + y = NAN; + else if(e > 0) + y = (1+f)*pow(2,e-127); + //y = (1+f).*2.^(e-127); + + else + y = f*pow(2,-126); + //y = f.*2.^-126; + if (s) + y = -y; + return y; +} + +__declspec (dllexport) __stdcall char ascii_n(int num) +{ + return (char)num; +} + +__declspec (dllexport) __stdcall int ascii_c(char c) +{ + return (uint8_t)c; +} + + +__declspec (dllexport) __stdcall void read_voltage() +{ + int h=open_serial(1,2,9600); + + //printf("Serial port opened ...");//debug + + char arr[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(86),ascii_n(00),ascii_n(2),ascii_n(39),ascii_n(15),'\0'}; + + //printf("%s\n",arr);//debug + + int x,wr,rd; + char buf[12]; + for(x=0;x<5;x++) + { + wr=write_serial(1,arr,8); + rd = read_serial(1,buf,11); + Sleep(500); + } + buf[11]='\0'; + + //printf("%s\n",buf );//debug + + int b1=0,b2=0,b3=0,b4=0; + int myresult[12]; + int i; + for (i = 0; i < 11; ++i) + { + myresult[i]=ascii_c(buf[i]); + //printf("%d",myresult[i]);//debug + } + + //printf("%d %d %d %d\n",myresult[4],myresult[5],myresult[6],myresult[7]);//debug + + int a1=myresult[4]; + if (a1<16) + { + b1=1; + } + char v1[3]; + dec2hex(a1,v1); + if (b1) + { + sprintf(v1,"0%s",v1); + } + else + { + sprintf(v1,"%s",v1); + } + int a2=myresult[5]; + if (a2<16) + { + b2=1; + } + char v2[3]; + dec2hex(a2,v2); + if (b2) + { + sprintf(v2,"0%s",v2); + } + else + { + sprintf(v2,"%s",v2); + } + int a3=myresult[6]; + if (a3<16) + { + b3=1; + } + char v3[3]; + dec2hex(a3,v3); + if (b3) + { + sprintf(v3,"0%s",v3); + } + else + { + sprintf(v3,"%s",v3); + } + int a4=myresult[7]; + if (a4<16) + { + b4=1; + } + char v4[3]; + dec2hex(a4,v4); + if (b4) + { + sprintf(v4,"0%s",v4); + } + else + { + sprintf(v4,"%s",v4); + } + char a6[20]=""; + strcat(a6,v3); + strcat(a6,v4); + strcat(a6,v1); + strcat(a6,v2); + a6[8]='\0'; + + //printf("%s",a6);//debug + + int cl=close_serial(1); + double p=ieeesingle2num(a6); + printf("Voltage(in V)=%f\n",p); +} + + +__declspec (dllexport) __stdcall void read_current() +{ + int h=open_serial(1,2,9600); + char arr[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(88),ascii_n(00),ascii_n(2),ascii_n(70),ascii_n(204),'\0'}; + + //printf("%s\n",arr);//debug + + int x,wr,rd; + char buf[12]; + for(x=0;x<5;x++) + { + wr=write_serial(1,arr,8); + rd = read_serial(1,buf,11); + Sleep(500); + } + buf[11]='\0'; + + //printf("%s\n",buf );//debug + + int b1=0,b2=0,b3=0,b4=0; + int myresult[12]; + int i; + for (i = 0; i < 11; ++i) + { + myresult[i]=ascii_c(buf[i]); + //printf("%d",myresult[i]);//debug + } + + //printf("%d %d %d %d\n",myresult[4],myresult[5],myresult[6],myresult[7]);//debug + + int a1=myresult[4]; + if (a1<16) + { + b1=1; + } + char v1[3]; + dec2hex(a1,v1); + if (b1) + { + sprintf(v1,"0%s",v1); + } + else + { + sprintf(v1,"%s",v1); + } + int a2=myresult[5]; + if (a2<16) + { + b2=1; + } + char v2[3]; + dec2hex(a2,v2); + if (b2) + { + sprintf(v2,"0%s",v2); + } + else + { + sprintf(v2,"%s",v2); + } + int a3=myresult[6]; + if (a3<16) + { + b3=1; + } + char v3[3]; + dec2hex(a3,v3); + if (b3) + { + sprintf(v3,"0%s",v3); + } + else + { + sprintf(v3,"%s",v3); + } + int a4=myresult[7]; + if (a4<16) + { + b4=1; + } + char v4[3]; + dec2hex(a4,v4); + if (b4) + { + sprintf(v4,"0%s",v4); + } + else + { + sprintf(v4,"%s",v4); + } + char a6[20]=""; + strcat(a6,v3); + strcat(a6,v4); + strcat(a6,v1); + strcat(a6,v2); + a6[8]='\0'; + + //printf("%s",a6);//debug + + int cl=close_serial(1); + double p=ieeesingle2num(a6); + printf("Current(in A)=%f\n",p); +} + +__declspec (dllexport) __stdcall void read_active_power() +{ + int h=open_serial(1,2,9600); + char arr[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(78),ascii_n(00),ascii_n(2),ascii_n(167),ascii_n(8),'\0'}; + + //printf("%s\n",arr);//debug + + int x,wr,rd; + char buf[12]; + for(x=0;x<5;x++) + { + wr=write_serial(1,arr,8); + rd = read_serial(1,buf,11); + Sleep(500); + } + buf[11]='\0'; + + //printf("%s\n",buf );//debug + + int b1=0,b2=0,b3=0,b4=0; + int myresult[12]; + int i; + for (i = 0; i < 11; ++i) + { + myresult[i]=ascii_c(buf[i]); + //printf("%d",myresult[i]);//debug + } + + //printf("%d %d %d %d\n",myresult[4],myresult[5],myresult[6],myresult[7]);//debug + + int a1=myresult[4]; + if (a1<16) + { + b1=1; + } + char v1[3]; + dec2hex(a1,v1); + if (b1) + { + sprintf(v1,"0%s",v1); + } + else + { + sprintf(v1,"%s",v1); + } + int a2=myresult[5]; + if (a2<16) + { + b2=1; + } + char v2[3]; + dec2hex(a2,v2); + if (b2) + { + sprintf(v2,"0%s",v2); + } + else + { + sprintf(v2,"%s",v2); + } + int a3=myresult[6]; + if (a3<16) + { + b3=1; + } + char v3[3]; + dec2hex(a3,v3); + if (b3) + { + sprintf(v3,"0%s",v3); + } + else + { + sprintf(v3,"%s",v3); + } + int a4=myresult[7]; + if (a4<16) + { + b4=1; + } + char v4[3]; + dec2hex(a4,v4); + if (b4) + { + sprintf(v4,"0%s",v4); + } + else + { + sprintf(v4,"%s",v4); + } + char a6[20]=""; + strcat(a6,v3); + strcat(a6,v4); + strcat(a6,v1); + strcat(a6,v2); + a6[8]='\0'; + + //printf("%s",a6);//debug + + int cl=close_serial(1); + double p=ieeesingle2num(a6); + printf("Active Power(in W)=%f\n",p); +} + +__declspec (dllexport) __stdcall double read_val(int addr_byte) +{ + int h=open_serial(1,2,9600); + char* arr; + if(addr_byte==86) + { + char code[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(86),ascii_n(00),ascii_n(2),ascii_n(39),ascii_n(15),'\0'}; + arr = code; + printf("Voltage(in V)="); + } + else if(addr_byte==88) + { + char code[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(88),ascii_n(00),ascii_n(2),ascii_n(70),ascii_n(204),'\0'}; + arr =code; + printf("Current(in A)="); + } + else if(addr_byte==78) + { + char code[9]={ascii_n(1),ascii_n(3),ascii_n(15),ascii_n(78),ascii_n(00),ascii_n(2),ascii_n(167),ascii_n(8),'\0'}; + arr = code; + printf("Active Power(in W)="); + } + + int x,wr,rd; + char buf[12]; + for(x=0;x<5;x++) + { + wr=write_serial(1,arr,8); + rd = read_serial(1,buf,11); + Sleep(500); + } + buf[11]='\0'; + + //printf("%s\n",buf );//debug + + int b1=0,b2=0,b3=0,b4=0; + int myresult[12]; + int i; + for (i = 0; i < 11; ++i) + { + myresult[i]=ascii_c(buf[i]); + //printf("%d",myresult[i]);//debug + } + + //printf("%d %d %d %d\n",myresult[4],myresult[5],myresult[6],myresult[7]);//debug + + int a1=myresult[4]; + if (a1<16) + { + b1=1; + } + char v1[3]; + dec2hex(a1,v1); + if (b1) + { + sprintf(v1,"0%s",v1); + } + else + { + sprintf(v1,"%s",v1); + } + int a2=myresult[5]; + if (a2<16) + { + b2=1; + } + char v2[3]; + dec2hex(a2,v2); + if (b2) + { + sprintf(v2,"0%s",v2); + } + else + { + sprintf(v2,"%s",v2); + } + int a3=myresult[6]; + if (a3<16) + { + b3=1; + } + char v3[3]; + dec2hex(a3,v3); + if (b3) + { + sprintf(v3,"0%s",v3); + } + else + { + sprintf(v3,"%s",v3); + } + int a4=myresult[7]; + if (a4<16) + { + b4=1; + } + char v4[3]; + dec2hex(a4,v4); + if (b4) + { + sprintf(v4,"0%s",v4); + } + else + { + sprintf(v4,"%s",v4); + } + char a6[20]=""; + strcat(a6,v3); + strcat(a6,v4); + strcat(a6,v1); + strcat(a6,v2); + a6[8]='\0'; + + //printf("%s",a6);//debug + + int cl=close_serial(1); + double p=ieeesingle2num(a6); + printf("%f\n",p); + return p; +} + +//Analog reading in volts +__declspec (dllexport) __stdcall uint16_t cmd_analog_in_volt(int h,int pin_no) +{ + char pin[5],v1[2]; + int stat; + int read[3]; + sprintf(v1,"%c",pin_no+48); + strcpy(pin,"A"); + strcat(pin,v1); + int wr=write_serial(h,pin,2); + stat=status_serial(h,read); + //printf("Read:%d\n",read[0] ); + while (read[0] < 2) + stat=status_serial(h,read); + char values[5]; + int a_rd=read_serial(h,values,2); + values[2]='\0'; + //printf("%s\n",values); + int l=strlen(values); + //printf("%d\n",l ); + uint8_t temp[l+1]; + int i; + for (i = 0; i < l; ++i) + { + temp[i]=(uint8_t)(values[i]); + } + //printf("%u %u\n",temp[0],temp[1]); + uint16_t result=(uint16_t)(256*temp[1]+temp[0]); + result/=1023; + //printf("%u\n",result); + return result; +} + +__declspec (dllexport) __stdcall int cmd_analog_out_volt(int h,int pin_no,double val) +{ + char v1[2],v2[2]; + if(val > 5) + val = 5; + else if(val < 0) + val = 0; + val=val*255/5; + //printf("%f\n",val); + char code_sent[10]; + strcpy(code_sent,"W"); + sprintf(v1,"%c",pin_no+48); + sprintf(v2,"%c",abs(ceil(val))); + strcat(code_sent,v1); + strcat(code_sent,v2); + //printf("%s\n",code_sent); + return write_serial(h,code_sent,3); + +} diff --git a/tools/openmodelica/windows/SerialComm.dll b/tools/openmodelica/windows/SerialComm.dll Binary files differnew file mode 100644 index 0000000..37b83b8 --- /dev/null +++ b/tools/openmodelica/windows/SerialComm.dll diff --git a/tools/openmodelica/windows/test_firmware.mo b/tools/openmodelica/windows/test_firmware.mo new file mode 100644 index 0000000..fabe1ca --- /dev/null +++ b/tools/openmodelica/windows/test_firmware.mo @@ -0,0 +1,20 @@ +model test_firmware "Testing SerialCommunication with Arduino" + +import sComm=Arduino.SerialCommunication.Functions; +Integer h(fixed = false); +Integer byte_read(fixed = false); +//String str(fixed =false); +Integer wr(fixed =false); +Integer c_OK(fixed =false); +algorithm + when initial() then + h:=sComm.open_serial(1,2,115200); + sComm.delay(2000); + wr:=sComm.write_serial(1,"v",1); + byte_read:= sComm.read_serial(1,2); + c_OK := sComm.close_serial(1) "To close the connection safely"; + end when; + annotation( + experiment(StartTime = 0, StopTime = 50, Tolerance = 1e-6, Interval = 10)); + +end test_firmware; diff --git a/tools/openmodelica/windows/tools/arduino-firmware/arduino-firmware.ino b/tools/openmodelica/windows/tools/arduino-firmware/arduino-firmware.ino new file mode 100644 index 0000000..8d10650 --- /dev/null +++ b/tools/openmodelica/windows/tools/arduino-firmware/arduino-firmware.ino @@ -0,0 +1,795 @@ + + /* This file is meant to be used with the SCILAB arduino + toolbox, however, it can be used from the IDE environment + (or any other serial terminal) by typing commands like: + + Conversion ascii -> number + 48->'0' ... 57->'9' 58->':' 59->';' 60->'<' 61->'=' 62->'>' 63->'?' 64->'@' + 65->'A' ... 90->'Z' 91->'[' 92->'\' 93->']' 94->'^' 95->'_' 96->'`' + 97->'a' ... 122->'z' + + Dan0 or Dan1 : attach digital pin n (ascii from 2 to b) to input (0) or output (1) + Drn : read digital value (0 or 1) on pin n (ascii from 2 to b) + Dwn0 or Dwn1 : write 1 or 0 on pin n + An : reads analog pin n (ascii from 0 to 19) + Wnm : write analog value m (ascii from 0 to 255) on pin n (ascii from 0 to 19) + Sa1 or Sa2 : Attach servo 1 (digital pin 9) or 2 (digital pin 10) + Sw1n or Sw2n : moves servo 1 or servo 2 to position n (from ascii(0) to ascii(180)) + Sd1 or Sd2 : Detach servo 1 or 2 + + Generic DC_Motor + Cijkl : setup for generic DCmotor number i (1 to 4), PW1 on pin number j, PWM2 or direction on pin number k, mode=l + l=0 for L293 (2 PWM) and l=1 for L298 (1PWM + 1 bit for direction) + Mijk : sets speed for generic DCmotor number i, j=0/1 for direction, k=ascii(0) .. ascii(255) + Mir : releases motor i (r=release) + + Generic Interrupt counter + Iai : activate counter on INT number i (i=ascii(2 or 3 or 18 or 19 or 20 or 21) + Iri : release counter on INT number i + Ipi : read counter on INT number i + Izi : reset counter on INT number i + + Generic Encoder + Eajkl: activate encoder on channelA on INT number j (j=ascii(2 or 3 or 18 or 19 or 20 or 21) et channelB on pin k or INT number k (k=ascii(0)..ascii(53)) + and l=1 or 2 or 4 for 1x mode (count every rising of chA) or 2x mode (count every change statement of chA) + or 4x mode (every change statement of chA et chB) + Eri : release encoder on INTi + Epi : read position of encoder on INTi + Ezi : reset value of encoder on INTi position + + R0 : sets analog reference to DEFAULT + R1 : sets analog reference to INTERNAL + R2 : sets analog reference to EXTERNAL + + */ + +#include <Servo.h> + +/* define internal for the MEGA as 1.1V (as as for the 328) */ +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) +#define INTERNAL INTERNAL1V1 +#endif + +/* create and initialize servos */ +Servo servo1; +Servo servo2; + +/* Generic motors */ +int dcm1_pin1,dcm1_pin2,dcm1_mode; +int dcm2_pin1,dcm2_pin2,dcm2_mode; +int dcm3_pin1,dcm3_pin2,dcm3_mode; +int dcm4_pin1,dcm4_pin2,dcm4_mode; + +// Generic encoder +/* Encoders initialisation */ +// volatile declare as those variables will change in interrupts +volatile long int encoder_0_position = 0,encoder_1_position = 0, encoder_2_position = 0, encoder_3_position = 0, encoder_4_position = 0, encoder_5_position = 0; +int encoder_0_int2 ; // Pin used for encoder0 chanel B : define from scilab +int encoder_1_int2 ; // Pin used for encoder1 chanel B : define from scilab +int encoder_2_int2 ; // Pin used for encoder2 chanel B : define from scilab +int encoder_3_int2 ; // Pin used for encoder3 chanel B : define from scilab +int encoder_4_int2 ; // Pin used for encoder4 chanel B : define from scilab +int encoder_5_int2 ; // Pin used for encoder5 chanel B : define from scilab +int encoder_num, encoder_int2; +int corresp[6]={2,3,21,20,19,18}; //Correspondance beetween interrupt number and pin number + +//Generic counter +volatile long int counter_0=0,counter_1=0,counter_2=0,counter_3=0,counter_4=0,counter_5=0; + +int initiat=1; + +void setup() { + /* initialize serial */ + Serial.begin(115200); + +} +void loop() { + + + + /* variables declaration and initialization */ + + static int s = -1; /* state */ + static int pin = 13; /* generic pin number */ + static int dcm = 4; /* generic dc motor number */ + + int val = 0; /* generic value read from serial */ + int agv = 0; /* generic analog value */ + int dgv = 0; /* generic digital value */ + static int enc = 1; /* encoder number 1 (or 2 for Arduino mega) */ + + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); + + //Checking for availability of firmware + if(val==118) + { + delay(10); + Serial.write("ok"); + } + +// if (val==0){// version +// Serial.print('v3'); +// val=-1; +// } + //case A -> Analog + else if (val==65){//A -> Analog read + while (Serial.available()==0) {}; // Waiting char +// val=Serial.read(); +// if (val==114){ //'r'-> read pin +// while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>47 && val<67) { //from pin 0, to pin 19 + pin=val-48; //number of the pin + agv=analogRead(pin); + //Serial.println(agv); + Serial.write((uint8_t*)&agv,2); /* send binary value via serial */ + } + val=-1; + } + else if (val==87){//W -> Analog write + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>47 && val<67) { //from pin 0 to pin 19 + pin=val-48; //number of the pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + analogWrite(pin,val); + } + val=-1; + } + //} + + //case D -> Digital + else if (val==68){//D -> Digital pins + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==97){ //'a'-> declare pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>49 && val<102) { + pin=val-48; + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==48 || val==49) { + if (val==48){//'0' -> input + pinMode(pin,INPUT); + } + else if (val==49){//'1' -> output + pinMode(pin,OUTPUT); + } + } + } + } + if (val==114){ //'r'-> read pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>49 && val<102) { + pin=val-48; //number of the digital pin + dgv=digitalRead(pin); +// Serial.println(dgv); + Serial.print(dgv); + } + } + if (val==119){ //'w'-> write pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>49 && val<102) { + pin=val-48; //number of the digital pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==48 || val==49) { // 0 or 1 + dgv=val-48; + digitalWrite(pin,dgv); +// Serial.println(dgv); + } + } + } + val=-1; + + } + //case S -> servomotor + else if (val==83){ + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==97){ //'a'-> declare servo + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==49 || val==50) { //servo 1 or 2 + pin=val-48; //number of the servo + if (pin==1) { + servo1.attach(9); + servo1.write(0); +// agv=servo1.read(); +// Serial.println(agv); + } + if (pin==2) { + servo2.attach(10); + servo2.write(0); +// agv=servo2.read(); +// Serial.println(agv); + } + + } + } + if (val==100){ //'d'-> detach servo + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==49 || val==50) { //servo 1 or 2 + pin=val-48; //number of the servo + if (pin==1) {servo1.detach(); } + if (pin==2) {servo2.detach(); } + } + } + if (val==119){ //'w'-> write pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==49 || val==50) { //servo 1 or 2 + pin=val-48; //number of the servo + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>=0 && val<=180){ + if (pin==1) { + servo1.write(val); +// agv=servo1.read(); +// Serial.println(agv); + } + if (pin==2) { + servo2.write(val); +// agv=servo2.read(); +// Serial.println(agv); + } + } + } + } + val=-1; + + } + + //case I -> Interrupt + else if (val==73){ + /* ASKING ACTIVATION OF AN COUNTER */ + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==97) { //a = activation + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); // Read int_number (must be 0 or 1 on UNO / 1 to 5 on MEGA) : int_number set to encoder number + pinMode(corresp[val],INPUT); // set interrupt pin as input + if (val == 0) {attachInterrupt(val, counter_0_change, RISING);counter_0=0;} //counter INT0 + else if (val == 1) {attachInterrupt(val, counter_1_change, RISING);counter_1=0;} //counter INT1 + else if (val == 2) {attachInterrupt(val, counter_2_change, RISING);counter_2=0;} //counter INT2 + else if (val == 3) {attachInterrupt(val, counter_3_change, RISING);counter_3=0;} //counter INT3 + else if (val == 4) {attachInterrupt(val, counter_4_change, RISING);counter_4=0;} //counter INT4 + else if (val == 5) {attachInterrupt(val, counter_5_change, RISING);counter_5=0;} //counter INT5 + } + /* ASKING POSITION OF A COUNTER */ + if (val==112) { //p = sending counting value + while (Serial.available()==0) {}; // Waiting char + val = Serial.read() ; //reading next value = counter number + if (val==0){ Serial.write((uint8_t*)&counter_0,4); }// asking counter 0 + else if (val==1){ Serial.write((uint8_t*)&counter_1,4); }// asking counter 1 + else if (val==2){ Serial.write((uint8_t*)&counter_2,4); }// asking counter 2 + else if (val==3){ Serial.write((uint8_t*)&counter_3,4); }// asking counter 3 + else if (val==4){ Serial.write((uint8_t*)&counter_4,4); }// asking counter 4 + else if (val==5){ Serial.write((uint8_t*)&counter_5,4); }// asking counter 5 + } + /* ASKING RELEASE OF AN INTERRUPT */ + if (val==114) { //r = release counter + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); //reading next value = counter number + detachInterrupt(val); // Detach interrupt on chanel A of counter num=val + if (val==0) { counter_0=0;} // Reset counter + else if (val==1) { counter_1=0;} // Reset counter + else if (val==2) { counter_2=0;} // Reset counter + else if (val==3) { counter_3=0;} // Reset counter + else if (val==4) { counter_4=0;} // Reset counter + else if (val==5) { counter_5=0;} // Reset counter + } + /* ASKING RESET VALUE OF AN COUNTER */ + if (val==122) { //z set to zero + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); //reading next value = counter number + if (val==0) { counter_0=0;} // Reset counter + else if (val==1) { counter_1=0;} // Reset counter + else if (val==2) { counter_2=0;} // Reset counter + else if (val==3) { counter_3=0;} // Reset counter + else if (val==4) { counter_4=0;} // Reset counter + else if (val==5) { counter_5=0;} // Reset counter + } + val=-1; + + } + + //case E -> Encoder + else if (val==69){ + /*Generic encoder functions */ + while (Serial.available()==0) {}; + val=Serial.read(); + /* ASKING ACTIVATION OF AN ENCODER */ + if (val==97) { //activation + while (Serial.available()==0) {}; // Waiting char + encoder_num=Serial.read(); // Read int_number (must be 0 or 1 on UNO / 1 to 5 on MEGA) : int_number set to encoer number + pinMode(corresp[encoder_num],INPUT); // set interrupt pin as input + while (Serial.available()==0) {}; // Waiting char + encoder_int2=Serial.read(); // Read int2 (must be a digital PIN with interrupt or not : depends on mode) + // no declaration for the moment : wait for encoder mode + while (Serial.available()==0) {}; // Waiting char + int mode = Serial.read()-48; // Read mode 1 ou 2 (1 counting only rising of chA, 2 counting rising and falling) + if (mode == 4) { // mode 4x : 2 cases : chA=pin2 / chB=pin3 or chA=pin3/chB=pin2 [Uno retriction] + pinMode(corresp[encoder_int2],INPUT); // set interrupt number as input + } else { + pinMode(encoder_int2,INPUT); // set pin as input + } + + if (encoder_num == 0) { //encoder INT0 + encoder_0_position=0; // Reset position + if (mode==4) { + encoder_0_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A0, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B0, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_0_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_0_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_0_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_0_change_m1, RISING); // Attach interrupt on chanel A rising + } + } else if (encoder_num == 1) { //encoder INT1 + encoder_1_position=0; // Reset position + if (mode==4) { + encoder_1_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A1, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B1, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_1_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_1_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_1_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_1_change_m1, RISING); // Attach interrupt on chanel A rising + } + } else if (encoder_num == 2) { //encoder INT2 + encoder_2_position=0; // Reset position + if (mode==4) { + encoder_2_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A2, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B2, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_2_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_2_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_2_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_2_change_m1, RISING); // Attach interrupt on chanel A rising + } + } else if (encoder_num == 3) { //encoder INT3 + encoder_3_position=0; // Reset position + if (mode==4) { + encoder_3_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A3, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B3, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_3_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_3_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_3_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_3_change_m1, RISING); // Attach interrupt on chanel A rising + } + } else if (encoder_num == 4) { //encoder INT4 + encoder_4_position=0; // Reset position + if (mode==4) { + encoder_4_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A4, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B4, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_4_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_4_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_4_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_4_change_m1, RISING); // Attach interrupt on chanel A rising + } + } else if (encoder_num == 5) { //encoder INT5 + encoder_5_position=0; // Reset position + if (mode==4) { + encoder_5_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A5, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B5, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_5_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_5_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_5_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_5_change_m1, RISING); // Attach interrupt on chanel A rising + } + } + } + /* ASKING POSITION OF AN ENCODER */ + if (val==112) { //p = sending encoder position + while (Serial.available()==0) {}; // Waiting char + val = Serial.read() ; //reading next value = encoder number + if (val==0){ Serial.write((uint8_t*)&encoder_0_position,4); }// asking encoder 0 position + else if (val==1){ Serial.write((uint8_t*)&encoder_1_position,4); }// asking encoder 1 position + else if (val==2){ Serial.write((uint8_t*)&encoder_2_position,4); }// asking encoder 2 position + else if (val==3){ Serial.write((uint8_t*)&encoder_3_position,4); }// asking encoder 3 position + else if (val==4){ Serial.write((uint8_t*)&encoder_4_position,4); }// asking encoder 4 position + else if (val==5){ Serial.write((uint8_t*)&encoder_5_position,4); }// asking encoder 5 position + } + /* ASKING RELEASE OF AN ENCODER */ + if (val==114) { //r = release encoder + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); //reading next value = encoder number + detachInterrupt(val); // Detach interrupt on chanel A of encoder num=val + if (val==0) { encoder_0_position=0;encoder_0_int2=-1;} // Reset position + else if (val==1) { encoder_1_position=0;encoder_1_int2=-1;} // Reset position + else if (val==2) { encoder_2_position=0;encoder_2_int2=-1;} // Reset position + else if (val==3) { encoder_3_position=0;encoder_3_int2=-1;} // Reset position + else if (val==4) { encoder_4_position=0;encoder_4_int2=-1;} // Reset position + else if (val==5) { encoder_5_position=0;encoder_5_int2=-1;} // Reset position + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); // reading next value = encoder number + detachInterrupt(val); // Detach interrupt on chanel B of encoder num=val (may be the same if mode=1 or 2) + } + /* ASKING RESET POSITION OF AN ENCODER */ + if (val==122) { // z = encoder position to zero + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); //reading next value = encoder number + if (val==0) { encoder_0_position=0;} // Reset position + else if (val==1) { encoder_1_position=0;} // Reset position + else if (val==2) { encoder_2_position=0;} // Reset position + else if (val==3) { encoder_3_position=0;} // Reset position + else if (val==4) { encoder_4_position=0;} // Reset position + else if (val==5) { encoder_5_position=0;} // Reset position + } + val=-1; + + } + + //case C -> DCmotor init + else if(val==67){ + while (Serial.available()==0) {}; + val = Serial.read(); + /* 2nd char = motor number */ + if (val>48 && val<53) { + dcm=val-48; + while (Serial.available()==0) {}; + val = Serial.read(); + /* the third received value indicates the pin1 number from ascii(2)=50 to ascii(e)=101 */ + if (val>49 && val<102) { + if (dcm==1) dcm1_pin1=val-48;/* calculate motor pin1 */ + if (dcm==2) dcm2_pin1=val-48;/* calculate motor pin1 */ + if (dcm==3) dcm3_pin1=val-48;/* calculate motor pin1 */ + if (dcm==4) dcm4_pin1=val-48;/* calculate motor pin1 */ + pinMode(val-48, OUTPUT); //set pin as output + analogWrite(val-48,0); /* DUTY CYCLE */ + while (Serial.available()==0) {}; + val = Serial.read(); + /* the fourth received value indicates the pin2 number from ascii(2)=50 to ascii(e)=101 */ + if (val>49 && val<102) { + if (dcm==1) dcm1_pin2=val-48;/* calculate motor pin2 */ + if (dcm==2) dcm2_pin2=val-48;/* calculate motor pin2 */ + if (dcm==3) dcm3_pin2=val-48;/* calculate motor pin2 */ + if (dcm==4) dcm4_pin2=val-48;/* calculate motor pin2 */ + pinMode(val-48, OUTPUT); //set pin as output + while (Serial.available()==0) {}; + val = Serial.read(); + /* the fifth received value indicates the pin2 number from ascii(2)=50 to ascii(e)=101 */ + if (val>47 && val<50) { + int mode = val-48; + if (dcm==1) dcm1_mode=mode;/* calculate motor mode */ + if (dcm==2) dcm2_mode=mode;/* calculate motor mode */ + if (dcm==3) dcm3_mode=mode;/* calculate motor mode */ + if (dcm==4) dcm4_mode=mode;/* calculate motor mode */ + //initialization of port + if(mode==0){//L293 + if (dcm==1) analogWrite(dcm1_pin2,0); /* DUTY CYCLE */ + if (dcm==2) analogWrite(dcm2_pin2,0); /* DUTY CYCLE */ + if (dcm==3) analogWrite(dcm3_pin2,0); /* DUTY CYCLE */ + if (dcm==4) analogWrite(dcm4_pin2,0); /* DUTY CYCLE */ + } else if (mode==1) {//L297 + if (dcm==1) digitalWrite(dcm1_pin2, LOW); /* DIRECTION */ + if (dcm==2) digitalWrite(dcm2_pin2, LOW); /* DIRECTION */ + if (dcm==3) digitalWrite(dcm3_pin2, LOW); /* DIRECTION */ + if (dcm==4) digitalWrite(dcm4_pin2, LOW); /* DIRECTION */ + } + Serial.print("OK"); // tell Scilab that motor s initialization finished + // Cette commande sert à rien dans la toolbox de base, + // sauf si on prévoit d'ajouter des actions à l'init des moteurs + // par exemple chercher la position d'origine ! + } + } + } + } + val=-1; + + } + + //case M -> DC motor + else if(val==77){ + while (Serial.available()==0) {}; + val = Serial.read(); + /* the second received value indicates the motor number + from abs('1')=49, motor1, to abs('4')=52, motor4 */ + if (val>48 && val<53) { + dcm=val-48; /* calculate motor number */ + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); + /* the third received value indicates the sens direction or release*/ + if (val==48 || val ==49){ + int direction=val-48; + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); //reading next value = 0..255 + if (dcm==1){ + if(dcm1_mode==0){//L293 + if(direction==1){ + analogWrite(dcm1_pin1,val); + analogWrite(dcm1_pin2,0); + } else { + analogWrite(dcm1_pin2,val); + analogWrite(dcm1_pin1,0); + } + } else {//L298 + if (direction==0) digitalWrite(dcm1_pin2,LOW); + if (direction==1) digitalWrite(dcm1_pin2,HIGH); + analogWrite(dcm1_pin1,val); + } + } + if (dcm==2){ + if(dcm2_mode==0){//L293 + if(direction==1){ + analogWrite(dcm2_pin1,val); + analogWrite(dcm2_pin2,0); + } else { + analogWrite(dcm2_pin2,val); + analogWrite(dcm2_pin1,0); + } + } else {//L298 + if (direction==0) digitalWrite(dcm2_pin2,LOW); + if (direction==1) digitalWrite(dcm2_pin2,HIGH); + analogWrite(dcm2_pin1,val); + } + } + if (dcm==3){ + if(dcm3_mode==0){//L293 + if(direction==1){ + analogWrite(dcm3_pin1,val); + analogWrite(dcm3_pin2,0); + } else { + analogWrite(dcm3_pin2,val); + analogWrite(dcm3_pin1,0); + } + } else {//L298 + if (direction==0) digitalWrite(dcm3_pin2,LOW); + if (direction==1) digitalWrite(dcm3_pin2,HIGH); + analogWrite(dcm3_pin1,val); + } + } + if (dcm==4){ + if(dcm4_mode==0){//L293 + if(direction==1){ + analogWrite(dcm4_pin1,val); + analogWrite(dcm4_pin2,0); + } else { + analogWrite(dcm4_pin2,val); + analogWrite(dcm4_pin1,0); + } + } else {//L298 + if (direction==0) digitalWrite(dcm4_pin2,LOW); + if (direction==1) digitalWrite(dcm4_pin2,HIGH); + analogWrite(dcm4_pin1,val); + } + } + } + if (val==114){//release motor + if(dcm==1) { + analogWrite(dcm1_pin1,0); + if(dcm1_mode==0) analogWrite(dcm1_pin2,0); + } + if(dcm==2) { + analogWrite(dcm2_pin1,0); + if(dcm2_mode==0) analogWrite(dcm2_pin2,0); + } + if(dcm==3) { + analogWrite(dcm3_pin1,0); + if(dcm3_mode==0) analogWrite(dcm3_pin2,0); + } + if(dcm==4) { + analogWrite(dcm4_pin1,0); + if(dcm4_mode==0) analogWrite(dcm4_pin2,0); + } + } + + } + val=-1; + + } + + + //case R -> Analog reference + if(val==82){ + while (Serial.available()==0) {}; + val = Serial.read(); + if (val==48) analogReference(DEFAULT); + if (val==49) analogReference(INTERNAL); + if (val==50) analogReference(EXTERNAL); + if (val==51) Serial.print("v3"); + val=-1; + } + +} /* end loop statement */ + + +/**************************************/ +// Generic interrupt encoder functions// +/**************************************/ +//Encoder on INT0 +void encoder_0_change_m1() { //encoder0 mode 1x + int chB=digitalRead(encoder_0_int2); + if (!chB) { encoder_0_position++;} + else { encoder_0_position--; } +} +void encoder_0_change_m2() { //encoder0 mode 2x + int chB=digitalRead(encoder_0_int2); + int chA=digitalRead(corresp[0]); + if ((chA & !chB)|(!chA & chB)) { encoder_0_position++; } + else { encoder_0_position--; } +} +void encoder_change_m4_A0(){//encoder0 mode 4x chA + int chA=digitalRead(corresp[0]); + int chB=digitalRead(encoder_0_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_0_position++; } + else { encoder_0_position--; } +} +void encoder_change_m4_B0(){//encoder0 mode 4x chB + int chA=digitalRead(corresp[0]); + int chB=digitalRead(encoder_0_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_0_position++; } + else { encoder_0_position--; } +} +//Encoder on INT1 +void encoder_1_change_m1() { //encoder1 mode 1x + int chB=digitalRead(encoder_1_int2); + if (!chB) { encoder_1_position++;} + else { encoder_1_position--; } +} +void encoder_1_change_m2() { //encoder1 mode 2x + int chB=digitalRead(encoder_1_int2); + int chA=digitalRead(corresp[1]); + if ((chA & !chB)|(!chA & chB)) { encoder_1_position++; } + else { encoder_1_position--; } +} +void encoder_change_m4_A1(){//encoder1 mode 4x chA + int chA=digitalRead(corresp[1]); + int chB=digitalRead(encoder_1_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_1_position++; } + else { encoder_1_position--; } +} +void encoder_change_m4_B1(){//encoder1 mode 4x chB + int chA=digitalRead(corresp[1]); + int chB=digitalRead(encoder_1_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_1_position++; } + else { encoder_1_position--; } +} +//Encoder on INT2 +void encoder_2_change_m1() { //encoder2 mode 1x + int chB=digitalRead(encoder_2_int2); + if (!chB) { encoder_2_position++;} + else { encoder_2_position--; } +} +void encoder_2_change_m2() { //encoder2 mode 2x + int chB=digitalRead(encoder_2_int2); + int chA=digitalRead(corresp[2]); + if ((chA & !chB)|(!chA & chB)) { encoder_2_position++; } + else { encoder_2_position--; } +} +void encoder_change_m4_A2(){//encoder2 mode 4x chA + int chA=digitalRead(corresp[2]); + int chB=digitalRead(encoder_2_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_2_position++; } + else { encoder_2_position--; } +} +void encoder_change_m4_B2(){//encoder2 mode 4x chB + int chA=digitalRead(corresp[2]); + int chB=digitalRead(encoder_2_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_2_position++; } + else { encoder_2_position--; } +} +//Encoder on INT3 +void encoder_3_change_m1() { //encoder3 mode 1x + int chB=digitalRead(encoder_3_int2); + if (!chB) { encoder_3_position++;} + else { encoder_3_position--; } +} +void encoder_3_change_m2() { //encoder3 mode 2x + int chB=digitalRead(encoder_3_int2); + int chA=digitalRead(corresp[3]); + if ((chA & !chB)|(!chA & chB)) { encoder_3_position++; } + else { encoder_3_position--; } +} +void encoder_change_m4_A3(){//encoder3 mode 4x chA + int chA=digitalRead(corresp[3]); + int chB=digitalRead(encoder_3_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_3_position++; } + else { encoder_3_position--; } +} +void encoder_change_m4_B3(){//encoder3 mode 4x chB + int chA=digitalRead(corresp[3]); + int chB=digitalRead(encoder_3_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_3_position++; } + else { encoder_3_position--; } +} +//Encoder on INT4 +void encoder_4_change_m1() { //encoder4 mode 1x + int chB=digitalRead(encoder_4_int2); + if (!chB) { encoder_4_position++;} + else { encoder_4_position--; } +} +void encoder_4_change_m2() { //encoder4 mode 2x + int chB=digitalRead(encoder_4_int2); + int chA=digitalRead(corresp[4]); + if ((chA & !chB)|(!chA & chB)) { encoder_4_position++; } + else { encoder_4_position--; } +} +void encoder_change_m4_A4(){//encoder4 mode 4x chA + int chA=digitalRead(corresp[4]); + int chB=digitalRead(encoder_4_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_4_position++; } + else { encoder_4_position--; } +} +void encoder_change_m4_B4(){//encoder4 mode 4x chB + int chA=digitalRead(corresp[4]); + int chB=digitalRead(encoder_4_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_4_position++; } + else { encoder_4_position--; } +} +//Encoder on INT5 +void encoder_5_change_m1() { //encoder5 mode 1x + int chB=digitalRead(encoder_5_int2); + if (!chB) { encoder_5_position++;} + else { encoder_5_position--; } +} +void encoder_5_change_m2() { //encoder5 mode 2x + int chB=digitalRead(encoder_5_int2); + int chA=digitalRead(corresp[5]); + if ((chA & !chB)|(!chA & chB)) { encoder_5_position++; } + else { encoder_5_position--; } +} +void encoder_change_m4_A5(){//encoder5 mode 4x chA + int chA=digitalRead(corresp[5]); + int chB=digitalRead(encoder_5_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_5_position++; } + else { encoder_5_position--; } +} +void encoder_change_m4_B5(){//encoder5 mode 4x chB + int chA=digitalRead(corresp[5]); + int chB=digitalRead(encoder_5_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_5_position++; } + else { encoder_5_position--; } +} + +/**************************************/ +// Generic interrupt counter functions// +/**************************************/ +//Counter on INT0 +void counter_0_change() { //counter 0 + counter_0++; +} +//Counter on INT1 +void counter_1_change() { //counter 1 + counter_1++; +} +//Counter on INT2 +void counter_2_change() { //counter 2 + counter_2++; +} +//Counter on INT3 +void counter_3_change() { //counter 3 + counter_3++; +} +//Counter on INT4 +void counter_4_change() { //counter 4 + counter_4++; +} +//Counter on INT5 +void counter_5_change() { //counter 5 + counter_5++; +} + + diff --git a/tools/python/Arduino/Arduino.py b/tools/python/Arduino/Arduino.py new file mode 100644 index 0000000..5d2b5c6 --- /dev/null +++ b/tools/python/Arduino/Arduino.py @@ -0,0 +1,331 @@ + +import sys +import serial +from serial import Serial +from serial.tools.list_ports import comports +from time import sleep + +p1=0 #Initial Position of servo motor +p2=0 #Final Position of servo motor + +a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] +class Initialization: + def __init__(self): + pass + + def locateport(self): + if sys.platform.startswith('win'): + port ='' + ports = list(comports()) + for i in ports: + for j in i: + if 'Arduino' in j: + port = i[0] + elif sys.platform.startswith('linux'): + b=[] + port ='' + ports = list(comports()) + for i in range(len(ports)): + for x in range(7): + portname="/dev/ttyACM"+str(x) + if ports[i][0]==portname: + b.append(ports[i][0]) + port=b[0] + return port + + def open_serial(self,ard_no, PortNo,baudrate): + #global ser + if PortNo =='': + sys.exit("aa..error..! arduino not found") + else: + self.ser = Serial(PortNo,baudrate) + sleep(2) + # self.checkfirmware() + + def close_serial(self): + #global ser + self.ser.close() + + def checkfirmware(self): + print ("Check Firm Ware") + #global ser + i = 0 + while i < 3: + self.ser.write(bytes([118])) #chr(118) + try: + x=self.ser.read(2) + print(x.decode('UTF-8')) + #x=self.ser.read() + #print(x) + # if x==b'o': + # try: + # # x=self.ser.read() + # # print(x.decode('UTF-8')) + # except: + # sys.exit("aa..! error..! it seems correct firmware not loaded") + # else: + # sys.exit("aa..! error..! it seems correct firmware not loaded") + except: + sys.exit("aa..! error..! it seems correct firmware not loaded") + i = i + 1 + + +class Arduino(Initialization): + def __init__(self): + print ("Init Arduino") + #self.baudrate=0 + #self.ard_no=1 + #self.PortNo=0 + #self.pin=0 + #self.val=0 + #self.mode=0 + #self.mno=0 + #self.pin1=0 + #self.pin2=0 + #self.servo=0 + + + + def cmd_digital_out(self,ard_no,pin,val): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="D"+"a"+a[pin]+"1" + self.ser.write(cmd.encode('utf-8')) + cmd="" + cmd="D"+"w"+a[pin]+str(val) + self.ser.write(cmd.encode('utf-8')) + + def cmd_digital_in(self,ard_no,pin): + b=[] + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="D"+"a"+a[pin]+"0" + self.ser.write(cmd.encode('utf-8')) + cmd="" + cmd="D"+"r"+a[pin] + self.ser.write(cmd.encode('utf-8')) + a=self.ser.read() + return(a.decode('UTF-8')) + + def cmd_analog_in(self,ard_no,pin): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="A"+a[pin] + self.ser.write(cmd.encode('utf-8')) + analog_times=[] + b1=ord(self.ser.read(1)) + b2=ord(self.ser.read(1)) + a=b1+b2*256 + #a=ser.read() + return(a) + #return(int((1023-0)*int(ord(a))/(255-0))) + + + def cmd_analog_out(self,ard_no, pin, val): + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd = "W" + a[pin] + chr(val) + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_setup(self,ard_no,mode,mno,pin1,pin2): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="C"+a[mno]+a[pin1]+a[pin2]+a[mode] + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_run(self,ard_no,mno,val): + cmd="" + if(val <0): + dirc=0 + else: + dirc=1 + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="M"+a[mno]+a[dirc]+chr(abs(val)) + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_release(self,ard_no,mno): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="M"+a[mno]+"r" + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_attach(self,ard_no,servo): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"a"+a[servo] + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_detach(self,ard_no,servo): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"d"+a[servo] + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_move(self,ard_no,servo,angle): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"w"+a[servo]+chr(angle) + self.ser.write(cmd.encode('utf-8')) + + + + +#For PISO shift register + def cmd_shift_in(self,dataPin,clockPin,ledPin,clockLed): + value=[0 for _ in range(0,8)] + #print value + value2=[value for _ in range(0,8)] + #print value2 + for i in range(0,8): + so= self.cmd_digital_in(1,dataPin) #Reads serial out of IC + print (so) + if so=='1': + self.cmd_digital_out(1,ledPin,1) + sleep(0.1) + else: + self.cmd_digital_out(1,ledPin,0) + sleep(0.1) + value2[i][i]=int(so) + #performs value=value|value2[i] + for j in range(0,8): + if value[j]==1 or value2[i][j]==1: + value[j]=1 + else: + value[j]=0 + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockLed,1) + sleep(0.5) + self.cmd_digital_out(1,clockPin,0) + self.cmd_digital_out(1,clockLed,0) #clockLED: Led indicating clock pulses + sleep(0.4) + #after every clock pulse, 1 right shift occurs for every bit + #thus after 8 clock pulses, the entire parallel input is shifted out, + #and obtained at the dataPin, one bit per clock pulse + #Thus we get the bit by bit serial output of the Parallel Load + print (value) + + + + +#For PISO shift register +#shift in for n bits + def cmd_shift_in_n(self,dataPin,clockPin,ledPin,clockLed,numBits): + n=numBits #no. of bits + value=[0 for _ in range(0,n)] #a list of n elements, all 0s, to store the n bits of the inputs together + value2=[value for _ in range(0,n)] #a list of lists, analogous to nxn array of all 0s + for i in range(0,n): #n iterations since n bit input is given + so=self.cmd_digital_in(1,dataPin) + if so=='1': + self.cmd_digital_out(1,ledPin,1) + sleep(0.1) + else: + self.cmd_digital_out(1,ledPin,0) + sleep(0.1) + value2[i][i]=int(so) + #performs value=value|value2[i] + for j in range(0,n): + if value[j]==1 or value2[i][j]==1: + value[j]=1 + else: + value[j]=0 + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockLed,1) + sleep(0.5) + self.cmd_digital_out(1,clockPin,0) + self.cmd_digital_out(1,clockLed,0) #clockLED: Led indicating clock pulses + sleep(0.4) + print (value) + + + + + +#For SIPO shift register + def cmd_shift_out(self,dataPin,clockPin,bitOrder,val): + val2=0 + mat=[] + if bitOrder=='MSBFIRST': + #to create identity matrix + for i in range(0,8): + matsub=[0 for _ in range(0,8)] + matsub[i]=1 + mat.append(matsub) + else: + #to create horizontally flipped identity matrix + for i in range(0,8): + matsub=[0 for _ in range(0,8)] + matsub[7-i]=1 + mat.append(matsub) + for i in range(0,8): + #performs & operation on corresponding elements of list + for x,y in zip(val,mat[i]): + if x==1 and y==1: + val2=1 + break + else: + val2=0 + self.cmd_digital_out(1,dataPin,val2) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + + + +#For SIPO shift register + def cmd_shift_out_(self,dataPin,clockPin,inPin): + print ("Give serial input: ") + sleep(0.25) + self.cmd_digital_out(1,dataPin,self.cmd_digital_in(1,inPin)) #if inPin is HIGH, + #i.e. if input is given, write HIGH on Serial In Pin of IC + print("Serial input stored: ") + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) #One clock pulse + sleep(0.15) + + + + + +#For SIPO shift register +#shift out for n bits + def cmd_shift_out_n(self,dataPin,clockPin,bitOrder,val,numBits): + n=int(numBits) #number of bits + if (n%8)==0: + p=n + else: + p=(8*(n/8))+8 + val1=[0 for _ in range(0,n)] #output matrix. + #If all elements of the matrix are 0, + #output pinstate will be 0 (i.e LOW). + #If 1 or more elements of the matrix is 1, + #output pinstate will be 1 (i.e HIGH) + val2=0 + mat=[] + if bitOrder=='MSBFIRST': + for i in range(0,n): + matsub=[0 for _ in range(0,n)] + matsub[i]=1 + mat.append(matsub) + else: + for i in range(0,n): + matsub=[0 for _ in range(0,n)] + matsub[(n-1)-i]=1 + mat.append(matsub) + for j in range(0,(p-n)): #do nothing for the first (p-n) clock pulses + self.cmd_digital_out(1,dataPin,0) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + for i in range(0,n): #shift for last n clock pulses + #to perform val & mat[i] + for x,y in zip(val,mat[i]): + if x==1 and y==1: + val2=1 + break + else: + val2=0 + print (val2,) + self.cmd_digital_out(1,dataPin,val2) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + + + + diff --git a/tools/python/Arduino/__init__.py b/tools/python/Arduino/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/python/Arduino/__init__.py diff --git a/tools/python/Arduino/__pycache__/Arduino.cpython-36.pyc b/tools/python/Arduino/__pycache__/Arduino.cpython-36.pyc Binary files differnew file mode 100644 index 0000000..2065df9 --- /dev/null +++ b/tools/python/Arduino/__pycache__/Arduino.cpython-36.pyc diff --git a/tools/python/Arduino/__pycache__/Arduino.cpython-38.pyc b/tools/python/Arduino/__pycache__/Arduino.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..6761fc7 --- /dev/null +++ b/tools/python/Arduino/__pycache__/Arduino.cpython-38.pyc diff --git a/tools/python/Arduino/__pycache__/__init__.cpython-36.pyc b/tools/python/Arduino/__pycache__/__init__.cpython-36.pyc Binary files differnew file mode 100644 index 0000000..19c20eb --- /dev/null +++ b/tools/python/Arduino/__pycache__/__init__.cpython-36.pyc diff --git a/tools/python/Arduino/__pycache__/__init__.cpython-38.pyc b/tools/python/Arduino/__pycache__/__init__.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..ccbb74a --- /dev/null +++ b/tools/python/Arduino/__pycache__/__init__.cpython-38.pyc diff --git a/user-code/led/python/test_firmware.py b/tools/python/test_firmware.py index 48e81e6..48e81e6 100644 --- a/user-code/led/python/test_firmware.py +++ b/tools/python/test_firmware.py diff --git a/tools/scilab/arduino-firmware/arduino-firmware.ino b/tools/scilab/arduino-firmware/arduino-firmware.ino new file mode 100644 index 0000000..f96af69 --- /dev/null +++ b/tools/scilab/arduino-firmware/arduino-firmware.ino @@ -0,0 +1,794 @@ +/* This file is meant to be used with the SCILAB arduino + toolbox, however, it can be used from the IDE environment + (or any other serial terminal) by typing commands like: + + Conversion ascii -> number + 48->'0' ... 57->'9' 58->':' 59->';' 60->'<' 61->'=' 62->'>' 63->'?' 64->'@' + 65->'A' ... 90->'Z' 91->'[' 92->'\' 93->']' 94->'^' 95->'_' 96->'`' + 97->'a' ... 122->'z' + + Dan0 or Dan1 : attach digital pin n (ascii from 2 to b) to input (0) or output (1) + Drn : read digital value (0 or 1) on pin n (ascii from 2 to b) + Dwn0 or Dwn1 : write 1 or 0 on pin n + An : reads analog pin n (ascii from 0 to 19) + Wnm : write analog value m (ascii from 0 to 255) on pin n (ascii from 0 to 19) + Sa1 or Sa2 : Attach servo 1 (digital pin 9) or 2 (digital pin 10) + Sw1n or Sw2n : moves servo 1 or servo 2 to position n (from ascii(0) to ascii(180)) + Sd1 or Sd2 : Detach servo 1 or 2 + + Generic DC_Motor + Cijkl : setup for generic DCmotor number i (1 to 4), PW1 on pin number j, PWM2 or direction on pin number k, mode=l + l=0 for L293 (2 PWM) and l=1 for L298 (1PWM + 1 bit for direction) + Mijk : sets speed for generic DCmotor number i, j=0/1 for direction, k=ascii(0) .. ascii(255) + Mir : releases motor i (r=release) + + Generic Interrupt counter + Iai : activate counter on INT number i (i=ascii(2 or 3 or 18 or 19 or 20 or 21) + Iri : release counter on INT number i + Ipi : read counter on INT number i + Izi : reset counter on INT number i + + Generic Encoder + Eajkl: activate encoder on channelA on INT number j (j=ascii(2 or 3 or 18 or 19 or 20 or 21) et channelB on pin k or INT number k (k=ascii(0)..ascii(53)) + and l=1 or 2 or 4 for 1x mode (count every rising of chA) or 2x mode (count every change statement of chA) + or 4x mode (every change statement of chA et chB) + Eri : release encoder on INTi + Epi : read position of encoder on INTi + Ezi : reset value of encoder on INTi position + + R0 : sets analog reference to DEFAULT + R1 : sets analog reference to INTERNAL + R2 : sets analog reference to EXTERNAL + + */ + +#include <Servo.h> + +/* define internal for the MEGA as 1.1V (as as for the 328) */ +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) +#define INTERNAL INTERNAL1V1 +#endif + +/* create and initialize servos */ +Servo servo1; +Servo servo2; + +/* Generic motors */ +int dcm1_pin1,dcm1_pin2,dcm1_mode; +int dcm2_pin1,dcm2_pin2,dcm2_mode; +int dcm3_pin1,dcm3_pin2,dcm3_mode; +int dcm4_pin1,dcm4_pin2,dcm4_mode; + +// Generic encoder +/* Encoders initialisation */ +// volatile declare as those variables will change in interrupts +volatile long int encoder_0_position = 0,encoder_1_position = 0, encoder_2_position = 0, encoder_3_position = 0, encoder_4_position = 0, encoder_5_position = 0; +int encoder_0_int2 ; // Pin used for encoder0 chanel B : define from scilab +int encoder_1_int2 ; // Pin used for encoder1 chanel B : define from scilab +int encoder_2_int2 ; // Pin used for encoder2 chanel B : define from scilab +int encoder_3_int2 ; // Pin used for encoder3 chanel B : define from scilab +int encoder_4_int2 ; // Pin used for encoder4 chanel B : define from scilab +int encoder_5_int2 ; // Pin used for encoder5 chanel B : define from scilab +int encoder_num, encoder_int2; +int corresp[6]={2,3,21,20,19,18}; //Correspondance beetween interrupt number and pin number + +//Generic counter +volatile long int counter_0=0,counter_1=0,counter_2=0,counter_3=0,counter_4=0,counter_5=0; + +int initiat=1; + +void setup() { + /* initialize serial */ + Serial.begin(115200); + +} +void loop() { + + + + /* variables declaration and initialization */ + + static int s = -1; /* state */ + static int pin = 13; /* generic pin number */ + static int dcm = 4; /* generic dc motor number */ + + int val = 0; /* generic value read from serial */ + int agv = 0; /* generic analog value */ + int dgv = 0; /* generic digital value */ + static int enc = 1; /* encoder number 1 (or 2 for Arduino mega) */ + + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); + + //Checking for availability of firmware + if(val==118) + { + delay(10); + Serial.write("ok"); + } + +// if (val==0){// version +// Serial.print('v3'); +// val=-1; +// } + //case A -> Analog + else if (val==65){//A -> Analog read + while (Serial.available()==0) {}; // Waiting char +// val=Serial.read(); +// if (val==114){ //'r'-> read pin +// while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>47 && val<67) { //from pin 0, to pin 19 + pin=val-48; //number of the pin + agv=analogRead(pin); + //Serial.println(agv); + Serial.write((uint8_t*)&agv,2); /* send binary value via serial */ + } + val=-1; + } + else if (val==87){//W -> Analog write + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>47 && val<67) { //from pin 0 to pin 19 + pin=val-48; //number of the pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + analogWrite(pin,val); + } + val=-1; + } + //} + + //case D -> Digital + else if (val==68){//D -> Digital pins + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==97){ //'a'-> declare pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>49 && val<102) { + pin=val-48; + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==48 || val==49) { + if (val==48){//'0' -> input + pinMode(pin,INPUT); + } + else if (val==49){//'1' -> output + pinMode(pin,OUTPUT); + } + } + } + } + if (val==114){ //'r'-> read pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>49 && val<102) { + pin=val-48; //number of the digital pin + dgv=digitalRead(pin); +// Serial.println(dgv); + Serial.print(dgv); + } + } + if (val==119){ //'w'-> write pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>49 && val<102) { + pin=val-48; //number of the digital pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==48 || val==49) { // 0 or 1 + dgv=val-48; + digitalWrite(pin,dgv); +// Serial.println(dgv); + } + } + } + val=-1; + + } + //case S -> servomotor + else if (val==83){ + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==97){ //'a'-> declare servo + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==49 || val==50) { //servo 1 or 2 + pin=val-48; //number of the servo + if (pin==1) { + servo1.attach(9); + servo1.write(0); +// agv=servo1.read(); +// Serial.println(agv); + } + if (pin==2) { + servo2.attach(10); + servo2.write(0); +// agv=servo2.read(); +// Serial.println(agv); + } + + } + } + if (val==100){ //'d'-> detach servo + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==49 || val==50) { //servo 1 or 2 + pin=val-48; //number of the servo + if (pin==1) {servo1.detach(); } + if (pin==2) {servo2.detach(); } + } + } + if (val==119){ //'w'-> write pin + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==49 || val==50) { //servo 1 or 2 + pin=val-48; //number of the servo + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val>=0 && val<=180){ + if (pin==1) { + servo1.write(val); +// agv=servo1.read(); +// Serial.println(agv); + } + if (pin==2) { + servo2.write(val); +// agv=servo2.read(); +// Serial.println(agv); + } + } + } + } + val=-1; + + } + + //case I -> Interrupt + else if (val==73){ + /* ASKING ACTIVATION OF AN COUNTER */ + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); + if (val==97) { //a = activation + while (Serial.available()==0) {}; // Waiting char + val=Serial.read(); // Read int_number (must be 0 or 1 on UNO / 1 to 5 on MEGA) : int_number set to encoder number + pinMode(corresp[val],INPUT); // set interrupt pin as input + if (val == 0) {attachInterrupt(val, counter_0_change, RISING);counter_0=0;} //counter INT0 + else if (val == 1) {attachInterrupt(val, counter_1_change, RISING);counter_1=0;} //counter INT1 + else if (val == 2) {attachInterrupt(val, counter_2_change, RISING);counter_2=0;} //counter INT2 + else if (val == 3) {attachInterrupt(val, counter_3_change, RISING);counter_3=0;} //counter INT3 + else if (val == 4) {attachInterrupt(val, counter_4_change, RISING);counter_4=0;} //counter INT4 + else if (val == 5) {attachInterrupt(val, counter_5_change, RISING);counter_5=0;} //counter INT5 + } + /* ASKING POSITION OF A COUNTER */ + if (val==112) { //p = sending counting value + while (Serial.available()==0) {}; // Waiting char + val = Serial.read() ; //reading next value = counter number + if (val==0){ Serial.write((uint8_t*)&counter_0,4); }// asking counter 0 + else if (val==1){ Serial.write((uint8_t*)&counter_1,4); }// asking counter 1 + else if (val==2){ Serial.write((uint8_t*)&counter_2,4); }// asking counter 2 + else if (val==3){ Serial.write((uint8_t*)&counter_3,4); }// asking counter 3 + else if (val==4){ Serial.write((uint8_t*)&counter_4,4); }// asking counter 4 + else if (val==5){ Serial.write((uint8_t*)&counter_5,4); }// asking counter 5 + } + /* ASKING RELEASE OF AN INTERRUPT */ + if (val==114) { //r = release counter + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); //reading next value = counter number + detachInterrupt(val); // Detach interrupt on chanel A of counter num=val + if (val==0) { counter_0=0;} // Reset counter + else if (val==1) { counter_1=0;} // Reset counter + else if (val==2) { counter_2=0;} // Reset counter + else if (val==3) { counter_3=0;} // Reset counter + else if (val==4) { counter_4=0;} // Reset counter + else if (val==5) { counter_5=0;} // Reset counter + } + /* ASKING RESET VALUE OF AN COUNTER */ + if (val==122) { //z set to zero + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); //reading next value = counter number + if (val==0) { counter_0=0;} // Reset counter + else if (val==1) { counter_1=0;} // Reset counter + else if (val==2) { counter_2=0;} // Reset counter + else if (val==3) { counter_3=0;} // Reset counter + else if (val==4) { counter_4=0;} // Reset counter + else if (val==5) { counter_5=0;} // Reset counter + } + val=-1; + + } + + //case E -> Encoder + else if (val==69){ + /*Generic encoder functions */ + while (Serial.available()==0) {}; + val=Serial.read(); + /* ASKING ACTIVATION OF AN ENCODER */ + if (val==97) { //activation + while (Serial.available()==0) {}; // Waiting char + encoder_num=Serial.read(); // Read int_number (must be 0 or 1 on UNO / 1 to 5 on MEGA) : int_number set to encoer number + pinMode(corresp[encoder_num],INPUT); // set interrupt pin as input + while (Serial.available()==0) {}; // Waiting char + encoder_int2=Serial.read(); // Read int2 (must be a digital PIN with interrupt or not : depends on mode) + // no declaration for the moment : wait for encoder mode + while (Serial.available()==0) {}; // Waiting char + int mode = Serial.read()-48; // Read mode 1 ou 2 (1 counting only rising of chA, 2 counting rising and falling) + if (mode == 4) { // mode 4x : 2 cases : chA=pin2 / chB=pin3 or chA=pin3/chB=pin2 [Uno retriction] + pinMode(corresp[encoder_int2],INPUT); // set interrupt number as input + } else { + pinMode(encoder_int2,INPUT); // set pin as input + } + + if (encoder_num == 0) { //encoder INT0 + encoder_0_position=0; // Reset position + if (mode==4) { + encoder_0_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A0, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B0, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_0_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_0_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_0_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_0_change_m1, RISING); // Attach interrupt on chanel A rising + } + } else if (encoder_num == 1) { //encoder INT1 + encoder_1_position=0; // Reset position + if (mode==4) { + encoder_1_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A1, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B1, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_1_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_1_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_1_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_1_change_m1, RISING); // Attach interrupt on chanel A rising + } + } else if (encoder_num == 2) { //encoder INT2 + encoder_2_position=0; // Reset position + if (mode==4) { + encoder_2_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A2, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B2, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_2_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_2_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_2_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_2_change_m1, RISING); // Attach interrupt on chanel A rising + } + } else if (encoder_num == 3) { //encoder INT3 + encoder_3_position=0; // Reset position + if (mode==4) { + encoder_3_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A3, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B3, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_3_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_3_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_3_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_3_change_m1, RISING); // Attach interrupt on chanel A rising + } + } else if (encoder_num == 4) { //encoder INT4 + encoder_4_position=0; // Reset position + if (mode==4) { + encoder_4_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A4, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B4, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_4_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_4_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_4_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_4_change_m1, RISING); // Attach interrupt on chanel A rising + } + } else if (encoder_num == 5) { //encoder INT5 + encoder_5_position=0; // Reset position + if (mode==4) { + encoder_5_int2=corresp[encoder_int2]; // Save pin of second interruption + attachInterrupt(encoder_num , encoder_change_m4_A5, CHANGE); // Attach interrupt on chanel A change + attachInterrupt(encoder_int2, encoder_change_m4_B5, CHANGE); // Attach interrupt on chanel B change + } else if (mode==2) { + encoder_5_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_5_change_m2, CHANGE); // Attach interrupt on chanel A change + } else if (mode==1) { + encoder_5_int2=encoder_int2; + attachInterrupt(encoder_num, encoder_5_change_m1, RISING); // Attach interrupt on chanel A rising + } + } + } + /* ASKING POSITION OF AN ENCODER */ + if (val==112) { //p = sending encoder position + while (Serial.available()==0) {}; // Waiting char + val = Serial.read() ; //reading next value = encoder number + if (val==0){ Serial.write((uint8_t*)&encoder_0_position,4); }// asking encoder 0 position + else if (val==1){ Serial.write((uint8_t*)&encoder_1_position,4); }// asking encoder 1 position + else if (val==2){ Serial.write((uint8_t*)&encoder_2_position,4); }// asking encoder 2 position + else if (val==3){ Serial.write((uint8_t*)&encoder_3_position,4); }// asking encoder 3 position + else if (val==4){ Serial.write((uint8_t*)&encoder_4_position,4); }// asking encoder 4 position + else if (val==5){ Serial.write((uint8_t*)&encoder_5_position,4); }// asking encoder 5 position + } + /* ASKING RELEASE OF AN ENCODER */ + if (val==114) { //r = release encoder + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); //reading next value = encoder number + detachInterrupt(val); // Detach interrupt on chanel A of encoder num=val + if (val==0) { encoder_0_position=0;encoder_0_int2=-1;} // Reset position + else if (val==1) { encoder_1_position=0;encoder_1_int2=-1;} // Reset position + else if (val==2) { encoder_2_position=0;encoder_2_int2=-1;} // Reset position + else if (val==3) { encoder_3_position=0;encoder_3_int2=-1;} // Reset position + else if (val==4) { encoder_4_position=0;encoder_4_int2=-1;} // Reset position + else if (val==5) { encoder_5_position=0;encoder_5_int2=-1;} // Reset position + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); // reading next value = encoder number + detachInterrupt(val); // Detach interrupt on chanel B of encoder num=val (may be the same if mode=1 or 2) + } + /* ASKING RESET POSITION OF AN ENCODER */ + if (val==122) { // z = encoder position to zero + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); //reading next value = encoder number + if (val==0) { encoder_0_position=0;} // Reset position + else if (val==1) { encoder_1_position=0;} // Reset position + else if (val==2) { encoder_2_position=0;} // Reset position + else if (val==3) { encoder_3_position=0;} // Reset position + else if (val==4) { encoder_4_position=0;} // Reset position + else if (val==5) { encoder_5_position=0;} // Reset position + } + val=-1; + + } + + //case C -> DCmotor init + else if(val==67){ + while (Serial.available()==0) {}; + val = Serial.read(); + /* 2nd char = motor number */ + if (val>48 && val<53) { + dcm=val-48; + while (Serial.available()==0) {}; + val = Serial.read(); + /* the third received value indicates the pin1 number from ascii(2)=50 to ascii(e)=101 */ + if (val>49 && val<102) { + if (dcm==1) dcm1_pin1=val-48;/* calculate motor pin1 */ + if (dcm==2) dcm2_pin1=val-48;/* calculate motor pin1 */ + if (dcm==3) dcm3_pin1=val-48;/* calculate motor pin1 */ + if (dcm==4) dcm4_pin1=val-48;/* calculate motor pin1 */ + pinMode(val-48, OUTPUT); //set pin as output + analogWrite(val-48,0); /* DUTY CYCLE */ + while (Serial.available()==0) {}; + val = Serial.read(); + /* the fourth received value indicates the pin2 number from ascii(2)=50 to ascii(e)=101 */ + if (val>49 && val<102) { + if (dcm==1) dcm1_pin2=val-48;/* calculate motor pin2 */ + if (dcm==2) dcm2_pin2=val-48;/* calculate motor pin2 */ + if (dcm==3) dcm3_pin2=val-48;/* calculate motor pin2 */ + if (dcm==4) dcm4_pin2=val-48;/* calculate motor pin2 */ + pinMode(val-48, OUTPUT); //set pin as output + while (Serial.available()==0) {}; + val = Serial.read(); + /* the fifth received value indicates the pin2 number from ascii(2)=50 to ascii(e)=101 */ + if (val>47 && val<50) { + int mode = val-48; + if (dcm==1) dcm1_mode=mode;/* calculate motor mode */ + if (dcm==2) dcm2_mode=mode;/* calculate motor mode */ + if (dcm==3) dcm3_mode=mode;/* calculate motor mode */ + if (dcm==4) dcm4_mode=mode;/* calculate motor mode */ + //initialization of port + if(mode==0){//L293 + if (dcm==1) analogWrite(dcm1_pin2,0); /* DUTY CYCLE */ + if (dcm==2) analogWrite(dcm2_pin2,0); /* DUTY CYCLE */ + if (dcm==3) analogWrite(dcm3_pin2,0); /* DUTY CYCLE */ + if (dcm==4) analogWrite(dcm4_pin2,0); /* DUTY CYCLE */ + } else if (mode==1) {//L297 + if (dcm==1) digitalWrite(dcm1_pin2, LOW); /* DIRECTION */ + if (dcm==2) digitalWrite(dcm2_pin2, LOW); /* DIRECTION */ + if (dcm==3) digitalWrite(dcm3_pin2, LOW); /* DIRECTION */ + if (dcm==4) digitalWrite(dcm4_pin2, LOW); /* DIRECTION */ + } + Serial.print("OK"); // tell Scilab that motor s initialization finished + // Cette commande sert à rien dans la toolbox de base, + // sauf si on prévoit d'ajouter des actions à l'init des moteurs + // par exemple chercher la position d'origine ! + } + } + } + } + val=-1; + + } + + //case M -> DC motor + else if(val==77){ + while (Serial.available()==0) {}; + val = Serial.read(); + /* the second received value indicates the motor number + from abs('1')=49, motor1, to abs('4')=52, motor4 */ + if (val>48 && val<53) { + dcm=val-48; /* calculate motor number */ + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); + /* the third received value indicates the sens direction or release*/ + if (val==48 || val ==49){ + int direction=val-48; + while (Serial.available()==0) {}; // Waiting char + val = Serial.read(); //reading next value = 0..255 + if (dcm==1){ + if(dcm1_mode==0){//L293 + if(direction==1){ + analogWrite(dcm1_pin1,val); + analogWrite(dcm1_pin2,0); + } else { + analogWrite(dcm1_pin2,val); + analogWrite(dcm1_pin1,0); + } + } else {//L298 + if (direction==0) digitalWrite(dcm1_pin2,LOW); + if (direction==1) digitalWrite(dcm1_pin2,HIGH); + analogWrite(dcm1_pin1,val); + } + } + if (dcm==2){ + if(dcm2_mode==0){//L293 + if(direction==1){ + analogWrite(dcm2_pin1,val); + analogWrite(dcm2_pin2,0); + } else { + analogWrite(dcm2_pin2,val); + analogWrite(dcm2_pin1,0); + } + } else {//L298 + if (direction==0) digitalWrite(dcm2_pin2,LOW); + if (direction==1) digitalWrite(dcm2_pin2,HIGH); + analogWrite(dcm2_pin1,val); + } + } + if (dcm==3){ + if(dcm3_mode==0){//L293 + if(direction==1){ + analogWrite(dcm3_pin1,val); + analogWrite(dcm3_pin2,0); + } else { + analogWrite(dcm3_pin2,val); + analogWrite(dcm3_pin1,0); + } + } else {//L298 + if (direction==0) digitalWrite(dcm3_pin2,LOW); + if (direction==1) digitalWrite(dcm3_pin2,HIGH); + analogWrite(dcm3_pin1,val); + } + } + if (dcm==4){ + if(dcm4_mode==0){//L293 + if(direction==1){ + analogWrite(dcm4_pin1,val); + analogWrite(dcm4_pin2,0); + } else { + analogWrite(dcm4_pin2,val); + analogWrite(dcm4_pin1,0); + } + } else {//L298 + if (direction==0) digitalWrite(dcm4_pin2,LOW); + if (direction==1) digitalWrite(dcm4_pin2,HIGH); + analogWrite(dcm4_pin1,val); + } + } + } + if (val==114){//release motor + if(dcm==1) { + analogWrite(dcm1_pin1,0); + if(dcm1_mode==0) analogWrite(dcm1_pin2,0); + } + if(dcm==2) { + analogWrite(dcm2_pin1,0); + if(dcm2_mode==0) analogWrite(dcm2_pin2,0); + } + if(dcm==3) { + analogWrite(dcm3_pin1,0); + if(dcm3_mode==0) analogWrite(dcm3_pin2,0); + } + if(dcm==4) { + analogWrite(dcm4_pin1,0); + if(dcm4_mode==0) analogWrite(dcm4_pin2,0); + } + } + + } + val=-1; + + } + + + //case R -> Analog reference + if(val==82){ + while (Serial.available()==0) {}; + val = Serial.read(); + if (val==48) analogReference(DEFAULT); + if (val==49) analogReference(INTERNAL); + if (val==50) analogReference(EXTERNAL); + if (val==51) Serial.print("v3"); + val=-1; + } + +} /* end loop statement */ + + +/**************************************/ +// Generic interrupt encoder functions// +/**************************************/ +//Encoder on INT0 +void encoder_0_change_m1() { //encoder0 mode 1x + int chB=digitalRead(encoder_0_int2); + if (!chB) { encoder_0_position++;} + else { encoder_0_position--; } +} +void encoder_0_change_m2() { //encoder0 mode 2x + int chB=digitalRead(encoder_0_int2); + int chA=digitalRead(corresp[0]); + if ((chA & !chB)|(!chA & chB)) { encoder_0_position++; } + else { encoder_0_position--; } +} +void encoder_change_m4_A0(){//encoder0 mode 4x chA + int chA=digitalRead(corresp[0]); + int chB=digitalRead(encoder_0_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_0_position++; } + else { encoder_0_position--; } +} +void encoder_change_m4_B0(){//encoder0 mode 4x chB + int chA=digitalRead(corresp[0]); + int chB=digitalRead(encoder_0_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_0_position++; } + else { encoder_0_position--; } +} +//Encoder on INT1 +void encoder_1_change_m1() { //encoder1 mode 1x + int chB=digitalRead(encoder_1_int2); + if (!chB) { encoder_1_position++;} + else { encoder_1_position--; } +} +void encoder_1_change_m2() { //encoder1 mode 2x + int chB=digitalRead(encoder_1_int2); + int chA=digitalRead(corresp[1]); + if ((chA & !chB)|(!chA & chB)) { encoder_1_position++; } + else { encoder_1_position--; } +} +void encoder_change_m4_A1(){//encoder1 mode 4x chA + int chA=digitalRead(corresp[1]); + int chB=digitalRead(encoder_1_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_1_position++; } + else { encoder_1_position--; } +} +void encoder_change_m4_B1(){//encoder1 mode 4x chB + int chA=digitalRead(corresp[1]); + int chB=digitalRead(encoder_1_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_1_position++; } + else { encoder_1_position--; } +} +//Encoder on INT2 +void encoder_2_change_m1() { //encoder2 mode 1x + int chB=digitalRead(encoder_2_int2); + if (!chB) { encoder_2_position++;} + else { encoder_2_position--; } +} +void encoder_2_change_m2() { //encoder2 mode 2x + int chB=digitalRead(encoder_2_int2); + int chA=digitalRead(corresp[2]); + if ((chA & !chB)|(!chA & chB)) { encoder_2_position++; } + else { encoder_2_position--; } +} +void encoder_change_m4_A2(){//encoder2 mode 4x chA + int chA=digitalRead(corresp[2]); + int chB=digitalRead(encoder_2_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_2_position++; } + else { encoder_2_position--; } +} +void encoder_change_m4_B2(){//encoder2 mode 4x chB + int chA=digitalRead(corresp[2]); + int chB=digitalRead(encoder_2_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_2_position++; } + else { encoder_2_position--; } +} +//Encoder on INT3 +void encoder_3_change_m1() { //encoder3 mode 1x + int chB=digitalRead(encoder_3_int2); + if (!chB) { encoder_3_position++;} + else { encoder_3_position--; } +} +void encoder_3_change_m2() { //encoder3 mode 2x + int chB=digitalRead(encoder_3_int2); + int chA=digitalRead(corresp[3]); + if ((chA & !chB)|(!chA & chB)) { encoder_3_position++; } + else { encoder_3_position--; } +} +void encoder_change_m4_A3(){//encoder3 mode 4x chA + int chA=digitalRead(corresp[3]); + int chB=digitalRead(encoder_3_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_3_position++; } + else { encoder_3_position--; } +} +void encoder_change_m4_B3(){//encoder3 mode 4x chB + int chA=digitalRead(corresp[3]); + int chB=digitalRead(encoder_3_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_3_position++; } + else { encoder_3_position--; } +} +//Encoder on INT4 +void encoder_4_change_m1() { //encoder4 mode 1x + int chB=digitalRead(encoder_4_int2); + if (!chB) { encoder_4_position++;} + else { encoder_4_position--; } +} +void encoder_4_change_m2() { //encoder4 mode 2x + int chB=digitalRead(encoder_4_int2); + int chA=digitalRead(corresp[4]); + if ((chA & !chB)|(!chA & chB)) { encoder_4_position++; } + else { encoder_4_position--; } +} +void encoder_change_m4_A4(){//encoder4 mode 4x chA + int chA=digitalRead(corresp[4]); + int chB=digitalRead(encoder_4_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_4_position++; } + else { encoder_4_position--; } +} +void encoder_change_m4_B4(){//encoder4 mode 4x chB + int chA=digitalRead(corresp[4]); + int chB=digitalRead(encoder_4_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_4_position++; } + else { encoder_4_position--; } +} +//Encoder on INT5 +void encoder_5_change_m1() { //encoder5 mode 1x + int chB=digitalRead(encoder_5_int2); + if (!chB) { encoder_5_position++;} + else { encoder_5_position--; } +} +void encoder_5_change_m2() { //encoder5 mode 2x + int chB=digitalRead(encoder_5_int2); + int chA=digitalRead(corresp[5]); + if ((chA & !chB)|(!chA & chB)) { encoder_5_position++; } + else { encoder_5_position--; } +} +void encoder_change_m4_A5(){//encoder5 mode 4x chA + int chA=digitalRead(corresp[5]); + int chB=digitalRead(encoder_5_int2); + if ((chA & !chB)|(!chA & chB)) { encoder_5_position++; } + else { encoder_5_position--; } +} +void encoder_change_m4_B5(){//encoder5 mode 4x chB + int chA=digitalRead(corresp[5]); + int chB=digitalRead(encoder_5_int2); + if ((!chA & !chB)|(chA & chB)) { encoder_5_position++; } + else { encoder_5_position--; } +} + +/**************************************/ +// Generic interrupt counter functions// +/**************************************/ +//Counter on INT0 +void counter_0_change() { //counter 0 + counter_0++; +} +//Counter on INT1 +void counter_1_change() { //counter 1 + counter_1++; +} +//Counter on INT2 +void counter_2_change() { //counter 2 + counter_2++; +} +//Counter on INT3 +void counter_3_change() { //counter 3 + counter_3++; +} +//Counter on INT4 +void counter_4_change() { //counter 4 + counter_4++; +} +//Counter on INT5 +void counter_5_change() { //counter 5 + counter_5++; +} + +
diff --git a/tools/linux/DESCRIPTION b/tools/scilab/linux/DESCRIPTION index 776d9f2..776d9f2 100644 --- a/tools/linux/DESCRIPTION +++ b/tools/scilab/linux/DESCRIPTION diff --git a/tools/linux/VERSION b/tools/scilab/linux/VERSION index ea710ab..ea710ab 100644 --- a/tools/linux/VERSION +++ b/tools/scilab/linux/VERSION diff --git a/tools/linux/builder.sce b/tools/scilab/linux/builder.sce index bcf1d38..bcf1d38 100644 --- a/tools/linux/builder.sce +++ b/tools/scilab/linux/builder.sce diff --git a/tools/linux/cleaner.sce b/tools/scilab/linux/cleaner.sce index 370c68f..370c68f 100644 --- a/tools/linux/cleaner.sce +++ b/tools/scilab/linux/cleaner.sce diff --git a/tools/linux/demos/analog_read.dem.sce b/tools/scilab/linux/demos/analog_read.dem.sce index 566bb9e..566bb9e 100644 --- a/tools/linux/demos/analog_read.dem.sce +++ b/tools/scilab/linux/demos/analog_read.dem.sce diff --git a/tools/linux/demos/analog_write.dem.sce b/tools/scilab/linux/demos/analog_write.dem.sce index 6fe244f..6fe244f 100644 --- a/tools/linux/demos/analog_write.dem.sce +++ b/tools/scilab/linux/demos/analog_write.dem.sce diff --git a/tools/linux/demos/arduino.dem.gateway.sce b/tools/scilab/linux/demos/arduino.dem.gateway.sce index 15f739e..15f739e 100644 --- a/tools/linux/demos/arduino.dem.gateway.sce +++ b/tools/scilab/linux/demos/arduino.dem.gateway.sce diff --git a/tools/linux/demos/arduino2.dem.sce b/tools/scilab/linux/demos/arduino2.dem.sce index ec1d365..ec1d365 100644 --- a/tools/linux/demos/arduino2.dem.sce +++ b/tools/scilab/linux/demos/arduino2.dem.sce diff --git a/tools/linux/demos/arduino3.dem.sce b/tools/scilab/linux/demos/arduino3.dem.sce index 90d6f04..90d6f04 100644 --- a/tools/linux/demos/arduino3.dem.sce +++ b/tools/scilab/linux/demos/arduino3.dem.sce diff --git a/tools/linux/demos/arduino4.dem.sce b/tools/scilab/linux/demos/arduino4.dem.sce index 8bc9a8c..8bc9a8c 100644 --- a/tools/linux/demos/arduino4.dem.sce +++ b/tools/scilab/linux/demos/arduino4.dem.sce diff --git a/tools/linux/demos/arduino5.dem.sce b/tools/scilab/linux/demos/arduino5.dem.sce index 6b8ceb4..6b8ceb4 100644 --- a/tools/linux/demos/arduino5.dem.sce +++ b/tools/scilab/linux/demos/arduino5.dem.sce diff --git a/tools/linux/demos/arduino7.dem.sce b/tools/scilab/linux/demos/arduino7.dem.sce index ed92328..ed92328 100644 --- a/tools/linux/demos/arduino7.dem.sce +++ b/tools/scilab/linux/demos/arduino7.dem.sce diff --git a/tools/linux/demos/arduino8.dem.sce b/tools/scilab/linux/demos/arduino8.dem.sce index 2dd5dbf..2dd5dbf 100644 --- a/tools/linux/demos/arduino8.dem.sce +++ b/tools/scilab/linux/demos/arduino8.dem.sce diff --git a/tools/linux/demos/arduino9.dem.sce b/tools/scilab/linux/demos/arduino9.dem.sce index 7d86a46..7d86a46 100644 --- a/tools/linux/demos/arduino9.dem.sce +++ b/tools/scilab/linux/demos/arduino9.dem.sce diff --git a/tools/linux/demos/asserv.dem.sce b/tools/scilab/linux/demos/asserv.dem.sce index 68d575e..68d575e 100644 --- a/tools/linux/demos/asserv.dem.sce +++ b/tools/scilab/linux/demos/asserv.dem.sce diff --git a/tools/linux/demos/clignotement_led.dem.sce b/tools/scilab/linux/demos/clignotement_led.dem.sce index 165e3d0..165e3d0 100644 --- a/tools/linux/demos/clignotement_led.dem.sce +++ b/tools/scilab/linux/demos/clignotement_led.dem.sce diff --git a/tools/linux/demos/digital_read_write.dem.sce b/tools/scilab/linux/demos/digital_read_write.dem.sce index 60e1e77..60e1e77 100644 --- a/tools/linux/demos/digital_read_write.dem.sce +++ b/tools/scilab/linux/demos/digital_read_write.dem.sce diff --git a/tools/linux/demos/encodeur.dem.sce b/tools/scilab/linux/demos/encodeur.dem.sce index eeec86a..eeec86a 100644 --- a/tools/linux/demos/encodeur.dem.sce +++ b/tools/scilab/linux/demos/encodeur.dem.sce diff --git a/tools/linux/demos/exemples_livret.dem.gateway.sce b/tools/scilab/linux/demos/exemples_livret.dem.gateway.sce index 68d9517..68d9517 100644 --- a/tools/linux/demos/exemples_livret.dem.gateway.sce +++ b/tools/scilab/linux/demos/exemples_livret.dem.gateway.sce diff --git a/tools/linux/demos/interrupt_compteur.dem.sce b/tools/scilab/linux/demos/interrupt_compteur.dem.sce index c78c5c1..c78c5c1 100644 --- a/tools/linux/demos/interrupt_compteur.dem.sce +++ b/tools/scilab/linux/demos/interrupt_compteur.dem.sce diff --git a/tools/linux/demos/motor.dem.sce b/tools/scilab/linux/demos/motor.dem.sce index 66c0ea5..66c0ea5 100644 --- a/tools/linux/demos/motor.dem.sce +++ b/tools/scilab/linux/demos/motor.dem.sce diff --git a/tools/linux/demos/servomotor.dem.sce b/tools/scilab/linux/demos/servomotor.dem.sce index 7ed1b13..7ed1b13 100644 --- a/tools/linux/demos/servomotor.dem.sce +++ b/tools/scilab/linux/demos/servomotor.dem.sce diff --git a/tools/linux/etc/arduino.quit b/tools/scilab/linux/etc/arduino.quit index 9693278..9693278 100644 --- a/tools/linux/etc/arduino.quit +++ b/tools/scilab/linux/etc/arduino.quit diff --git a/tools/linux/etc/arduino.start b/tools/scilab/linux/etc/arduino.start index b68b44b..b68b44b 100644 --- a/tools/linux/etc/arduino.start +++ b/tools/scilab/linux/etc/arduino.start diff --git a/tools/linux/examples/Arduino1.zcos b/tools/scilab/linux/examples/Arduino1.zcos Binary files differindex 870db84..870db84 100644 --- a/tools/linux/examples/Arduino1.zcos +++ b/tools/scilab/linux/examples/Arduino1.zcos diff --git a/tools/linux/examples/Arduino2.zcos b/tools/scilab/linux/examples/Arduino2.zcos Binary files differindex 1d85a80..1d85a80 100644 --- a/tools/linux/examples/Arduino2.zcos +++ b/tools/scilab/linux/examples/Arduino2.zcos diff --git a/tools/linux/examples/Arduino3.zcos b/tools/scilab/linux/examples/Arduino3.zcos Binary files differindex 8a73f5f..8a73f5f 100644 --- a/tools/linux/examples/Arduino3.zcos +++ b/tools/scilab/linux/examples/Arduino3.zcos diff --git a/tools/linux/examples/Arduino4.zcos b/tools/scilab/linux/examples/Arduino4.zcos Binary files differindex 551b10b..551b10b 100644 --- a/tools/linux/examples/Arduino4.zcos +++ b/tools/scilab/linux/examples/Arduino4.zcos diff --git a/tools/linux/examples/Arduino5.zcos b/tools/scilab/linux/examples/Arduino5.zcos Binary files differindex b2f8360..b2f8360 100644 --- a/tools/linux/examples/Arduino5.zcos +++ b/tools/scilab/linux/examples/Arduino5.zcos diff --git a/tools/linux/examples/Arduino6.zcos b/tools/scilab/linux/examples/Arduino6.zcos Binary files differindex 2c3139e..2c3139e 100644 --- a/tools/linux/examples/Arduino6.zcos +++ b/tools/scilab/linux/examples/Arduino6.zcos diff --git a/tools/linux/examples/Arduino7.zcos b/tools/scilab/linux/examples/Arduino7.zcos Binary files differindex 9c0f370..9c0f370 100644 --- a/tools/linux/examples/Arduino7.zcos +++ b/tools/scilab/linux/examples/Arduino7.zcos diff --git a/tools/linux/examples/Arduino8.zcos b/tools/scilab/linux/examples/Arduino8.zcos Binary files differindex c1bd62c..c1bd62c 100644 --- a/tools/linux/examples/Arduino8.zcos +++ b/tools/scilab/linux/examples/Arduino8.zcos diff --git a/tools/linux/examples/Arduino9.zcos b/tools/scilab/linux/examples/Arduino9.zcos Binary files differindex b2035e3..b2035e3 100644 --- a/tools/linux/examples/Arduino9.zcos +++ b/tools/scilab/linux/examples/Arduino9.zcos diff --git a/tools/linux/examples/asservissement.zcos b/tools/scilab/linux/examples/asservissement.zcos Binary files differindex 7032631..7032631 100644 --- a/tools/linux/examples/asservissement.zcos +++ b/tools/scilab/linux/examples/asservissement.zcos diff --git a/tools/linux/examples/asservpos.zcos b/tools/scilab/linux/examples/asservpos.zcos Binary files differindex a9fdcd4..a9fdcd4 100644 --- a/tools/linux/examples/asservpos.zcos +++ b/tools/scilab/linux/examples/asservpos.zcos diff --git a/tools/linux/examples/boutonpoussoir.zcos b/tools/scilab/linux/examples/boutonpoussoir.zcos Binary files differindex 4602922..4602922 100644 --- a/tools/linux/examples/boutonpoussoir.zcos +++ b/tools/scilab/linux/examples/boutonpoussoir.zcos diff --git a/tools/linux/examples/encodeur.zcos b/tools/scilab/linux/examples/encodeur.zcos Binary files differindex ce3ba95..ce3ba95 100644 --- a/tools/linux/examples/encodeur.zcos +++ b/tools/scilab/linux/examples/encodeur.zcos diff --git a/tools/linux/examples/interrupt_compteur.zcos b/tools/scilab/linux/examples/interrupt_compteur.zcos Binary files differindex d3bb15e..d3bb15e 100644 --- a/tools/linux/examples/interrupt_compteur.zcos +++ b/tools/scilab/linux/examples/interrupt_compteur.zcos diff --git a/tools/linux/examples/moteurBO.zcos b/tools/scilab/linux/examples/moteurBO.zcos Binary files differindex 1f0ff99..1f0ff99 100644 --- a/tools/linux/examples/moteurBO.zcos +++ b/tools/scilab/linux/examples/moteurBO.zcos diff --git a/tools/linux/examples/potentiometre.zcos b/tools/scilab/linux/examples/potentiometre.zcos Binary files differindex 57e1a55..57e1a55 100644 --- a/tools/linux/examples/potentiometre.zcos +++ b/tools/scilab/linux/examples/potentiometre.zcos diff --git a/tools/linux/examples/servomoteur.zcos b/tools/scilab/linux/examples/servomoteur.zcos Binary files differindex d08cbcf..d08cbcf 100644 --- a/tools/linux/examples/servomoteur.zcos +++ b/tools/scilab/linux/examples/servomoteur.zcos diff --git a/tools/linux/examples/variateurLED.zcos b/tools/scilab/linux/examples/variateurLED.zcos Binary files differindex 01747f5..01747f5 100644 --- a/tools/linux/examples/variateurLED.zcos +++ b/tools/scilab/linux/examples/variateurLED.zcos diff --git a/tools/linux/help/builder_help.sce b/tools/scilab/linux/help/builder_help.sce index f8e9e73..f8e9e73 100644 --- a/tools/linux/help/builder_help.sce +++ b/tools/scilab/linux/help/builder_help.sce diff --git a/tools/linux/help/en_US/ANALOG_READ_SB.xml b/tools/scilab/linux/help/en_US/ANALOG_READ_SB.xml index 991e540..991e540 100644 --- a/tools/linux/help/en_US/ANALOG_READ_SB.xml +++ b/tools/scilab/linux/help/en_US/ANALOG_READ_SB.xml diff --git a/tools/linux/help/en_US/ANALOG_READ_SB_dialogbox.png b/tools/scilab/linux/help/en_US/ANALOG_READ_SB_dialogbox.png Binary files differindex 0a4a823..0a4a823 100644 --- a/tools/linux/help/en_US/ANALOG_READ_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/ANALOG_READ_SB_dialogbox.png diff --git a/tools/linux/help/en_US/ANALOG_READ_SB_help.tst b/tools/scilab/linux/help/en_US/ANALOG_READ_SB_help.tst index 7ba080c..7ba080c 100644 --- a/tools/linux/help/en_US/ANALOG_READ_SB_help.tst +++ b/tools/scilab/linux/help/en_US/ANALOG_READ_SB_help.tst diff --git a/tools/linux/help/en_US/ANALOG_READ_example.png b/tools/scilab/linux/help/en_US/ANALOG_READ_example.png Binary files differindex 4df93cf..4df93cf 100644 --- a/tools/linux/help/en_US/ANALOG_READ_example.png +++ b/tools/scilab/linux/help/en_US/ANALOG_READ_example.png diff --git a/tools/linux/help/en_US/ANALOG_WRITE_SB.xml b/tools/scilab/linux/help/en_US/ANALOG_WRITE_SB.xml index 0d191b8..0d191b8 100644 --- a/tools/linux/help/en_US/ANALOG_WRITE_SB.xml +++ b/tools/scilab/linux/help/en_US/ANALOG_WRITE_SB.xml diff --git a/tools/linux/help/en_US/ANALOG_WRITE_SB_dialogbox.png b/tools/scilab/linux/help/en_US/ANALOG_WRITE_SB_dialogbox.png Binary files differindex febf848..febf848 100644 --- a/tools/linux/help/en_US/ANALOG_WRITE_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/ANALOG_WRITE_SB_dialogbox.png diff --git a/tools/linux/help/en_US/ANALOG_WRITE_SB_help.tst b/tools/scilab/linux/help/en_US/ANALOG_WRITE_SB_help.tst index bd305ed..bd305ed 100644 --- a/tools/linux/help/en_US/ANALOG_WRITE_SB_help.tst +++ b/tools/scilab/linux/help/en_US/ANALOG_WRITE_SB_help.tst diff --git a/tools/linux/help/en_US/ANALOG_WRITE_exemple.png b/tools/scilab/linux/help/en_US/ANALOG_WRITE_exemple.png Binary files differindex 8b84651..8b84651 100644 --- a/tools/linux/help/en_US/ANALOG_WRITE_exemple.png +++ b/tools/scilab/linux/help/en_US/ANALOG_WRITE_exemple.png diff --git a/tools/linux/help/en_US/ARDUINO_SETUP.xml b/tools/scilab/linux/help/en_US/ARDUINO_SETUP.xml index d5654d4..d5654d4 100644 --- a/tools/linux/help/en_US/ARDUINO_SETUP.xml +++ b/tools/scilab/linux/help/en_US/ARDUINO_SETUP.xml diff --git a/tools/linux/help/en_US/ARDUINO_SETUP_dialogbox.png b/tools/scilab/linux/help/en_US/ARDUINO_SETUP_dialogbox.png Binary files differindex 715ec38..715ec38 100644 --- a/tools/linux/help/en_US/ARDUINO_SETUP_dialogbox.png +++ b/tools/scilab/linux/help/en_US/ARDUINO_SETUP_dialogbox.png diff --git a/tools/linux/help/en_US/ARDUINO_SETUP_example.png b/tools/scilab/linux/help/en_US/ARDUINO_SETUP_example.png Binary files differindex 22f0da8..22f0da8 100644 --- a/tools/linux/help/en_US/ARDUINO_SETUP_example.png +++ b/tools/scilab/linux/help/en_US/ARDUINO_SETUP_example.png diff --git a/tools/linux/help/en_US/ARDUINO_SETUP_help.tst b/tools/scilab/linux/help/en_US/ARDUINO_SETUP_help.tst index f7de181..f7de181 100644 --- a/tools/linux/help/en_US/ARDUINO_SETUP_help.tst +++ b/tools/scilab/linux/help/en_US/ARDUINO_SETUP_help.tst diff --git a/tools/linux/help/en_US/ASSERV_POS_exemple.png b/tools/scilab/linux/help/en_US/ASSERV_POS_exemple.png Binary files differindex 2ddb447..2ddb447 100644 --- a/tools/linux/help/en_US/ASSERV_POS_exemple.png +++ b/tools/scilab/linux/help/en_US/ASSERV_POS_exemple.png diff --git a/tools/linux/help/en_US/DCMOTOR_SB.tst b/tools/scilab/linux/help/en_US/DCMOTOR_SB.tst index c14ffbe..c14ffbe 100644 --- a/tools/linux/help/en_US/DCMOTOR_SB.tst +++ b/tools/scilab/linux/help/en_US/DCMOTOR_SB.tst diff --git a/tools/linux/help/en_US/DCMOTOR_SB.xml b/tools/scilab/linux/help/en_US/DCMOTOR_SB.xml index f5e51dc..f5e51dc 100644 --- a/tools/linux/help/en_US/DCMOTOR_SB.xml +++ b/tools/scilab/linux/help/en_US/DCMOTOR_SB.xml diff --git a/tools/linux/help/en_US/DCMOTOR_SB_dialogbox1.png b/tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox1.png Binary files differindex 5bf8920..5bf8920 100644 --- a/tools/linux/help/en_US/DCMOTOR_SB_dialogbox1.png +++ b/tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox1.png diff --git a/tools/linux/help/en_US/DCMOTOR_SB_dialogbox2.png b/tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox2.png Binary files differindex 4d2a7b4..4d2a7b4 100644 --- a/tools/linux/help/en_US/DCMOTOR_SB_dialogbox2.png +++ b/tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox2.png diff --git a/tools/linux/help/en_US/DCMOTOR_SB_dialogbox3.png b/tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox3.png Binary files differindex 34a15d0..34a15d0 100644 --- a/tools/linux/help/en_US/DCMOTOR_SB_dialogbox3.png +++ b/tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox3.png diff --git a/tools/linux/help/en_US/DCMOTOR_SB_dialogbox4.png b/tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox4.png Binary files differindex c80e6c3..c80e6c3 100644 --- a/tools/linux/help/en_US/DCMOTOR_SB_dialogbox4.png +++ b/tools/scilab/linux/help/en_US/DCMOTOR_SB_dialogbox4.png diff --git a/tools/linux/help/en_US/DCMOTOR_exemple.png b/tools/scilab/linux/help/en_US/DCMOTOR_exemple.png Binary files differindex 24e50fe..24e50fe 100644 --- a/tools/linux/help/en_US/DCMOTOR_exemple.png +++ b/tools/scilab/linux/help/en_US/DCMOTOR_exemple.png diff --git a/tools/linux/help/en_US/DIGITAL_READ_SB.xml b/tools/scilab/linux/help/en_US/DIGITAL_READ_SB.xml index 81a5cda..81a5cda 100644 --- a/tools/linux/help/en_US/DIGITAL_READ_SB.xml +++ b/tools/scilab/linux/help/en_US/DIGITAL_READ_SB.xml diff --git a/tools/linux/help/en_US/DIGITAL_READ_SB_dialogbox.png b/tools/scilab/linux/help/en_US/DIGITAL_READ_SB_dialogbox.png Binary files differindex 244b37d..244b37d 100644 --- a/tools/linux/help/en_US/DIGITAL_READ_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/DIGITAL_READ_SB_dialogbox.png diff --git a/tools/linux/help/en_US/DIGITAL_READ_SB_help.tst b/tools/scilab/linux/help/en_US/DIGITAL_READ_SB_help.tst index 39ce410..39ce410 100644 --- a/tools/linux/help/en_US/DIGITAL_READ_SB_help.tst +++ b/tools/scilab/linux/help/en_US/DIGITAL_READ_SB_help.tst diff --git a/tools/linux/help/en_US/DIGITAL_WRITE_SB.xml b/tools/scilab/linux/help/en_US/DIGITAL_WRITE_SB.xml index b079f4c..b079f4c 100644 --- a/tools/linux/help/en_US/DIGITAL_WRITE_SB.xml +++ b/tools/scilab/linux/help/en_US/DIGITAL_WRITE_SB.xml diff --git a/tools/linux/help/en_US/DIGITAL_WRITE_SB_dialogbox.png b/tools/scilab/linux/help/en_US/DIGITAL_WRITE_SB_dialogbox.png Binary files differindex 4abc644..4abc644 100644 --- a/tools/linux/help/en_US/DIGITAL_WRITE_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/DIGITAL_WRITE_SB_dialogbox.png diff --git a/tools/linux/help/en_US/DIGITAL_WRITE_SB_help.tst b/tools/scilab/linux/help/en_US/DIGITAL_WRITE_SB_help.tst index 742a23f..742a23f 100644 --- a/tools/linux/help/en_US/DIGITAL_WRITE_SB_help.tst +++ b/tools/scilab/linux/help/en_US/DIGITAL_WRITE_SB_help.tst diff --git a/tools/linux/help/en_US/DIGITAL_exemple.png b/tools/scilab/linux/help/en_US/DIGITAL_exemple.png Binary files differindex 22832fa..22832fa 100644 --- a/tools/linux/help/en_US/DIGITAL_exemple.png +++ b/tools/scilab/linux/help/en_US/DIGITAL_exemple.png diff --git a/tools/linux/help/en_US/ENCODER_SB.tst b/tools/scilab/linux/help/en_US/ENCODER_SB.tst index 33fbfef..33fbfef 100644 --- a/tools/linux/help/en_US/ENCODER_SB.tst +++ b/tools/scilab/linux/help/en_US/ENCODER_SB.tst diff --git a/tools/linux/help/en_US/ENCODER_SB.xml b/tools/scilab/linux/help/en_US/ENCODER_SB.xml index d054e97..d054e97 100644 --- a/tools/linux/help/en_US/ENCODER_SB.xml +++ b/tools/scilab/linux/help/en_US/ENCODER_SB.xml diff --git a/tools/linux/help/en_US/ENCODER_SB_dialogbox1.png b/tools/scilab/linux/help/en_US/ENCODER_SB_dialogbox1.png Binary files differindex 8dbe19c..8dbe19c 100644 --- a/tools/linux/help/en_US/ENCODER_SB_dialogbox1.png +++ b/tools/scilab/linux/help/en_US/ENCODER_SB_dialogbox1.png diff --git a/tools/linux/help/en_US/ENCODER_SB_dialogbox2.png b/tools/scilab/linux/help/en_US/ENCODER_SB_dialogbox2.png Binary files differindex b63878e..b63878e 100644 --- a/tools/linux/help/en_US/ENCODER_SB_dialogbox2.png +++ b/tools/scilab/linux/help/en_US/ENCODER_SB_dialogbox2.png diff --git a/tools/linux/help/en_US/ENCODER_exemple.png b/tools/scilab/linux/help/en_US/ENCODER_exemple.png Binary files differindex 9c477cf..9c477cf 100644 --- a/tools/linux/help/en_US/ENCODER_exemple.png +++ b/tools/scilab/linux/help/en_US/ENCODER_exemple.png diff --git a/tools/linux/help/en_US/INTERRUPT_SB.tst b/tools/scilab/linux/help/en_US/INTERRUPT_SB.tst index ae09246..ae09246 100644 --- a/tools/linux/help/en_US/INTERRUPT_SB.tst +++ b/tools/scilab/linux/help/en_US/INTERRUPT_SB.tst diff --git a/tools/linux/help/en_US/INTERRUPT_SB.xml b/tools/scilab/linux/help/en_US/INTERRUPT_SB.xml index 58e90c2..58e90c2 100644 --- a/tools/linux/help/en_US/INTERRUPT_SB.xml +++ b/tools/scilab/linux/help/en_US/INTERRUPT_SB.xml diff --git a/tools/linux/help/en_US/INTERRUPT_SB_dialogbox.png b/tools/scilab/linux/help/en_US/INTERRUPT_SB_dialogbox.png Binary files differindex ec3f62c..ec3f62c 100644 --- a/tools/linux/help/en_US/INTERRUPT_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/INTERRUPT_SB_dialogbox.png diff --git a/tools/linux/help/en_US/INTERRUPT_exemple.png b/tools/scilab/linux/help/en_US/INTERRUPT_exemple.png Binary files differindex 7807247..7807247 100644 --- a/tools/linux/help/en_US/INTERRUPT_exemple.png +++ b/tools/scilab/linux/help/en_US/INTERRUPT_exemple.png diff --git a/tools/linux/help/en_US/SERVO_SB.tst b/tools/scilab/linux/help/en_US/SERVO_SB.tst index 93323c3..93323c3 100644 --- a/tools/linux/help/en_US/SERVO_SB.tst +++ b/tools/scilab/linux/help/en_US/SERVO_SB.tst diff --git a/tools/linux/help/en_US/SERVO_SB_dialogbox.png b/tools/scilab/linux/help/en_US/SERVO_SB_dialogbox.png Binary files differindex a421e75..a421e75 100644 --- a/tools/linux/help/en_US/SERVO_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/SERVO_SB_dialogbox.png diff --git a/tools/linux/help/en_US/SERVO_SB_exemple.png b/tools/scilab/linux/help/en_US/SERVO_SB_exemple.png Binary files differindex 86cb244..86cb244 100644 --- a/tools/linux/help/en_US/SERVO_SB_exemple.png +++ b/tools/scilab/linux/help/en_US/SERVO_SB_exemple.png diff --git a/tools/linux/help/en_US/SERVO_WRITE_SB.xml b/tools/scilab/linux/help/en_US/SERVO_WRITE_SB.xml index 27b9d3c..27b9d3c 100644 --- a/tools/linux/help/en_US/SERVO_WRITE_SB.xml +++ b/tools/scilab/linux/help/en_US/SERVO_WRITE_SB.xml diff --git a/tools/linux/help/en_US/TIME_SAMPLE.xml b/tools/scilab/linux/help/en_US/TIME_SAMPLE.xml index ae10a49..ae10a49 100644 --- a/tools/linux/help/en_US/TIME_SAMPLE.xml +++ b/tools/scilab/linux/help/en_US/TIME_SAMPLE.xml diff --git a/tools/linux/help/en_US/TIME_SAMPLE_dialogbox.png b/tools/scilab/linux/help/en_US/TIME_SAMPLE_dialogbox.png Binary files differindex 45022af..45022af 100644 --- a/tools/linux/help/en_US/TIME_SAMPLE_dialogbox.png +++ b/tools/scilab/linux/help/en_US/TIME_SAMPLE_dialogbox.png diff --git a/tools/linux/help/en_US/TIME_SAMPLE_help.tst b/tools/scilab/linux/help/en_US/TIME_SAMPLE_help.tst index 6f51d62..6f51d62 100644 --- a/tools/linux/help/en_US/TIME_SAMPLE_help.tst +++ b/tools/scilab/linux/help/en_US/TIME_SAMPLE_help.tst diff --git a/tools/linux/help/en_US/build_help.sce b/tools/scilab/linux/help/en_US/build_help.sce index 7065316..7065316 100644 --- a/tools/linux/help/en_US/build_help.sce +++ b/tools/scilab/linux/help/en_US/build_help.sce diff --git a/tools/linux/help/en_US/close_serial.xml b/tools/scilab/linux/help/en_US/close_serial.xml index 7b50eb6..7b50eb6 100644 --- a/tools/linux/help/en_US/close_serial.xml +++ b/tools/scilab/linux/help/en_US/close_serial.xml diff --git a/tools/linux/help/en_US/cmd_analog_in.tst b/tools/scilab/linux/help/en_US/cmd_analog_in.tst index e2504b0..e2504b0 100644 --- a/tools/linux/help/en_US/cmd_analog_in.tst +++ b/tools/scilab/linux/help/en_US/cmd_analog_in.tst diff --git a/tools/linux/help/en_US/cmd_analog_in.xml b/tools/scilab/linux/help/en_US/cmd_analog_in.xml index 76c48e9..76c48e9 100644 --- a/tools/linux/help/en_US/cmd_analog_in.xml +++ b/tools/scilab/linux/help/en_US/cmd_analog_in.xml diff --git a/tools/linux/help/en_US/cmd_analog_in_volt.xml b/tools/scilab/linux/help/en_US/cmd_analog_in_volt.xml index d140c13..d140c13 100644 --- a/tools/linux/help/en_US/cmd_analog_in_volt.xml +++ b/tools/scilab/linux/help/en_US/cmd_analog_in_volt.xml diff --git a/tools/linux/help/en_US/cmd_analog_out.xml b/tools/scilab/linux/help/en_US/cmd_analog_out.xml index 9895f79..9895f79 100644 --- a/tools/linux/help/en_US/cmd_analog_out.xml +++ b/tools/scilab/linux/help/en_US/cmd_analog_out.xml diff --git a/tools/linux/help/en_US/cmd_analog_out_volt.xml b/tools/scilab/linux/help/en_US/cmd_analog_out_volt.xml index 05f345c..05f345c 100644 --- a/tools/linux/help/en_US/cmd_analog_out_volt.xml +++ b/tools/scilab/linux/help/en_US/cmd_analog_out_volt.xml diff --git a/tools/linux/help/en_US/cmd_arduino_a_control.xml b/tools/scilab/linux/help/en_US/cmd_arduino_a_control.xml index f2d73cd..f2d73cd 100644 --- a/tools/linux/help/en_US/cmd_arduino_a_control.xml +++ b/tools/scilab/linux/help/en_US/cmd_arduino_a_control.xml diff --git a/tools/linux/help/en_US/cmd_arduino_d_control.xml b/tools/scilab/linux/help/en_US/cmd_arduino_d_control.xml index 43ec03b..43ec03b 100644 --- a/tools/linux/help/en_US/cmd_arduino_d_control.xml +++ b/tools/scilab/linux/help/en_US/cmd_arduino_d_control.xml diff --git a/tools/linux/help/en_US/cmd_arduino_meter.xml b/tools/scilab/linux/help/en_US/cmd_arduino_meter.xml index d64d3b2..d64d3b2 100644 --- a/tools/linux/help/en_US/cmd_arduino_meter.xml +++ b/tools/scilab/linux/help/en_US/cmd_arduino_meter.xml diff --git a/tools/linux/help/en_US/cmd_dcmotor_release.xml b/tools/scilab/linux/help/en_US/cmd_dcmotor_release.xml index 9f7d7c5..9f7d7c5 100644 --- a/tools/linux/help/en_US/cmd_dcmotor_release.xml +++ b/tools/scilab/linux/help/en_US/cmd_dcmotor_release.xml diff --git a/tools/linux/help/en_US/cmd_dcmotor_run.xml b/tools/scilab/linux/help/en_US/cmd_dcmotor_run.xml index c97faa0..c97faa0 100644 --- a/tools/linux/help/en_US/cmd_dcmotor_run.xml +++ b/tools/scilab/linux/help/en_US/cmd_dcmotor_run.xml diff --git a/tools/linux/help/en_US/cmd_dcmotor_setup.xml b/tools/scilab/linux/help/en_US/cmd_dcmotor_setup.xml index abbe317..abbe317 100644 --- a/tools/linux/help/en_US/cmd_dcmotor_setup.xml +++ b/tools/scilab/linux/help/en_US/cmd_dcmotor_setup.xml diff --git a/tools/linux/help/en_US/cmd_digital_in.xml b/tools/scilab/linux/help/en_US/cmd_digital_in.xml index 35d7117..35d7117 100644 --- a/tools/linux/help/en_US/cmd_digital_in.xml +++ b/tools/scilab/linux/help/en_US/cmd_digital_in.xml diff --git a/tools/linux/help/en_US/cmd_digital_out.xml b/tools/scilab/linux/help/en_US/cmd_digital_out.xml index 40c8683..40c8683 100644 --- a/tools/linux/help/en_US/cmd_digital_out.xml +++ b/tools/scilab/linux/help/en_US/cmd_digital_out.xml diff --git a/tools/linux/help/en_US/cmd_servo_attach.xml b/tools/scilab/linux/help/en_US/cmd_servo_attach.xml index 361c4c4..361c4c4 100644 --- a/tools/linux/help/en_US/cmd_servo_attach.xml +++ b/tools/scilab/linux/help/en_US/cmd_servo_attach.xml diff --git a/tools/linux/help/en_US/cmd_servo_detach.xml b/tools/scilab/linux/help/en_US/cmd_servo_detach.xml index 29e1cfc..29e1cfc 100644 --- a/tools/linux/help/en_US/cmd_servo_detach.xml +++ b/tools/scilab/linux/help/en_US/cmd_servo_detach.xml diff --git a/tools/linux/help/en_US/cmd_servo_move.xml b/tools/scilab/linux/help/en_US/cmd_servo_move.xml index 370b60c..370b60c 100644 --- a/tools/linux/help/en_US/cmd_servo_move.xml +++ b/tools/scilab/linux/help/en_US/cmd_servo_move.xml diff --git a/tools/scilab/linux/help/en_US/master_help.xml b/tools/scilab/linux/help/en_US/master_help.xml new file mode 100644 index 0000000..ab44ee7 --- /dev/null +++ b/tools/scilab/linux/help/en_US/master_help.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE book [ +<!--Begin Entities--> +<!ENTITY a09f87684776f20ad0dc05ee5c3113239 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/ANALOG_READ_SB.xml"> +<!ENTITY ab932dea47c27fb2fce54c88a6ee32a77 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/ANALOG_WRITE_SB.xml"> +<!ENTITY a7456951c81703447dc50bba9d4b9a2e0 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/ARDUINO_SETUP.xml"> +<!ENTITY a391d28605967d4e89ae9c0bded26d0f9 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/DCMOTOR_SB.xml"> +<!ENTITY a8037b2500be1f98f2fcb9e05abaf6be6 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/DIGITAL_READ_SB.xml"> +<!ENTITY a808f10b53873bc73bc0f79fd4235c1b5 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/DIGITAL_WRITE_SB.xml"> +<!ENTITY ad85d8bcc7672a7bdbde6ea0488903679 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/ENCODER_SB.xml"> +<!ENTITY aa702da4c82dd12aa90bde13bf5b1a10d SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/INTERRUPT_SB.xml"> +<!ENTITY a6c5d13471016315a62eea33b123847fb SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/SERVO_WRITE_SB.xml"> +<!ENTITY a980bb6ebc1eab08d057966d3d2133e95 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/TIME_SAMPLE.xml"> +<!ENTITY a8c7c54d1b05b847fee4c000e1dced771 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/close_serial.xml"> +<!ENTITY a41525798a65670612b570f88d5e44ab8 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_analog_in.xml"> +<!ENTITY af052af97d8ed5e91743d2be3f62b2e41 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_analog_in_volt.xml"> +<!ENTITY ad7980727d5da972ce84f0e231cbe1fd8 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_analog_out.xml"> +<!ENTITY a47201a688c1ef6b63a839767117c87cb SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_analog_out_volt.xml"> +<!ENTITY a361ea49aa87b54ef6a1167399c869094 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_arduino_a_control.xml"> +<!ENTITY a287226a4ce675bfdedf8b0e1b187fc86 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_arduino_d_control.xml"> +<!ENTITY a7722556a3ee9f1626d824ee80fd7f24c SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_arduino_meter.xml"> +<!ENTITY a0ce24c6dfcdc5e75a404d107011ce404 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_dcmotor_release.xml"> +<!ENTITY a090247425f10099ceb255b2518f701bc SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_dcmotor_run.xml"> +<!ENTITY a0f1ae730a3e10d95b05fe2d18d43fcd8 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_dcmotor_setup.xml"> +<!ENTITY a065f5a59eda1db329ea7361baeb7769f SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_digital_in.xml"> +<!ENTITY aeed0e7a3c58bceea460669c99a64cb85 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_digital_out.xml"> +<!ENTITY aeef33ef0b14b0b4a785949297e6fc52c SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_servo_attach.xml"> +<!ENTITY a6d6cc6ce6b782a4853fc30df829e03d6 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_servo_detach.xml"> +<!ENTITY a5c64817358edd38d5b63f2b8abe70fa2 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/cmd_servo_move.xml"> +<!ENTITY a638c0a30453e51f19692c387040c0c90 SYSTEM "/home/fossee/Desktop/floss-scilab-arduino/tools/scilab/linux/help/en_US/open_serial.xml"> +<!--End Entities--> +]> +<book version="5.0-subset Scilab" xml:lang="en_US" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:mml="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:db="http://docbook.org/ns/docbook"> + <info xml:id='arduino_toolbox_manual'> + <title>Arduino toolbox</title> + </info> + +<part xml:id='section_0065f243e2d913ab014332454f9a0ca0'> +<title>Arduino toolbox</title> +&a09f87684776f20ad0dc05ee5c3113239; +&ab932dea47c27fb2fce54c88a6ee32a77; +&a7456951c81703447dc50bba9d4b9a2e0; +&a391d28605967d4e89ae9c0bded26d0f9; +&a8037b2500be1f98f2fcb9e05abaf6be6; +&a808f10b53873bc73bc0f79fd4235c1b5; +&ad85d8bcc7672a7bdbde6ea0488903679; +&aa702da4c82dd12aa90bde13bf5b1a10d; +&a6c5d13471016315a62eea33b123847fb; +&a980bb6ebc1eab08d057966d3d2133e95; +&a8c7c54d1b05b847fee4c000e1dced771; +&a41525798a65670612b570f88d5e44ab8; +&af052af97d8ed5e91743d2be3f62b2e41; +&ad7980727d5da972ce84f0e231cbe1fd8; +&a47201a688c1ef6b63a839767117c87cb; +&a361ea49aa87b54ef6a1167399c869094; +&a287226a4ce675bfdedf8b0e1b187fc86; +&a7722556a3ee9f1626d824ee80fd7f24c; +&a0ce24c6dfcdc5e75a404d107011ce404; +&a090247425f10099ceb255b2518f701bc; +&a0f1ae730a3e10d95b05fe2d18d43fcd8; +&a065f5a59eda1db329ea7361baeb7769f; +&aeed0e7a3c58bceea460669c99a64cb85; +&aeef33ef0b14b0b4a785949297e6fc52c; +&a6d6cc6ce6b782a4853fc30df829e03d6; +&a5c64817358edd38d5b63f2b8abe70fa2; +&a638c0a30453e51f19692c387040c0c90; +</part> +</book> diff --git a/tools/linux/help/en_US/open_serial.xml b/tools/scilab/linux/help/en_US/open_serial.xml index 7f12d3c..7f12d3c 100644 --- a/tools/linux/help/en_US/open_serial.xml +++ b/tools/scilab/linux/help/en_US/open_serial.xml diff --git a/tools/linux/help/en_US/read_file_doc.sci b/tools/scilab/linux/help/en_US/read_file_doc.sci index dae0493..dae0493 100644 --- a/tools/linux/help/en_US/read_file_doc.sci +++ b/tools/scilab/linux/help/en_US/read_file_doc.sci diff --git a/tools/linux/help/en_US/read_file_doc2.sci b/tools/scilab/linux/help/en_US/read_file_doc2.sci index 45275bd..45275bd 100644 --- a/tools/linux/help/en_US/read_file_doc2.sci +++ b/tools/scilab/linux/help/en_US/read_file_doc2.sci diff --git a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif Binary files differindex 00a75c6..00a75c6 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif diff --git a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html index 8e086fd..d89ebaf 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html @@ -12,11 +12,11 @@ <div class="manualnavbar"> <table width="100%"><tr> <td width="30%"> - <span class="previous"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html"><< Arduino toolbox</a></span> + <span class="previous"><a href="section_0065f243e2d913ab014332454f9a0ca0.html"><< Arduino toolbox</a></span> </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > ANALOG_READ_SB</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > ANALOG_READ_SB</span> <br /><br /> <div class="refnamediv"><h1 class="refname">ANALOG_READ_SB</h1> @@ -67,11 +67,11 @@ Arduino</div> <tr><td colspan="3" class="next"><a href="http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages" class="ulink">Report an issue</a></td></tr> <tr> <td width="30%"> - <span class="previous"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html"><< Arduino toolbox</a></span> + <span class="previous"><a href="section_0065f243e2d913ab014332454f9a0ca0.html"><< Arduino toolbox</a></span> </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png Binary files differindex 0a4a823..0a4a823 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_example.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_example.png Binary files differindex 4df93cf..4df93cf 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_READ_example.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_READ_example.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif Binary files differindex 1da5d03..1da5d03 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif diff --git a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html index 1f65fbd..1b8bde0 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > ANALOG_WRITE_SB</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > ANALOG_WRITE_SB</span> <br /><br /> <div class="refnamediv"><h1 class="refname">ANALOG_WRITE_SB</h1> @@ -71,7 +71,7 @@ Arduino</div> </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png Binary files differindex febf848..febf848 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png Binary files differindex 8b84651..8b84651 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif b/tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif Binary files differindex e2e8d42..e2e8d42 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif diff --git a/tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html index 8964a29..01d3f33 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > ARDUINO_SETUP</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > ARDUINO_SETUP</span> <br /><br /> <div class="refnamediv"><h1 class="refname">ARDUINO_SETUP</h1> @@ -74,7 +74,7 @@ Arduino</div> </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png Binary files differindex 715ec38..715ec38 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png Binary files differindex 22f0da8..22f0da8 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png Binary files differindex 2ddb447..2ddb447 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif Binary files differindex c5cf0e6..c5cf0e6 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif diff --git a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.html index a902b9e..8797dfe 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > DCMOTOR_SB</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > DCMOTOR_SB</span> <br /><br /> <div class="refnamediv"><h1 class="refname">DCMOTOR_SB</h1> @@ -87,7 +87,7 @@ Arduino</div> </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png Binary files differindex 5bf8920..5bf8920 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png Binary files differindex 4d2a7b4..4d2a7b4 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png Binary files differindex 34a15d0..34a15d0 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png Binary files differindex c80e6c3..c80e6c3 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png Binary files differindex 24e50fe..24e50fe 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif Binary files differindex 39dea04..39dea04 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif diff --git a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html index 22ed1d0..ff1749c 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > DIGITAL_READ_SB</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > DIGITAL_READ_SB</span> <br /><br /> <div class="refnamediv"><h1 class="refname">DIGITAL_READ_SB</h1> @@ -71,7 +71,7 @@ Arduino</div> </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png Binary files differindex 244b37d..244b37d 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif Binary files differindex e47dca2..e47dca2 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif diff --git a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html index ffbe3aa..91be4e6 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > DIGITAL_WRITE_SB</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > DIGITAL_WRITE_SB</span> <br /><br /> <div class="refnamediv"><h1 class="refname">DIGITAL_WRITE_SB</h1> @@ -72,7 +72,7 @@ Arduino</div> </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png Binary files differindex 4abc644..4abc644 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_exemple.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_exemple.png Binary files differindex 22832fa..22832fa 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/DIGITAL_exemple.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/DIGITAL_exemple.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB.gif b/tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB.gif Binary files differindex 6cbd55b..6cbd55b 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB.gif +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB.gif diff --git a/tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB.html index b5a40ea..d5050a3 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > ENCODER_SB</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > ENCODER_SB</span> <br /><br /> <div class="refnamediv"><h1 class="refname">ENCODER_SB</h1> @@ -86,7 +86,7 @@ Arduino</div> </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png Binary files differindex 8dbe19c..8dbe19c 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png Binary files differindex b63878e..b63878e 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ENCODER_exemple.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_exemple.png Binary files differindex 9c477cf..9c477cf 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ENCODER_exemple.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ENCODER_exemple.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif b/tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif Binary files differindex ec40a43..ec40a43 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif diff --git a/tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.html index a68670a..818c4aa 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > INTERRUPT_SB</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > INTERRUPT_SB</span> <br /><br /> <div class="refnamediv"><h1 class="refname">INTERRUPT_SB</h1> @@ -70,7 +70,7 @@ Arduino</div> </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png Binary files differindex ec3f62c..ec3f62c 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png Binary files differindex 7807247..7807247 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png diff --git a/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS Binary files differnew file mode 100644 index 0000000..a9462e2 --- /dev/null +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS diff --git a/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB new file mode 100644 index 0000000..7e7237a --- /dev/null +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB @@ -0,0 +1,3 @@ +eÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿuÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ÷_ÿÿÿÿÿÙÙÿÿý—ÿÿÿÿÿÿÿÌ%—ÿÿÿÿÿÿÿÿ÷_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ0ŸÿÿÿÿÿÿÿÿóIÿÿÿÿÿÿÿÿÿÿÿý×ÿÿÿÿÿö_Ùö_ÿÿÿÿÿÿý×ÿ0Ÿ÷_ÿÿÿÿÿÿüÒÿÝ^_ñ„Õ£2!Ñן0“ õe0œÂ[VV\Ê-̉ÿuýÔÂ| Âv_Œ!Öª¹“ëúã\Âñ±|e±?óKóf/1‹ó<³‹Æ…Ëüòó†…/0³K=³ËÏ,òÆÆ…ÐeÅ¡‘!±!±qkF‹Æ¥«óƨHgüJ<³/ú£ÿŒ.¡I’aB*«£¡‘?û»Ì/ëüÂÿÍ,ÂÿÌ/.ª¨òŽ*«ªª«þÌ,ܬ£ +ª£ +£JªÿꪮªªªÍ/úó*™*ª™*©¿ÿóX¾®ª£"Œªªªª™*bÿ4¿ÿÿÿÿÿÿÿÿÍÿòÿÿÿÿÿÿÿÿÿÿÿÿ0¿ÿØ
\ No newline at end of file diff --git a/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS Binary files differnew file mode 100644 index 0000000..d99e72a --- /dev/null +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS diff --git a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS Binary files differindex fb8b49d..5d723fc 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS diff --git a/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA new file mode 100644 index 0000000..5cf9e61 --- /dev/null +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA @@ -0,0 +1,2 @@ +JavaSearch 1.0 +TMAP bs=2048 rt=1 fl=-1 id1=661 id2=1 diff --git a/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP Binary files differnew file mode 100644 index 0000000..875cc79 --- /dev/null +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP diff --git a/tools/linux/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png Binary files differindex a421e75..a421e75 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png Binary files differindex 86cb244..86cb244 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif b/tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif Binary files differindex f04d9fe..f04d9fe 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif diff --git a/tools/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html index 4b4482e..1d06837 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > SERVO_WRITE_SB</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > SERVO_WRITE_SB</span> <br /><br /> <div class="refnamediv"><h1 class="refname">SERVO_WRITE_SB</h1> @@ -75,7 +75,7 @@ Arduino</div> </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/ScilabCaution.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabCaution.png Binary files differindex a9e4ff3..a9e4ff3 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ScilabCaution.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabCaution.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ScilabEdit.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabEdit.png Binary files differindex 188e1c1..188e1c1 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ScilabEdit.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabEdit.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ScilabExecute.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabExecute.png Binary files differindex a7de0fe..a7de0fe 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ScilabExecute.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabExecute.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ScilabImportant.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabImportant.png Binary files differindex 81e9ed2..81e9ed2 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ScilabImportant.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabImportant.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ScilabNote.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabNote.png Binary files differindex 8851b99..8851b99 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ScilabNote.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabNote.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ScilabTip.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabTip.png Binary files differindex 8851b99..8851b99 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ScilabTip.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabTip.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/ScilabWarning.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabWarning.png Binary files differindex a9e4ff3..a9e4ff3 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/ScilabWarning.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/ScilabWarning.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif b/tools/scilab/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif Binary files differindex 01837f0..01837f0 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif diff --git a/tools/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.html index e2efcea..3723627 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > TIME_SAMPLE</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > TIME_SAMPLE</span> <br /><br /> <div class="refnamediv"><h1 class="refname">TIME_SAMPLE</h1> @@ -70,7 +70,7 @@ Arduino</div> </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png b/tools/scilab/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png Binary files differindex 45022af..45022af 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png diff --git a/tools/linux/help/en_US/scilab_en_US_help/c_code.css b/tools/scilab/linux/help/en_US/scilab_en_US_help/c_code.css index 948d2ee..948d2ee 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/c_code.css +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/c_code.css diff --git a/tools/linux/help/en_US/scilab_en_US_help/close_serial.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/close_serial.html index 77be8f7..b8cbf06 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/close_serial.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/close_serial.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > close_serial</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > close_serial</span> <br /><br /> <div class="refnamediv"><h1 class="refname">close_serial</h1> @@ -69,7 +69,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_analog_in.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_in.html index f69100b..de35f3f 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_analog_in.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_in.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_analog_in</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_analog_in</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_analog_in</h1> @@ -73,7 +73,7 @@ The 10 bits channels convert the analog input from 0 to 5 volts, to a digital va </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html index 795c715..b7b16ea 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_analog_in_volt</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_analog_in_volt</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_analog_in_volt</h1> @@ -73,7 +73,7 @@ The 10 bits channels convert the analog input from 0 to 5 volts, to a digital va </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_analog_out.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_out.html index 80c5077..c876559 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_analog_out.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_out.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_analog_out</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_analog_out</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_analog_out</h1> @@ -77,7 +77,7 @@ voltage across the component connected to this port, which has the effect of hav </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html index 9ec0e0f..f2b87d0 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_analog_out_volt</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_analog_out_volt</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_analog_out_volt</h1> @@ -76,7 +76,7 @@ voltage across the component connected to this port, which has the effect of hav </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html index 61f9d4b..0da5482 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_arduino_a_control</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_arduino_a_control</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_arduino_a_control</h1> @@ -71,7 +71,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html index 498e232..d8d3889 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_arduino_d_control</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_arduino_d_control</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_arduino_d_control</h1> @@ -72,7 +72,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_arduino_meter.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_arduino_meter.html index 20db1af..b5120a0 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_arduino_meter.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_arduino_meter.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_arduino_meter</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_arduino_meter</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_arduino_meter</h1> @@ -70,7 +70,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html index fe1c473..9a8f141 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_dcmotor_release</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_dcmotor_release</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_dcmotor_release</h1> @@ -70,7 +70,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html index 92cfbd4..e5593f5 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_dcmotor_run</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_dcmotor_run</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_dcmotor_run</h1> @@ -72,7 +72,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html index 021edf9..a65cbf5 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_dcmotor_setup</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_dcmotor_setup</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_dcmotor_setup</h1> @@ -76,7 +76,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_digital_in.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_digital_in.html index 93ab7ed..ff73f8a 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_digital_in.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_digital_in.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_digital_in</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_digital_in</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_digital_in</h1> @@ -71,7 +71,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_digital_out.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_digital_out.html index 4b662d5..6705941 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_digital_out.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_digital_out.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_digital_out</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_digital_out</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_digital_out</h1> @@ -76,7 +76,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_servo_attach.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_servo_attach.html index bc9300f..c3c8c47 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_servo_attach.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_servo_attach.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_servo_attach</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_servo_attach</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_servo_attach</h1> @@ -80,7 +80,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_servo_detach.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_servo_detach.html index 072f9c4..e1e0644 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_servo_detach.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_servo_detach.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_servo_detach</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_servo_detach</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_servo_detach</h1> @@ -80,7 +80,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/cmd_servo_move.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_servo_move.html index 06beee4..658ac97 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/cmd_servo_move.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/cmd_servo_move.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -29,7 +29,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > cmd_servo_move</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > cmd_servo_move</span> <br /><br /> <div class="refnamediv"><h1 class="refname">cmd_servo_move</h1> @@ -82,7 +82,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/index.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/index.html index b5383a0..2bc9b37 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/index.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/index.html @@ -31,7 +31,7 @@ <h3 class="book-title">Arduino toolbox</h3> <ul class="list-part"><a name="arduino_toolbox_manual"></a><div class="info"></div> -<li><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html" class="part">Arduino toolbox</a> +<li><a href="section_0065f243e2d913ab014332454f9a0ca0.html" class="part">Arduino toolbox</a> <ul class="list-chapter"><li><a href="ANALOG_READ_SB.html" class="refentry">ANALOG_READ_SB</a> — <span class="refentry-description">Analog ports of an Arduino board which allow the acquisition of an analog input</span></li> diff --git a/tools/linux/help/en_US/scilab_en_US_help/jhelpidx.xml b/tools/scilab/linux/help/en_US/scilab_en_US_help/jhelpidx.xml index aa5a66e..aa5a66e 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/jhelpidx.xml +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/jhelpidx.xml diff --git a/tools/linux/help/en_US/scilab_en_US_help/jhelpmap.jhm b/tools/scilab/linux/help/en_US/scilab_en_US_help/jhelpmap.jhm index 21c724b..d128a03 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/jhelpmap.jhm +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/jhelpmap.jhm @@ -2,7 +2,7 @@ <!DOCTYPE map PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN" "http://java.sun.com/products/javahelp/map_1_0.dtd"> <map version="1.0"> <mapID target="index" url="index.html"/> -<mapID target="section_b8a7072c46d32c1ee288fe3b9d921bcb" url="section_b8a7072c46d32c1ee288fe3b9d921bcb.html"/> +<mapID target="section_0065f243e2d913ab014332454f9a0ca0" url="section_0065f243e2d913ab014332454f9a0ca0.html"/> <mapID target="ANALOG_READ_SB" url="ANALOG_READ_SB.html"/> <mapID target="Contents_ANALOG_READ_SB" url="ANALOG_READ_SB.html#Contents_ANALOG_READ_SB"/> <mapID target="Palette_ANALOG_READ_SB" url="ANALOG_READ_SB.html#Palette_ANALOG_READ_SB"/> diff --git a/tools/linux/help/en_US/scilab_en_US_help/jhelpset.hs b/tools/scilab/linux/help/en_US/scilab_en_US_help/jhelpset.hs index 80509ea..80509ea 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/jhelpset.hs +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/jhelpset.hs diff --git a/tools/linux/help/en_US/scilab_en_US_help/jhelptoc.xml b/tools/scilab/linux/help/en_US/scilab_en_US_help/jhelptoc.xml index 3a2cf4a..3e903b3 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/jhelptoc.xml +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/jhelptoc.xml @@ -2,7 +2,7 @@ <!DOCTYPE toc PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 1.0//EN" "http://java.sun.com/products/javahelp/toc_1_0.dtd"> <toc version="1.0"> <tocitem target="index" text="Arduino toolbox"> -<tocitem target="section_b8a7072c46d32c1ee288fe3b9d921bcb" text="Arduino toolbox"> +<tocitem target="section_0065f243e2d913ab014332454f9a0ca0" text="Arduino toolbox"> <tocitem target="ANALOG_READ_SB" text="ANALOG_READ_SB"/> <tocitem target="ANALOG_WRITE_SB" text="ANALOG_WRITE_SB"/> <tocitem target="ARDUINO_SETUP" text="ARDUINO_SETUP"/> diff --git a/tools/linux/help/en_US/scilab_en_US_help/open_serial.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/open_serial.html index 6ff0718..1fcbdd2 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/open_serial.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/open_serial.html @@ -16,7 +16,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> @@ -28,7 +28,7 @@ - <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a> > open_serial</span> + <span class="path"><a href="index.html">Arduino toolbox</a> >> <a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a> > open_serial</span> <br /><br /> <div class="refnamediv"><h1 class="refname">open_serial</h1> @@ -72,7 +72,7 @@ </td> <td width="40%" class="center"> - <span class="top"><a href="section_b8a7072c46d32c1ee288fe3b9d921bcb.html">Arduino toolbox</a></span> + <span class="top"><a href="section_0065f243e2d913ab014332454f9a0ca0.html">Arduino toolbox</a></span> </td> <td width="30%" class="next"> diff --git a/tools/linux/help/en_US/scilab_en_US_help/scilab_code.css b/tools/scilab/linux/help/en_US/scilab_en_US_help/scilab_code.css index 658f42e..658f42e 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/scilab_code.css +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/scilab_code.css diff --git a/tools/linux/help/en_US/scilab_en_US_help/section_14b1867c218d6510dbcc5160f5def719.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_0065f243e2d913ab014332454f9a0ca0.html index d7feab5..d7feab5 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/section_14b1867c218d6510dbcc5160f5def719.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_0065f243e2d913ab014332454f9a0ca0.html diff --git a/tools/linux/help/en_US/scilab_en_US_help/section_281a422ce6f3febcfc8c21e8aa6841e5.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_14b1867c218d6510dbcc5160f5def719.html index d7feab5..d7feab5 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/section_281a422ce6f3febcfc8c21e8aa6841e5.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_14b1867c218d6510dbcc5160f5def719.html diff --git a/tools/linux/help/en_US/scilab_en_US_help/section_31b851c5cd4247a8b1d03294fc8872b1.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_281a422ce6f3febcfc8c21e8aa6841e5.html index d7feab5..d7feab5 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/section_31b851c5cd4247a8b1d03294fc8872b1.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_281a422ce6f3febcfc8c21e8aa6841e5.html diff --git a/tools/linux/help/en_US/scilab_en_US_help/section_32282c1b5ec2ec16458d86fa5a7a4571.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_31b851c5cd4247a8b1d03294fc8872b1.html index d7feab5..d7feab5 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/section_32282c1b5ec2ec16458d86fa5a7a4571.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_31b851c5cd4247a8b1d03294fc8872b1.html diff --git a/tools/linux/help/en_US/scilab_en_US_help/section_50fcf9fc9c8fb380e36d21e077a34f37.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_32282c1b5ec2ec16458d86fa5a7a4571.html index d7feab5..d7feab5 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/section_50fcf9fc9c8fb380e36d21e077a34f37.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_32282c1b5ec2ec16458d86fa5a7a4571.html diff --git a/tools/linux/help/en_US/scilab_en_US_help/section_b8a7072c46d32c1ee288fe3b9d921bcb.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_50fcf9fc9c8fb380e36d21e077a34f37.html index d7feab5..d7feab5 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/section_b8a7072c46d32c1ee288fe3b9d921bcb.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_50fcf9fc9c8fb380e36d21e077a34f37.html diff --git a/tools/linux/help/en_US/scilab_en_US_help/section_c81b4a57f4486e50a533732328fcb8e9.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_b8a7072c46d32c1ee288fe3b9d921bcb.html index d7feab5..d7feab5 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/section_c81b4a57f4486e50a533732328fcb8e9.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_b8a7072c46d32c1ee288fe3b9d921bcb.html diff --git a/tools/linux/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_c81b4a57f4486e50a533732328fcb8e9.html index d7feab5..d7feab5 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_c81b4a57f4486e50a533732328fcb8e9.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html index d7feab5..d7feab5 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html diff --git a/tools/linux/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html index 51f6ce1..51f6ce1 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html diff --git a/tools/linux/help/en_US/scilab_en_US_help/style.css b/tools/scilab/linux/help/en_US/scilab_en_US_help/style.css index 0fe8923..0fe8923 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/style.css +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/style.css diff --git a/tools/linux/help/en_US/scilab_en_US_help/xml_code.css b/tools/scilab/linux/help/en_US/scilab_en_US_help/xml_code.css index 9e4c27f..9e4c27f 100644 --- a/tools/linux/help/en_US/scilab_en_US_help/xml_code.css +++ b/tools/scilab/linux/help/en_US/scilab_en_US_help/xml_code.css diff --git a/tools/linux/help/fr_En/ANALOG_READ_SB.xml b/tools/scilab/linux/help/fr_En/ANALOG_READ_SB.xml index 408fb79..408fb79 100644 --- a/tools/linux/help/fr_En/ANALOG_READ_SB.xml +++ b/tools/scilab/linux/help/fr_En/ANALOG_READ_SB.xml diff --git a/tools/linux/help/fr_En/ANALOG_READ_SB_dialogbox.png b/tools/scilab/linux/help/fr_En/ANALOG_READ_SB_dialogbox.png Binary files differindex 0a4a823..0a4a823 100644 --- a/tools/linux/help/fr_En/ANALOG_READ_SB_dialogbox.png +++ b/tools/scilab/linux/help/fr_En/ANALOG_READ_SB_dialogbox.png diff --git a/tools/linux/help/fr_En/ANALOG_READ_SB_help.tst b/tools/scilab/linux/help/fr_En/ANALOG_READ_SB_help.tst index a580e42..a580e42 100644 --- a/tools/linux/help/fr_En/ANALOG_READ_SB_help.tst +++ b/tools/scilab/linux/help/fr_En/ANALOG_READ_SB_help.tst diff --git a/tools/linux/help/fr_En/ANALOG_READ_example.png b/tools/scilab/linux/help/fr_En/ANALOG_READ_example.png Binary files differindex 4df93cf..4df93cf 100644 --- a/tools/linux/help/fr_En/ANALOG_READ_example.png +++ b/tools/scilab/linux/help/fr_En/ANALOG_READ_example.png diff --git a/tools/linux/help/fr_En/ANALOG_WRITE_SB.xml b/tools/scilab/linux/help/fr_En/ANALOG_WRITE_SB.xml index 39baf4b..39baf4b 100644 --- a/tools/linux/help/fr_En/ANALOG_WRITE_SB.xml +++ b/tools/scilab/linux/help/fr_En/ANALOG_WRITE_SB.xml diff --git a/tools/linux/help/fr_En/ANALOG_WRITE_SB_dialogbox.png b/tools/scilab/linux/help/fr_En/ANALOG_WRITE_SB_dialogbox.png Binary files differindex febf848..febf848 100644 --- a/tools/linux/help/fr_En/ANALOG_WRITE_SB_dialogbox.png +++ b/tools/scilab/linux/help/fr_En/ANALOG_WRITE_SB_dialogbox.png diff --git a/tools/linux/help/fr_En/ANALOG_WRITE_SB_help.tst b/tools/scilab/linux/help/fr_En/ANALOG_WRITE_SB_help.tst index dffcda1..dffcda1 100644 --- a/tools/linux/help/fr_En/ANALOG_WRITE_SB_help.tst +++ b/tools/scilab/linux/help/fr_En/ANALOG_WRITE_SB_help.tst diff --git a/tools/linux/help/fr_En/ANALOG_WRITE_exemple.png b/tools/scilab/linux/help/fr_En/ANALOG_WRITE_exemple.png Binary files differindex 8b84651..8b84651 100644 --- a/tools/linux/help/fr_En/ANALOG_WRITE_exemple.png +++ b/tools/scilab/linux/help/fr_En/ANALOG_WRITE_exemple.png diff --git a/tools/linux/help/fr_En/ARDUINO_SETUP.xml b/tools/scilab/linux/help/fr_En/ARDUINO_SETUP.xml index 51ba760..51ba760 100644 --- a/tools/linux/help/fr_En/ARDUINO_SETUP.xml +++ b/tools/scilab/linux/help/fr_En/ARDUINO_SETUP.xml diff --git a/tools/linux/help/fr_En/ARDUINO_SETUP_dialogbox.png b/tools/scilab/linux/help/fr_En/ARDUINO_SETUP_dialogbox.png Binary files differindex 715ec38..715ec38 100644 --- a/tools/linux/help/fr_En/ARDUINO_SETUP_dialogbox.png +++ b/tools/scilab/linux/help/fr_En/ARDUINO_SETUP_dialogbox.png diff --git a/tools/linux/help/fr_En/ARDUINO_SETUP_example.png b/tools/scilab/linux/help/fr_En/ARDUINO_SETUP_example.png Binary files differindex 22f0da8..22f0da8 100644 --- a/tools/linux/help/fr_En/ARDUINO_SETUP_example.png +++ b/tools/scilab/linux/help/fr_En/ARDUINO_SETUP_example.png diff --git a/tools/linux/help/fr_En/ARDUINO_SETUP_help.tst b/tools/scilab/linux/help/fr_En/ARDUINO_SETUP_help.tst index 01ec5af..01ec5af 100644 --- a/tools/linux/help/fr_En/ARDUINO_SETUP_help.tst +++ b/tools/scilab/linux/help/fr_En/ARDUINO_SETUP_help.tst diff --git a/tools/linux/help/fr_En/ASSERV_POS_exemple.png b/tools/scilab/linux/help/fr_En/ASSERV_POS_exemple.png Binary files differindex 2ddb447..2ddb447 100644 --- a/tools/linux/help/fr_En/ASSERV_POS_exemple.png +++ b/tools/scilab/linux/help/fr_En/ASSERV_POS_exemple.png diff --git a/tools/linux/help/fr_En/DCMOTOR_SB.tst b/tools/scilab/linux/help/fr_En/DCMOTOR_SB.tst index bebb341..bebb341 100644 --- a/tools/linux/help/fr_En/DCMOTOR_SB.tst +++ b/tools/scilab/linux/help/fr_En/DCMOTOR_SB.tst diff --git a/tools/linux/help/fr_En/DCMOTOR_SB.xml b/tools/scilab/linux/help/fr_En/DCMOTOR_SB.xml index f33cca0..f33cca0 100644 --- a/tools/linux/help/fr_En/DCMOTOR_SB.xml +++ b/tools/scilab/linux/help/fr_En/DCMOTOR_SB.xml diff --git a/tools/linux/help/fr_En/DCMOTOR_SB_dialogbox1.png b/tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox1.png Binary files differindex 5bf8920..5bf8920 100644 --- a/tools/linux/help/fr_En/DCMOTOR_SB_dialogbox1.png +++ b/tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox1.png diff --git a/tools/linux/help/fr_En/DCMOTOR_SB_dialogbox2.png b/tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox2.png Binary files differindex 4d2a7b4..4d2a7b4 100644 --- a/tools/linux/help/fr_En/DCMOTOR_SB_dialogbox2.png +++ b/tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox2.png diff --git a/tools/linux/help/fr_En/DCMOTOR_SB_dialogbox3.png b/tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox3.png Binary files differindex 34a15d0..34a15d0 100644 --- a/tools/linux/help/fr_En/DCMOTOR_SB_dialogbox3.png +++ b/tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox3.png diff --git a/tools/linux/help/fr_En/DCMOTOR_SB_dialogbox4.png b/tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox4.png Binary files differindex c80e6c3..c80e6c3 100644 --- a/tools/linux/help/fr_En/DCMOTOR_SB_dialogbox4.png +++ b/tools/scilab/linux/help/fr_En/DCMOTOR_SB_dialogbox4.png diff --git a/tools/linux/help/fr_En/DCMOTOR_exemple.png b/tools/scilab/linux/help/fr_En/DCMOTOR_exemple.png Binary files differindex 24e50fe..24e50fe 100644 --- a/tools/linux/help/fr_En/DCMOTOR_exemple.png +++ b/tools/scilab/linux/help/fr_En/DCMOTOR_exemple.png diff --git a/tools/linux/help/fr_En/DIGITAL_READ_SB.xml b/tools/scilab/linux/help/fr_En/DIGITAL_READ_SB.xml index 3a0bbc7..3a0bbc7 100644 --- a/tools/linux/help/fr_En/DIGITAL_READ_SB.xml +++ b/tools/scilab/linux/help/fr_En/DIGITAL_READ_SB.xml diff --git a/tools/linux/help/fr_En/DIGITAL_READ_SB_dialogbox.png b/tools/scilab/linux/help/fr_En/DIGITAL_READ_SB_dialogbox.png Binary files differindex 244b37d..244b37d 100644 --- a/tools/linux/help/fr_En/DIGITAL_READ_SB_dialogbox.png +++ b/tools/scilab/linux/help/fr_En/DIGITAL_READ_SB_dialogbox.png diff --git a/tools/linux/help/fr_En/DIGITAL_READ_SB_help.tst b/tools/scilab/linux/help/fr_En/DIGITAL_READ_SB_help.tst index 4527a64..4527a64 100644 --- a/tools/linux/help/fr_En/DIGITAL_READ_SB_help.tst +++ b/tools/scilab/linux/help/fr_En/DIGITAL_READ_SB_help.tst diff --git a/tools/linux/help/fr_En/DIGITAL_WRITE_SB.xml b/tools/scilab/linux/help/fr_En/DIGITAL_WRITE_SB.xml index 1170bfa..1170bfa 100644 --- a/tools/linux/help/fr_En/DIGITAL_WRITE_SB.xml +++ b/tools/scilab/linux/help/fr_En/DIGITAL_WRITE_SB.xml diff --git a/tools/linux/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png b/tools/scilab/linux/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png Binary files differindex 4abc644..4abc644 100644 --- a/tools/linux/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png +++ b/tools/scilab/linux/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png diff --git a/tools/linux/help/fr_En/DIGITAL_WRITE_SB_help.tst b/tools/scilab/linux/help/fr_En/DIGITAL_WRITE_SB_help.tst index 10a9262..10a9262 100644 --- a/tools/linux/help/fr_En/DIGITAL_WRITE_SB_help.tst +++ b/tools/scilab/linux/help/fr_En/DIGITAL_WRITE_SB_help.tst diff --git a/tools/linux/help/fr_En/DIGITAL_exemple.png b/tools/scilab/linux/help/fr_En/DIGITAL_exemple.png Binary files differindex 22832fa..22832fa 100644 --- a/tools/linux/help/fr_En/DIGITAL_exemple.png +++ b/tools/scilab/linux/help/fr_En/DIGITAL_exemple.png diff --git a/tools/linux/help/fr_En/ENCODER_SB.tst b/tools/scilab/linux/help/fr_En/ENCODER_SB.tst index bc2c04d..bc2c04d 100644 --- a/tools/linux/help/fr_En/ENCODER_SB.tst +++ b/tools/scilab/linux/help/fr_En/ENCODER_SB.tst diff --git a/tools/linux/help/fr_En/ENCODER_SB.xml b/tools/scilab/linux/help/fr_En/ENCODER_SB.xml index 827be7c..827be7c 100644 --- a/tools/linux/help/fr_En/ENCODER_SB.xml +++ b/tools/scilab/linux/help/fr_En/ENCODER_SB.xml diff --git a/tools/linux/help/fr_En/ENCODER_SB_dialogbox1.png b/tools/scilab/linux/help/fr_En/ENCODER_SB_dialogbox1.png Binary files differindex 8dbe19c..8dbe19c 100644 --- a/tools/linux/help/fr_En/ENCODER_SB_dialogbox1.png +++ b/tools/scilab/linux/help/fr_En/ENCODER_SB_dialogbox1.png diff --git a/tools/linux/help/fr_En/ENCODER_SB_dialogbox2.png b/tools/scilab/linux/help/fr_En/ENCODER_SB_dialogbox2.png Binary files differindex b63878e..b63878e 100644 --- a/tools/linux/help/fr_En/ENCODER_SB_dialogbox2.png +++ b/tools/scilab/linux/help/fr_En/ENCODER_SB_dialogbox2.png diff --git a/tools/linux/help/fr_En/ENCODER_exemple.png b/tools/scilab/linux/help/fr_En/ENCODER_exemple.png Binary files differindex 9c477cf..9c477cf 100644 --- a/tools/linux/help/fr_En/ENCODER_exemple.png +++ b/tools/scilab/linux/help/fr_En/ENCODER_exemple.png diff --git a/tools/linux/help/fr_En/INTERRUPT_SB.tst b/tools/scilab/linux/help/fr_En/INTERRUPT_SB.tst index 81c6117..81c6117 100644 --- a/tools/linux/help/fr_En/INTERRUPT_SB.tst +++ b/tools/scilab/linux/help/fr_En/INTERRUPT_SB.tst diff --git a/tools/linux/help/fr_En/INTERRUPT_SB.xml b/tools/scilab/linux/help/fr_En/INTERRUPT_SB.xml index 3f15c00..3f15c00 100644 --- a/tools/linux/help/fr_En/INTERRUPT_SB.xml +++ b/tools/scilab/linux/help/fr_En/INTERRUPT_SB.xml diff --git a/tools/linux/help/fr_En/INTERRUPT_SB_dialogbox.png b/tools/scilab/linux/help/fr_En/INTERRUPT_SB_dialogbox.png Binary files differindex ec3f62c..ec3f62c 100644 --- a/tools/linux/help/fr_En/INTERRUPT_SB_dialogbox.png +++ b/tools/scilab/linux/help/fr_En/INTERRUPT_SB_dialogbox.png diff --git a/tools/linux/help/fr_En/INTERRUPT_exemple.png b/tools/scilab/linux/help/fr_En/INTERRUPT_exemple.png Binary files differindex 7807247..7807247 100644 --- a/tools/linux/help/fr_En/INTERRUPT_exemple.png +++ b/tools/scilab/linux/help/fr_En/INTERRUPT_exemple.png diff --git a/tools/linux/help/fr_En/SERVO_SB.tst b/tools/scilab/linux/help/fr_En/SERVO_SB.tst index a79340d..a79340d 100644 --- a/tools/linux/help/fr_En/SERVO_SB.tst +++ b/tools/scilab/linux/help/fr_En/SERVO_SB.tst diff --git a/tools/linux/help/fr_En/SERVO_SB_dialogbox.png b/tools/scilab/linux/help/fr_En/SERVO_SB_dialogbox.png Binary files differindex a421e75..a421e75 100644 --- a/tools/linux/help/fr_En/SERVO_SB_dialogbox.png +++ b/tools/scilab/linux/help/fr_En/SERVO_SB_dialogbox.png diff --git a/tools/linux/help/fr_En/SERVO_SB_exemple.png b/tools/scilab/linux/help/fr_En/SERVO_SB_exemple.png Binary files differindex 45b7e51..45b7e51 100644 --- a/tools/linux/help/fr_En/SERVO_SB_exemple.png +++ b/tools/scilab/linux/help/fr_En/SERVO_SB_exemple.png diff --git a/tools/linux/help/fr_En/SERVO_WRITE_SB.xml b/tools/scilab/linux/help/fr_En/SERVO_WRITE_SB.xml index a2bf3d1..a2bf3d1 100644 --- a/tools/linux/help/fr_En/SERVO_WRITE_SB.xml +++ b/tools/scilab/linux/help/fr_En/SERVO_WRITE_SB.xml diff --git a/tools/linux/help/fr_En/TIME_SAMPLE.xml b/tools/scilab/linux/help/fr_En/TIME_SAMPLE.xml index 9994a66..9994a66 100644 --- a/tools/linux/help/fr_En/TIME_SAMPLE.xml +++ b/tools/scilab/linux/help/fr_En/TIME_SAMPLE.xml diff --git a/tools/linux/help/fr_En/TIME_SAMPLE_dialogbox.png b/tools/scilab/linux/help/fr_En/TIME_SAMPLE_dialogbox.png Binary files differindex 45022af..45022af 100644 --- a/tools/linux/help/fr_En/TIME_SAMPLE_dialogbox.png +++ b/tools/scilab/linux/help/fr_En/TIME_SAMPLE_dialogbox.png diff --git a/tools/linux/help/fr_En/TIME_SAMPLE_help.tst b/tools/scilab/linux/help/fr_En/TIME_SAMPLE_help.tst index 56ed48a..56ed48a 100644 --- a/tools/linux/help/fr_En/TIME_SAMPLE_help.tst +++ b/tools/scilab/linux/help/fr_En/TIME_SAMPLE_help.tst diff --git a/tools/linux/help/fr_En/build_help.sce b/tools/scilab/linux/help/fr_En/build_help.sce index 7065316..7065316 100644 --- a/tools/linux/help/fr_En/build_help.sce +++ b/tools/scilab/linux/help/fr_En/build_help.sce diff --git a/tools/linux/help/fr_En/read_file_doc.sci b/tools/scilab/linux/help/fr_En/read_file_doc.sci index 254a1d1..254a1d1 100644 --- a/tools/linux/help/fr_En/read_file_doc.sci +++ b/tools/scilab/linux/help/fr_En/read_file_doc.sci diff --git a/tools/linux/images/gif/ANALOG_READ_SB.gif b/tools/scilab/linux/images/gif/ANALOG_READ_SB.gif Binary files differindex 00a75c6..00a75c6 100644 --- a/tools/linux/images/gif/ANALOG_READ_SB.gif +++ b/tools/scilab/linux/images/gif/ANALOG_READ_SB.gif diff --git a/tools/linux/images/gif/ANALOG_WRITE_SB.gif b/tools/scilab/linux/images/gif/ANALOG_WRITE_SB.gif Binary files differindex 1da5d03..1da5d03 100644 --- a/tools/linux/images/gif/ANALOG_WRITE_SB.gif +++ b/tools/scilab/linux/images/gif/ANALOG_WRITE_SB.gif diff --git a/tools/linux/images/gif/ARDUINO_ANALOG_READ.gif b/tools/scilab/linux/images/gif/ARDUINO_ANALOG_READ.gif Binary files differindex 2a680b7..2a680b7 100644 --- a/tools/linux/images/gif/ARDUINO_ANALOG_READ.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_ANALOG_READ.gif diff --git a/tools/linux/images/gif/ARDUINO_ANALOG_WRITE.gif b/tools/scilab/linux/images/gif/ARDUINO_ANALOG_WRITE.gif Binary files differindex 3cf3364..3cf3364 100644 --- a/tools/linux/images/gif/ARDUINO_ANALOG_WRITE.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_ANALOG_WRITE.gif diff --git a/tools/linux/images/gif/ARDUINO_DCMOTOR.gif b/tools/scilab/linux/images/gif/ARDUINO_DCMOTOR.gif Binary files differindex f873281..f873281 100644 --- a/tools/linux/images/gif/ARDUINO_DCMOTOR.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_DCMOTOR.gif diff --git a/tools/linux/images/gif/ARDUINO_DIGITAL_READ.gif b/tools/scilab/linux/images/gif/ARDUINO_DIGITAL_READ.gif Binary files differindex d9dd4d1..d9dd4d1 100644 --- a/tools/linux/images/gif/ARDUINO_DIGITAL_READ.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_DIGITAL_READ.gif diff --git a/tools/linux/images/gif/ARDUINO_DIGITAL_WRITE.gif b/tools/scilab/linux/images/gif/ARDUINO_DIGITAL_WRITE.gif Binary files differindex 29a333a..29a333a 100644 --- a/tools/linux/images/gif/ARDUINO_DIGITAL_WRITE.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_DIGITAL_WRITE.gif diff --git a/tools/linux/images/gif/ARDUINO_ENCODER.gif b/tools/scilab/linux/images/gif/ARDUINO_ENCODER.gif Binary files differindex 51603db..51603db 100644 --- a/tools/linux/images/gif/ARDUINO_ENCODER.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_ENCODER.gif diff --git a/tools/linux/images/gif/ARDUINO_INTERRUPT.gif b/tools/scilab/linux/images/gif/ARDUINO_INTERRUPT.gif Binary files differindex f9540a0..f9540a0 100644 --- a/tools/linux/images/gif/ARDUINO_INTERRUPT.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_INTERRUPT.gif diff --git a/tools/linux/images/gif/ARDUINO_SCOPE.gif b/tools/scilab/linux/images/gif/ARDUINO_SCOPE.gif Binary files differindex 55d3ccd..55d3ccd 100644 --- a/tools/linux/images/gif/ARDUINO_SCOPE.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_SCOPE.gif diff --git a/tools/linux/images/gif/ARDUINO_SERVO_READ.gif b/tools/scilab/linux/images/gif/ARDUINO_SERVO_READ.gif Binary files differindex d6e584e..d6e584e 100644 --- a/tools/linux/images/gif/ARDUINO_SERVO_READ.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_SERVO_READ.gif diff --git a/tools/linux/images/gif/ARDUINO_SERVO_WRITE.gif b/tools/scilab/linux/images/gif/ARDUINO_SERVO_WRITE.gif Binary files differindex f3e7195..f3e7195 100644 --- a/tools/linux/images/gif/ARDUINO_SERVO_WRITE.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_SERVO_WRITE.gif diff --git a/tools/linux/images/gif/ARDUINO_SETUP.gif b/tools/scilab/linux/images/gif/ARDUINO_SETUP.gif Binary files differindex e2e8d42..e2e8d42 100644 --- a/tools/linux/images/gif/ARDUINO_SETUP.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_SETUP.gif diff --git a/tools/linux/images/gif/ARDUINO_STEPPER.gif b/tools/scilab/linux/images/gif/ARDUINO_STEPPER.gif Binary files differindex 7313733..7313733 100644 --- a/tools/linux/images/gif/ARDUINO_STEPPER.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_STEPPER.gif diff --git a/tools/linux/images/gif/ARDUINO_WRITE.gif b/tools/scilab/linux/images/gif/ARDUINO_WRITE.gif Binary files differindex f9540a0..f9540a0 100644 --- a/tools/linux/images/gif/ARDUINO_WRITE.gif +++ b/tools/scilab/linux/images/gif/ARDUINO_WRITE.gif diff --git a/tools/linux/images/gif/DCMOTOR_SB.gif b/tools/scilab/linux/images/gif/DCMOTOR_SB.gif Binary files differindex c5cf0e6..c5cf0e6 100644 --- a/tools/linux/images/gif/DCMOTOR_SB.gif +++ b/tools/scilab/linux/images/gif/DCMOTOR_SB.gif diff --git a/tools/linux/images/gif/DIGITAL_READ_SB.gif b/tools/scilab/linux/images/gif/DIGITAL_READ_SB.gif Binary files differindex 39dea04..39dea04 100644 --- a/tools/linux/images/gif/DIGITAL_READ_SB.gif +++ b/tools/scilab/linux/images/gif/DIGITAL_READ_SB.gif diff --git a/tools/linux/images/gif/DIGITAL_WRITE_SB.gif b/tools/scilab/linux/images/gif/DIGITAL_WRITE_SB.gif Binary files differindex e47dca2..e47dca2 100644 --- a/tools/linux/images/gif/DIGITAL_WRITE_SB.gif +++ b/tools/scilab/linux/images/gif/DIGITAL_WRITE_SB.gif diff --git a/tools/linux/images/gif/ENCODER_SB.gif b/tools/scilab/linux/images/gif/ENCODER_SB.gif Binary files differindex 6cbd55b..6cbd55b 100644 --- a/tools/linux/images/gif/ENCODER_SB.gif +++ b/tools/scilab/linux/images/gif/ENCODER_SB.gif diff --git a/tools/linux/images/gif/INTERRUPT_SB.gif b/tools/scilab/linux/images/gif/INTERRUPT_SB.gif Binary files differindex ec40a43..ec40a43 100644 --- a/tools/linux/images/gif/INTERRUPT_SB.gif +++ b/tools/scilab/linux/images/gif/INTERRUPT_SB.gif diff --git a/tools/linux/images/gif/SERVO_READ_SB.gif b/tools/scilab/linux/images/gif/SERVO_READ_SB.gif Binary files differindex f9540a0..f9540a0 100644 --- a/tools/linux/images/gif/SERVO_READ_SB.gif +++ b/tools/scilab/linux/images/gif/SERVO_READ_SB.gif diff --git a/tools/linux/images/gif/SERVO_WRITE_SB.gif b/tools/scilab/linux/images/gif/SERVO_WRITE_SB.gif Binary files differindex f04d9fe..f04d9fe 100644 --- a/tools/linux/images/gif/SERVO_WRITE_SB.gif +++ b/tools/scilab/linux/images/gif/SERVO_WRITE_SB.gif diff --git a/tools/linux/images/gif/STEPPER_SB.gif b/tools/scilab/linux/images/gif/STEPPER_SB.gif Binary files differindex e49a338..e49a338 100644 --- a/tools/linux/images/gif/STEPPER_SB.gif +++ b/tools/scilab/linux/images/gif/STEPPER_SB.gif diff --git a/tools/linux/images/gif/TIME_SAMPLE.gif b/tools/scilab/linux/images/gif/TIME_SAMPLE.gif Binary files differindex 01837f0..01837f0 100644 --- a/tools/linux/images/gif/TIME_SAMPLE.gif +++ b/tools/scilab/linux/images/gif/TIME_SAMPLE.gif diff --git a/tools/linux/images/h5/ANALOG_READ_SB.sod b/tools/scilab/linux/images/h5/ANALOG_READ_SB.sod Binary files differindex af876ff..8839260 100644 --- a/tools/linux/images/h5/ANALOG_READ_SB.sod +++ b/tools/scilab/linux/images/h5/ANALOG_READ_SB.sod diff --git a/tools/linux/images/h5/ANALOG_WRITE_SB.sod b/tools/scilab/linux/images/h5/ANALOG_WRITE_SB.sod Binary files differindex 18707d6..83253de 100644 --- a/tools/linux/images/h5/ANALOG_WRITE_SB.sod +++ b/tools/scilab/linux/images/h5/ANALOG_WRITE_SB.sod diff --git a/tools/linux/images/h5/ARDUINO_ANALOG_READ.sod b/tools/scilab/linux/images/h5/ARDUINO_ANALOG_READ.sod Binary files differindex 277977c..3087af9 100644 --- a/tools/linux/images/h5/ARDUINO_ANALOG_READ.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_ANALOG_READ.sod diff --git a/tools/linux/images/h5/ARDUINO_ANALOG_WRITE.sod b/tools/scilab/linux/images/h5/ARDUINO_ANALOG_WRITE.sod Binary files differindex f2f522c..c3d1256 100644 --- a/tools/linux/images/h5/ARDUINO_ANALOG_WRITE.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_ANALOG_WRITE.sod diff --git a/tools/linux/images/h5/ARDUINO_DCMOTOR.sod b/tools/scilab/linux/images/h5/ARDUINO_DCMOTOR.sod Binary files differindex 12342af..3680dfe 100644 --- a/tools/linux/images/h5/ARDUINO_DCMOTOR.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_DCMOTOR.sod diff --git a/tools/linux/images/h5/ARDUINO_DIGITAL_READ.sod b/tools/scilab/linux/images/h5/ARDUINO_DIGITAL_READ.sod Binary files differindex b5cafde..50c1295 100644 --- a/tools/linux/images/h5/ARDUINO_DIGITAL_READ.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_DIGITAL_READ.sod diff --git a/tools/linux/images/h5/ARDUINO_DIGITAL_WRITE.sod b/tools/scilab/linux/images/h5/ARDUINO_DIGITAL_WRITE.sod Binary files differindex 68f282f..9328430 100644 --- a/tools/linux/images/h5/ARDUINO_DIGITAL_WRITE.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_DIGITAL_WRITE.sod diff --git a/tools/linux/images/h5/ARDUINO_ENCODER.sod b/tools/scilab/linux/images/h5/ARDUINO_ENCODER.sod Binary files differindex 1d099b5..118047a 100644 --- a/tools/linux/images/h5/ARDUINO_ENCODER.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_ENCODER.sod diff --git a/tools/linux/images/h5/ARDUINO_INTERRUPT.sod b/tools/scilab/linux/images/h5/ARDUINO_INTERRUPT.sod Binary files differindex bbb45f3..7e64564 100644 --- a/tools/linux/images/h5/ARDUINO_INTERRUPT.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_INTERRUPT.sod diff --git a/tools/linux/images/h5/ARDUINO_SCOPE.sod b/tools/scilab/linux/images/h5/ARDUINO_SCOPE.sod Binary files differindex 66633bf..563c44f 100644 --- a/tools/linux/images/h5/ARDUINO_SCOPE.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_SCOPE.sod diff --git a/tools/linux/images/h5/ARDUINO_SERVO_READ.sod b/tools/scilab/linux/images/h5/ARDUINO_SERVO_READ.sod Binary files differindex 7e48966..bb143eb 100644 --- a/tools/linux/images/h5/ARDUINO_SERVO_READ.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_SERVO_READ.sod diff --git a/tools/linux/images/h5/ARDUINO_SERVO_WRITE.sod b/tools/scilab/linux/images/h5/ARDUINO_SERVO_WRITE.sod Binary files differindex 4ac7f3a..4a7dbe5 100644 --- a/tools/linux/images/h5/ARDUINO_SERVO_WRITE.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_SERVO_WRITE.sod diff --git a/tools/linux/images/h5/ARDUINO_SETUP.sod b/tools/scilab/linux/images/h5/ARDUINO_SETUP.sod Binary files differindex 3288fab..d0ef768 100644 --- a/tools/linux/images/h5/ARDUINO_SETUP.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_SETUP.sod diff --git a/tools/linux/images/h5/ARDUINO_STEPPER.sod b/tools/scilab/linux/images/h5/ARDUINO_STEPPER.sod Binary files differindex 6b53d68..af3a223 100644 --- a/tools/linux/images/h5/ARDUINO_STEPPER.sod +++ b/tools/scilab/linux/images/h5/ARDUINO_STEPPER.sod diff --git a/tools/linux/images/h5/DCMOTOR_SB.sod b/tools/scilab/linux/images/h5/DCMOTOR_SB.sod Binary files differindex 3605a96..27d1f32 100644 --- a/tools/linux/images/h5/DCMOTOR_SB.sod +++ b/tools/scilab/linux/images/h5/DCMOTOR_SB.sod diff --git a/tools/linux/images/h5/DIGITAL_READ_SB.sod b/tools/scilab/linux/images/h5/DIGITAL_READ_SB.sod Binary files differindex d186b3a..bcaac3c 100644 --- a/tools/linux/images/h5/DIGITAL_READ_SB.sod +++ b/tools/scilab/linux/images/h5/DIGITAL_READ_SB.sod diff --git a/tools/linux/images/h5/DIGITAL_WRITE_SB.sod b/tools/scilab/linux/images/h5/DIGITAL_WRITE_SB.sod Binary files differindex 29b48b1..2bdac7b 100644 --- a/tools/linux/images/h5/DIGITAL_WRITE_SB.sod +++ b/tools/scilab/linux/images/h5/DIGITAL_WRITE_SB.sod diff --git a/tools/linux/images/h5/ENCODER_SB.sod b/tools/scilab/linux/images/h5/ENCODER_SB.sod Binary files differindex d815190..df48750 100644 --- a/tools/linux/images/h5/ENCODER_SB.sod +++ b/tools/scilab/linux/images/h5/ENCODER_SB.sod diff --git a/tools/linux/images/h5/INTERRUPT_SB.sod b/tools/scilab/linux/images/h5/INTERRUPT_SB.sod Binary files differindex 1e16ae9..04cf3df 100644 --- a/tools/linux/images/h5/INTERRUPT_SB.sod +++ b/tools/scilab/linux/images/h5/INTERRUPT_SB.sod diff --git a/tools/linux/images/h5/SERVO_READ_SB.sod b/tools/scilab/linux/images/h5/SERVO_READ_SB.sod Binary files differindex c319dc4..bbe57d8 100644 --- a/tools/linux/images/h5/SERVO_READ_SB.sod +++ b/tools/scilab/linux/images/h5/SERVO_READ_SB.sod diff --git a/tools/linux/images/h5/SERVO_WRITE_SB.sod b/tools/scilab/linux/images/h5/SERVO_WRITE_SB.sod Binary files differindex b6b8ce7..bcd5ade 100644 --- a/tools/linux/images/h5/SERVO_WRITE_SB.sod +++ b/tools/scilab/linux/images/h5/SERVO_WRITE_SB.sod diff --git a/tools/linux/images/h5/STEPPER_SB.sod b/tools/scilab/linux/images/h5/STEPPER_SB.sod Binary files differindex eb4a566..6a2480a 100644 --- a/tools/linux/images/h5/STEPPER_SB.sod +++ b/tools/scilab/linux/images/h5/STEPPER_SB.sod diff --git a/tools/linux/images/h5/TIME_SAMPLE.sod b/tools/scilab/linux/images/h5/TIME_SAMPLE.sod Binary files differindex f87ff5f..c5fccd8 100644 --- a/tools/linux/images/h5/TIME_SAMPLE.sod +++ b/tools/scilab/linux/images/h5/TIME_SAMPLE.sod diff --git a/tools/linux/images/svg/ANALOG_READ_SB.svg b/tools/scilab/linux/images/svg/ANALOG_READ_SB.svg index b714955..b714955 100644 --- a/tools/linux/images/svg/ANALOG_READ_SB.svg +++ b/tools/scilab/linux/images/svg/ANALOG_READ_SB.svg diff --git a/tools/linux/images/svg/ANALOG_WRITE_SB.svg b/tools/scilab/linux/images/svg/ANALOG_WRITE_SB.svg index 36ef087..36ef087 100644 --- a/tools/linux/images/svg/ANALOG_WRITE_SB.svg +++ b/tools/scilab/linux/images/svg/ANALOG_WRITE_SB.svg diff --git a/tools/linux/images/svg/ARDUINO_ANALOG_READ.svg b/tools/scilab/linux/images/svg/ARDUINO_ANALOG_READ.svg index b714955..b714955 100644 --- a/tools/linux/images/svg/ARDUINO_ANALOG_READ.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_ANALOG_READ.svg diff --git a/tools/linux/images/svg/ARDUINO_ANALOG_WRITE.svg b/tools/scilab/linux/images/svg/ARDUINO_ANALOG_WRITE.svg index 36ef087..36ef087 100644 --- a/tools/linux/images/svg/ARDUINO_ANALOG_WRITE.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_ANALOG_WRITE.svg diff --git a/tools/linux/images/svg/ARDUINO_DCMOTOR.svg b/tools/scilab/linux/images/svg/ARDUINO_DCMOTOR.svg index 0b18a66..0b18a66 100644 --- a/tools/linux/images/svg/ARDUINO_DCMOTOR.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_DCMOTOR.svg diff --git a/tools/linux/images/svg/ARDUINO_DIGITAL_READ.svg b/tools/scilab/linux/images/svg/ARDUINO_DIGITAL_READ.svg index 720a675..720a675 100644 --- a/tools/linux/images/svg/ARDUINO_DIGITAL_READ.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_DIGITAL_READ.svg diff --git a/tools/linux/images/svg/ARDUINO_DIGITAL_WRITE.svg b/tools/scilab/linux/images/svg/ARDUINO_DIGITAL_WRITE.svg index 720a675..720a675 100644 --- a/tools/linux/images/svg/ARDUINO_DIGITAL_WRITE.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_DIGITAL_WRITE.svg diff --git a/tools/linux/images/svg/ARDUINO_ENCODER.svg b/tools/scilab/linux/images/svg/ARDUINO_ENCODER.svg index e3ce332..e3ce332 100644 --- a/tools/linux/images/svg/ARDUINO_ENCODER.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_ENCODER.svg diff --git a/tools/linux/images/svg/ARDUINO_INTERRUPT.svg b/tools/scilab/linux/images/svg/ARDUINO_INTERRUPT.svg index e3ce332..e3ce332 100644 --- a/tools/linux/images/svg/ARDUINO_INTERRUPT.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_INTERRUPT.svg diff --git a/tools/linux/images/svg/ARDUINO_SCOPE.svg b/tools/scilab/linux/images/svg/ARDUINO_SCOPE.svg index bd06723..bd06723 100644 --- a/tools/linux/images/svg/ARDUINO_SCOPE.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_SCOPE.svg diff --git a/tools/linux/images/svg/ARDUINO_SERVO_READ.svg b/tools/scilab/linux/images/svg/ARDUINO_SERVO_READ.svg index 960d74f..960d74f 100644 --- a/tools/linux/images/svg/ARDUINO_SERVO_READ.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_SERVO_READ.svg diff --git a/tools/linux/images/svg/ARDUINO_SERVO_WRITE.svg b/tools/scilab/linux/images/svg/ARDUINO_SERVO_WRITE.svg index 960d74f..960d74f 100644 --- a/tools/linux/images/svg/ARDUINO_SERVO_WRITE.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_SERVO_WRITE.svg diff --git a/tools/linux/images/svg/ARDUINO_SETUP.svg b/tools/scilab/linux/images/svg/ARDUINO_SETUP.svg index b9b2097..b9b2097 100644 --- a/tools/linux/images/svg/ARDUINO_SETUP.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_SETUP.svg diff --git a/tools/linux/images/svg/ARDUINO_STEPPER.svg b/tools/scilab/linux/images/svg/ARDUINO_STEPPER.svg index 068cfdf..068cfdf 100644 --- a/tools/linux/images/svg/ARDUINO_STEPPER.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_STEPPER.svg diff --git a/tools/linux/images/svg/ARDUINO_WRITE.svg b/tools/scilab/linux/images/svg/ARDUINO_WRITE.svg index 9ed8f4d..9ed8f4d 100644 --- a/tools/linux/images/svg/ARDUINO_WRITE.svg +++ b/tools/scilab/linux/images/svg/ARDUINO_WRITE.svg diff --git a/tools/linux/images/svg/DCMOTOR_SB.svg b/tools/scilab/linux/images/svg/DCMOTOR_SB.svg index 0b18a66..0b18a66 100644 --- a/tools/linux/images/svg/DCMOTOR_SB.svg +++ b/tools/scilab/linux/images/svg/DCMOTOR_SB.svg diff --git a/tools/linux/images/svg/DIGITAL_READ_SB.svg b/tools/scilab/linux/images/svg/DIGITAL_READ_SB.svg index 720a675..720a675 100644 --- a/tools/linux/images/svg/DIGITAL_READ_SB.svg +++ b/tools/scilab/linux/images/svg/DIGITAL_READ_SB.svg diff --git a/tools/linux/images/svg/DIGITAL_WRITE_SB.svg b/tools/scilab/linux/images/svg/DIGITAL_WRITE_SB.svg index 720a675..720a675 100644 --- a/tools/linux/images/svg/DIGITAL_WRITE_SB.svg +++ b/tools/scilab/linux/images/svg/DIGITAL_WRITE_SB.svg diff --git a/tools/linux/images/svg/ENCODER_SB.svg b/tools/scilab/linux/images/svg/ENCODER_SB.svg index e3ce332..e3ce332 100644 --- a/tools/linux/images/svg/ENCODER_SB.svg +++ b/tools/scilab/linux/images/svg/ENCODER_SB.svg diff --git a/tools/linux/images/svg/INTERRUPT_SB.svg b/tools/scilab/linux/images/svg/INTERRUPT_SB.svg index ffcc1b1..ffcc1b1 100644 --- a/tools/linux/images/svg/INTERRUPT_SB.svg +++ b/tools/scilab/linux/images/svg/INTERRUPT_SB.svg diff --git a/tools/linux/images/svg/SERVO_READ_SB.svg b/tools/scilab/linux/images/svg/SERVO_READ_SB.svg index 960d74f..960d74f 100644 --- a/tools/linux/images/svg/SERVO_READ_SB.svg +++ b/tools/scilab/linux/images/svg/SERVO_READ_SB.svg diff --git a/tools/linux/images/svg/SERVO_WRITE_SB.svg b/tools/scilab/linux/images/svg/SERVO_WRITE_SB.svg index 960d74f..960d74f 100644 --- a/tools/linux/images/svg/SERVO_WRITE_SB.svg +++ b/tools/scilab/linux/images/svg/SERVO_WRITE_SB.svg diff --git a/tools/linux/images/svg/STEPPER_SB.svg b/tools/scilab/linux/images/svg/STEPPER_SB.svg index 068cfdf..068cfdf 100644 --- a/tools/linux/images/svg/STEPPER_SB.svg +++ b/tools/scilab/linux/images/svg/STEPPER_SB.svg diff --git a/tools/linux/images/svg/TIME_SAMPLE.svg b/tools/scilab/linux/images/svg/TIME_SAMPLE.svg index 04530bd..04530bd 100644 --- a/tools/linux/images/svg/TIME_SAMPLE.svg +++ b/tools/scilab/linux/images/svg/TIME_SAMPLE.svg diff --git a/tools/linux/jar/scilab_en_US_help.jar b/tools/scilab/linux/jar/scilab_en_US_help.jar Binary files differindex 6c4c362..fe38496 100644 --- a/tools/linux/jar/scilab_en_US_help.jar +++ b/tools/scilab/linux/jar/scilab_en_US_help.jar diff --git a/tools/linux/loader.sce b/tools/scilab/linux/loader.sce index ebdd363..ebdd363 100644 --- a/tools/linux/loader.sce +++ b/tools/scilab/linux/loader.sce diff --git a/tools/linux/macros/ANALOG_READ_SB.bin b/tools/scilab/linux/macros/ANALOG_READ_SB.bin Binary files differindex d7573ca..d7573ca 100644 --- a/tools/linux/macros/ANALOG_READ_SB.bin +++ b/tools/scilab/linux/macros/ANALOG_READ_SB.bin diff --git a/tools/linux/macros/ANALOG_READ_SB.sci b/tools/scilab/linux/macros/ANALOG_READ_SB.sci index f2f1b4c..f2f1b4c 100644 --- a/tools/linux/macros/ANALOG_READ_SB.sci +++ b/tools/scilab/linux/macros/ANALOG_READ_SB.sci diff --git a/tools/linux/macros/ANALOG_WRITE_SB.bin b/tools/scilab/linux/macros/ANALOG_WRITE_SB.bin Binary files differindex 31b1f15..31b1f15 100644 --- a/tools/linux/macros/ANALOG_WRITE_SB.bin +++ b/tools/scilab/linux/macros/ANALOG_WRITE_SB.bin diff --git a/tools/linux/macros/ANALOG_WRITE_SB.sci b/tools/scilab/linux/macros/ANALOG_WRITE_SB.sci index b9af007..b9af007 100644 --- a/tools/linux/macros/ANALOG_WRITE_SB.sci +++ b/tools/scilab/linux/macros/ANALOG_WRITE_SB.sci diff --git a/tools/linux/macros/ARDUINO_ANALOG_READ.bin b/tools/scilab/linux/macros/ARDUINO_ANALOG_READ.bin Binary files differindex f937950..f937950 100644 --- a/tools/linux/macros/ARDUINO_ANALOG_READ.bin +++ b/tools/scilab/linux/macros/ARDUINO_ANALOG_READ.bin diff --git a/tools/linux/macros/ARDUINO_ANALOG_READ.sci b/tools/scilab/linux/macros/ARDUINO_ANALOG_READ.sci index 6677419..6677419 100644 --- a/tools/linux/macros/ARDUINO_ANALOG_READ.sci +++ b/tools/scilab/linux/macros/ARDUINO_ANALOG_READ.sci diff --git a/tools/linux/macros/ARDUINO_ANALOG_READ_sim.bin b/tools/scilab/linux/macros/ARDUINO_ANALOG_READ_sim.bin Binary files differindex 2f9e95f..2f9e95f 100644 --- a/tools/linux/macros/ARDUINO_ANALOG_READ_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_ANALOG_READ_sim.bin diff --git a/tools/linux/macros/ARDUINO_ANALOG_READ_sim.sci b/tools/scilab/linux/macros/ARDUINO_ANALOG_READ_sim.sci index 1778fd3..1778fd3 100644 --- a/tools/linux/macros/ARDUINO_ANALOG_READ_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_ANALOG_READ_sim.sci diff --git a/tools/linux/macros/ARDUINO_ANALOG_WRITE.bin b/tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE.bin Binary files differindex 832daa4..832daa4 100644 --- a/tools/linux/macros/ARDUINO_ANALOG_WRITE.bin +++ b/tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE.bin diff --git a/tools/linux/macros/ARDUINO_ANALOG_WRITE.sci b/tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE.sci index 6932907..6932907 100644 --- a/tools/linux/macros/ARDUINO_ANALOG_WRITE.sci +++ b/tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE.sci diff --git a/tools/linux/macros/ARDUINO_ANALOG_WRITE_sim.bin b/tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE_sim.bin Binary files differindex f3f23ba..f3f23ba 100644 --- a/tools/linux/macros/ARDUINO_ANALOG_WRITE_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE_sim.bin diff --git a/tools/linux/macros/ARDUINO_ANALOG_WRITE_sim.sci b/tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE_sim.sci index c2a5bac..c2a5bac 100644 --- a/tools/linux/macros/ARDUINO_ANALOG_WRITE_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_ANALOG_WRITE_sim.sci diff --git a/tools/linux/macros/ARDUINO_DCMOTOR.bin b/tools/scilab/linux/macros/ARDUINO_DCMOTOR.bin Binary files differindex f026ac7..f026ac7 100644 --- a/tools/linux/macros/ARDUINO_DCMOTOR.bin +++ b/tools/scilab/linux/macros/ARDUINO_DCMOTOR.bin diff --git a/tools/linux/macros/ARDUINO_DCMOTOR.sci b/tools/scilab/linux/macros/ARDUINO_DCMOTOR.sci index 054b4ef..054b4ef 100644 --- a/tools/linux/macros/ARDUINO_DCMOTOR.sci +++ b/tools/scilab/linux/macros/ARDUINO_DCMOTOR.sci diff --git a/tools/linux/macros/ARDUINO_DCMOTOR_sim.bin b/tools/scilab/linux/macros/ARDUINO_DCMOTOR_sim.bin Binary files differindex 1745200..1745200 100644 --- a/tools/linux/macros/ARDUINO_DCMOTOR_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_DCMOTOR_sim.bin diff --git a/tools/linux/macros/ARDUINO_DCMOTOR_sim.sci b/tools/scilab/linux/macros/ARDUINO_DCMOTOR_sim.sci index d69635c..d69635c 100644 --- a/tools/linux/macros/ARDUINO_DCMOTOR_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_DCMOTOR_sim.sci diff --git a/tools/linux/macros/ARDUINO_DIGITAL_READ.bin b/tools/scilab/linux/macros/ARDUINO_DIGITAL_READ.bin Binary files differindex 90fb8ab..90fb8ab 100644 --- a/tools/linux/macros/ARDUINO_DIGITAL_READ.bin +++ b/tools/scilab/linux/macros/ARDUINO_DIGITAL_READ.bin diff --git a/tools/linux/macros/ARDUINO_DIGITAL_READ.sci b/tools/scilab/linux/macros/ARDUINO_DIGITAL_READ.sci index 78d0e00..78d0e00 100644 --- a/tools/linux/macros/ARDUINO_DIGITAL_READ.sci +++ b/tools/scilab/linux/macros/ARDUINO_DIGITAL_READ.sci diff --git a/tools/linux/macros/ARDUINO_DIGITAL_READ_sim.bin b/tools/scilab/linux/macros/ARDUINO_DIGITAL_READ_sim.bin Binary files differindex f709979..f709979 100644 --- a/tools/linux/macros/ARDUINO_DIGITAL_READ_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_DIGITAL_READ_sim.bin diff --git a/tools/linux/macros/ARDUINO_DIGITAL_READ_sim.sci b/tools/scilab/linux/macros/ARDUINO_DIGITAL_READ_sim.sci index ad132bb..ad132bb 100644 --- a/tools/linux/macros/ARDUINO_DIGITAL_READ_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_DIGITAL_READ_sim.sci diff --git a/tools/linux/macros/ARDUINO_DIGITAL_WRITE.bin b/tools/scilab/linux/macros/ARDUINO_DIGITAL_WRITE.bin Binary files differindex bd45a1d..bd45a1d 100644 --- a/tools/linux/macros/ARDUINO_DIGITAL_WRITE.bin +++ b/tools/scilab/linux/macros/ARDUINO_DIGITAL_WRITE.bin diff --git a/tools/linux/macros/ARDUINO_DIGITAL_WRITE.sci b/tools/scilab/linux/macros/ARDUINO_DIGITAL_WRITE.sci index 3b800a9..3b800a9 100644 --- a/tools/linux/macros/ARDUINO_DIGITAL_WRITE.sci +++ b/tools/scilab/linux/macros/ARDUINO_DIGITAL_WRITE.sci diff --git a/tools/linux/macros/ARDUINO_DIG_WRITE_sim.bin b/tools/scilab/linux/macros/ARDUINO_DIG_WRITE_sim.bin Binary files differindex 6ae3d08..6ae3d08 100644 --- a/tools/linux/macros/ARDUINO_DIG_WRITE_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_DIG_WRITE_sim.bin diff --git a/tools/linux/macros/ARDUINO_DIG_WRITE_sim.sci b/tools/scilab/linux/macros/ARDUINO_DIG_WRITE_sim.sci index 6b2a355..6b2a355 100644 --- a/tools/linux/macros/ARDUINO_DIG_WRITE_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_DIG_WRITE_sim.sci diff --git a/tools/linux/macros/ARDUINO_ENCODER.bin b/tools/scilab/linux/macros/ARDUINO_ENCODER.bin Binary files differindex 039d8d1..039d8d1 100644 --- a/tools/linux/macros/ARDUINO_ENCODER.bin +++ b/tools/scilab/linux/macros/ARDUINO_ENCODER.bin diff --git a/tools/linux/macros/ARDUINO_ENCODER.sci b/tools/scilab/linux/macros/ARDUINO_ENCODER.sci index c5bd025..c5bd025 100644 --- a/tools/linux/macros/ARDUINO_ENCODER.sci +++ b/tools/scilab/linux/macros/ARDUINO_ENCODER.sci diff --git a/tools/linux/macros/ARDUINO_ENCODER_sim.bin b/tools/scilab/linux/macros/ARDUINO_ENCODER_sim.bin Binary files differindex b075ddb..b075ddb 100644 --- a/tools/linux/macros/ARDUINO_ENCODER_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_ENCODER_sim.bin diff --git a/tools/linux/macros/ARDUINO_ENCODER_sim.sci b/tools/scilab/linux/macros/ARDUINO_ENCODER_sim.sci index aa3e860..aa3e860 100644 --- a/tools/linux/macros/ARDUINO_ENCODER_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_ENCODER_sim.sci diff --git a/tools/linux/macros/ARDUINO_INTERRUPT.bin b/tools/scilab/linux/macros/ARDUINO_INTERRUPT.bin Binary files differindex d30e8e8..d30e8e8 100644 --- a/tools/linux/macros/ARDUINO_INTERRUPT.bin +++ b/tools/scilab/linux/macros/ARDUINO_INTERRUPT.bin diff --git a/tools/linux/macros/ARDUINO_INTERRUPT.sci b/tools/scilab/linux/macros/ARDUINO_INTERRUPT.sci index 754054e..754054e 100644 --- a/tools/linux/macros/ARDUINO_INTERRUPT.sci +++ b/tools/scilab/linux/macros/ARDUINO_INTERRUPT.sci diff --git a/tools/linux/macros/ARDUINO_INTERRUPT_sim.bin b/tools/scilab/linux/macros/ARDUINO_INTERRUPT_sim.bin Binary files differindex acebc3d..acebc3d 100644 --- a/tools/linux/macros/ARDUINO_INTERRUPT_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_INTERRUPT_sim.bin diff --git a/tools/linux/macros/ARDUINO_INTERRUPT_sim.sci b/tools/scilab/linux/macros/ARDUINO_INTERRUPT_sim.sci index 75bcea3..75bcea3 100644 --- a/tools/linux/macros/ARDUINO_INTERRUPT_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_INTERRUPT_sim.sci diff --git a/tools/linux/macros/ARDUINO_PMODHB5.bin b/tools/scilab/linux/macros/ARDUINO_PMODHB5.bin Binary files differindex 83c4ce3..83c4ce3 100644 --- a/tools/linux/macros/ARDUINO_PMODHB5.bin +++ b/tools/scilab/linux/macros/ARDUINO_PMODHB5.bin diff --git a/tools/linux/macros/ARDUINO_PMODHB5.sci b/tools/scilab/linux/macros/ARDUINO_PMODHB5.sci index e44fd39..e44fd39 100644 --- a/tools/linux/macros/ARDUINO_PMODHB5.sci +++ b/tools/scilab/linux/macros/ARDUINO_PMODHB5.sci diff --git a/tools/linux/macros/ARDUINO_PMODHB5_WRITE_sim.bin b/tools/scilab/linux/macros/ARDUINO_PMODHB5_WRITE_sim.bin Binary files differindex f9443a2..f9443a2 100644 --- a/tools/linux/macros/ARDUINO_PMODHB5_WRITE_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_PMODHB5_WRITE_sim.bin diff --git a/tools/linux/macros/ARDUINO_PMODHB5_WRITE_sim.sci b/tools/scilab/linux/macros/ARDUINO_PMODHB5_WRITE_sim.sci index 4bf1ba3..4bf1ba3 100644 --- a/tools/linux/macros/ARDUINO_PMODHB5_WRITE_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_PMODHB5_WRITE_sim.sci diff --git a/tools/linux/macros/ARDUINO_SCOPE.bin b/tools/scilab/linux/macros/ARDUINO_SCOPE.bin Binary files differindex 254d029..254d029 100644 --- a/tools/linux/macros/ARDUINO_SCOPE.bin +++ b/tools/scilab/linux/macros/ARDUINO_SCOPE.bin diff --git a/tools/linux/macros/ARDUINO_SCOPE.sci b/tools/scilab/linux/macros/ARDUINO_SCOPE.sci index a10883b..a10883b 100644 --- a/tools/linux/macros/ARDUINO_SCOPE.sci +++ b/tools/scilab/linux/macros/ARDUINO_SCOPE.sci diff --git a/tools/linux/macros/ARDUINO_SERVO_READ.bin b/tools/scilab/linux/macros/ARDUINO_SERVO_READ.bin Binary files differindex b2afc03..b2afc03 100644 --- a/tools/linux/macros/ARDUINO_SERVO_READ.bin +++ b/tools/scilab/linux/macros/ARDUINO_SERVO_READ.bin diff --git a/tools/linux/macros/ARDUINO_SERVO_READ.sci b/tools/scilab/linux/macros/ARDUINO_SERVO_READ.sci index 1f99c3a..1f99c3a 100644 --- a/tools/linux/macros/ARDUINO_SERVO_READ.sci +++ b/tools/scilab/linux/macros/ARDUINO_SERVO_READ.sci diff --git a/tools/linux/macros/ARDUINO_SERVO_READ_sim.bin b/tools/scilab/linux/macros/ARDUINO_SERVO_READ_sim.bin Binary files differindex 0d42226..0d42226 100644 --- a/tools/linux/macros/ARDUINO_SERVO_READ_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_SERVO_READ_sim.bin diff --git a/tools/linux/macros/ARDUINO_SERVO_READ_sim.sci b/tools/scilab/linux/macros/ARDUINO_SERVO_READ_sim.sci index 2de0e44..2de0e44 100644 --- a/tools/linux/macros/ARDUINO_SERVO_READ_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_SERVO_READ_sim.sci diff --git a/tools/linux/macros/ARDUINO_SERVO_WRITE.bin b/tools/scilab/linux/macros/ARDUINO_SERVO_WRITE.bin Binary files differindex 79bf212..79bf212 100644 --- a/tools/linux/macros/ARDUINO_SERVO_WRITE.bin +++ b/tools/scilab/linux/macros/ARDUINO_SERVO_WRITE.bin diff --git a/tools/linux/macros/ARDUINO_SERVO_WRITE.sci b/tools/scilab/linux/macros/ARDUINO_SERVO_WRITE.sci index 17fb4a7..17fb4a7 100644 --- a/tools/linux/macros/ARDUINO_SERVO_WRITE.sci +++ b/tools/scilab/linux/macros/ARDUINO_SERVO_WRITE.sci diff --git a/tools/linux/macros/ARDUINO_SERVO_WRITE_sim.bin b/tools/scilab/linux/macros/ARDUINO_SERVO_WRITE_sim.bin Binary files differindex 7b27865..7b27865 100644 --- a/tools/linux/macros/ARDUINO_SERVO_WRITE_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_SERVO_WRITE_sim.bin diff --git a/tools/linux/macros/ARDUINO_SERVO_WRITE_sim.sci b/tools/scilab/linux/macros/ARDUINO_SERVO_WRITE_sim.sci index 4c6826d..4c6826d 100644 --- a/tools/linux/macros/ARDUINO_SERVO_WRITE_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_SERVO_WRITE_sim.sci diff --git a/tools/linux/macros/ARDUINO_SETUP.bin b/tools/scilab/linux/macros/ARDUINO_SETUP.bin Binary files differindex 88c2bb3..88c2bb3 100644 --- a/tools/linux/macros/ARDUINO_SETUP.bin +++ b/tools/scilab/linux/macros/ARDUINO_SETUP.bin diff --git a/tools/linux/macros/ARDUINO_SETUP.sci b/tools/scilab/linux/macros/ARDUINO_SETUP.sci index add3a14..add3a14 100644 --- a/tools/linux/macros/ARDUINO_SETUP.sci +++ b/tools/scilab/linux/macros/ARDUINO_SETUP.sci diff --git a/tools/linux/macros/ARDUINO_STEPPER.bin b/tools/scilab/linux/macros/ARDUINO_STEPPER.bin Binary files differindex 0df09c8..0df09c8 100644 --- a/tools/linux/macros/ARDUINO_STEPPER.bin +++ b/tools/scilab/linux/macros/ARDUINO_STEPPER.bin diff --git a/tools/linux/macros/ARDUINO_STEPPER.sci b/tools/scilab/linux/macros/ARDUINO_STEPPER.sci index 7c96d72..7c96d72 100644 --- a/tools/linux/macros/ARDUINO_STEPPER.sci +++ b/tools/scilab/linux/macros/ARDUINO_STEPPER.sci diff --git a/tools/linux/macros/ARDUINO_STEPPER_sim.bin b/tools/scilab/linux/macros/ARDUINO_STEPPER_sim.bin Binary files differindex bde0077..bde0077 100644 --- a/tools/linux/macros/ARDUINO_STEPPER_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_STEPPER_sim.bin diff --git a/tools/linux/macros/ARDUINO_STEPPER_sim.sci b/tools/scilab/linux/macros/ARDUINO_STEPPER_sim.sci index 58b1dcd..58b1dcd 100644 --- a/tools/linux/macros/ARDUINO_STEPPER_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_STEPPER_sim.sci diff --git a/tools/linux/macros/ARDUINO_WRITE.bin b/tools/scilab/linux/macros/ARDUINO_WRITE.bin Binary files differindex 6595d2e..6595d2e 100644 --- a/tools/linux/macros/ARDUINO_WRITE.bin +++ b/tools/scilab/linux/macros/ARDUINO_WRITE.bin diff --git a/tools/linux/macros/ARDUINO_WRITE.sci b/tools/scilab/linux/macros/ARDUINO_WRITE.sci index 5d70487..5d70487 100644 --- a/tools/linux/macros/ARDUINO_WRITE.sci +++ b/tools/scilab/linux/macros/ARDUINO_WRITE.sci diff --git a/tools/linux/macros/ARDUINO_WRITE_sim.bin b/tools/scilab/linux/macros/ARDUINO_WRITE_sim.bin Binary files differindex 9959ea7..9959ea7 100644 --- a/tools/linux/macros/ARDUINO_WRITE_sim.bin +++ b/tools/scilab/linux/macros/ARDUINO_WRITE_sim.bin diff --git a/tools/linux/macros/ARDUINO_WRITE_sim.sci b/tools/scilab/linux/macros/ARDUINO_WRITE_sim.sci index e52e445..e52e445 100644 --- a/tools/linux/macros/ARDUINO_WRITE_sim.sci +++ b/tools/scilab/linux/macros/ARDUINO_WRITE_sim.sci diff --git a/tools/linux/macros/ARDUINO_post_simulate.bin b/tools/scilab/linux/macros/ARDUINO_post_simulate.bin Binary files differindex d128a5f..d128a5f 100644 --- a/tools/linux/macros/ARDUINO_post_simulate.bin +++ b/tools/scilab/linux/macros/ARDUINO_post_simulate.bin diff --git a/tools/linux/macros/ARDUINO_post_simulate.sci b/tools/scilab/linux/macros/ARDUINO_post_simulate.sci index 1c3c9e9..1c3c9e9 100644 --- a/tools/linux/macros/ARDUINO_post_simulate.sci +++ b/tools/scilab/linux/macros/ARDUINO_post_simulate.sci diff --git a/tools/linux/macros/ARDUINO_pre_simulate.bin b/tools/scilab/linux/macros/ARDUINO_pre_simulate.bin Binary files differindex a68cd3e..a68cd3e 100644 --- a/tools/linux/macros/ARDUINO_pre_simulate.bin +++ b/tools/scilab/linux/macros/ARDUINO_pre_simulate.bin diff --git a/tools/linux/macros/ARDUINO_pre_simulate.sci b/tools/scilab/linux/macros/ARDUINO_pre_simulate.sci index 33de768..33de768 100644 --- a/tools/linux/macros/ARDUINO_pre_simulate.sci +++ b/tools/scilab/linux/macros/ARDUINO_pre_simulate.sci diff --git a/tools/linux/macros/ArduinoUnoR3.png b/tools/scilab/linux/macros/ArduinoUnoR3.png Binary files differindex 80ca21b..80ca21b 100644 --- a/tools/linux/macros/ArduinoUnoR3.png +++ b/tools/scilab/linux/macros/ArduinoUnoR3.png diff --git a/tools/linux/macros/Arduino_GUI.sce b/tools/scilab/linux/macros/Arduino_GUI.sce index 36a8576..36a8576 100644 --- a/tools/linux/macros/Arduino_GUI.sce +++ b/tools/scilab/linux/macros/Arduino_GUI.sce diff --git a/tools/linux/macros/DCMOTOR_SB.bin b/tools/scilab/linux/macros/DCMOTOR_SB.bin Binary files differindex 67e96e0..67e96e0 100644 --- a/tools/linux/macros/DCMOTOR_SB.bin +++ b/tools/scilab/linux/macros/DCMOTOR_SB.bin diff --git a/tools/linux/macros/DCMOTOR_SB.sci b/tools/scilab/linux/macros/DCMOTOR_SB.sci index f35fe91..f35fe91 100644 --- a/tools/linux/macros/DCMOTOR_SB.sci +++ b/tools/scilab/linux/macros/DCMOTOR_SB.sci diff --git a/tools/linux/macros/DIGITAL_READ_SB.bin b/tools/scilab/linux/macros/DIGITAL_READ_SB.bin Binary files differindex ce6372b..ce6372b 100644 --- a/tools/linux/macros/DIGITAL_READ_SB.bin +++ b/tools/scilab/linux/macros/DIGITAL_READ_SB.bin diff --git a/tools/linux/macros/DIGITAL_READ_SB.sci b/tools/scilab/linux/macros/DIGITAL_READ_SB.sci index c87edbf..c87edbf 100644 --- a/tools/linux/macros/DIGITAL_READ_SB.sci +++ b/tools/scilab/linux/macros/DIGITAL_READ_SB.sci diff --git a/tools/linux/macros/DIGITAL_WRITE_SB.bin b/tools/scilab/linux/macros/DIGITAL_WRITE_SB.bin Binary files differindex 957b6ad..957b6ad 100644 --- a/tools/linux/macros/DIGITAL_WRITE_SB.bin +++ b/tools/scilab/linux/macros/DIGITAL_WRITE_SB.bin diff --git a/tools/linux/macros/DIGITAL_WRITE_SB.sci b/tools/scilab/linux/macros/DIGITAL_WRITE_SB.sci index df97949..df97949 100644 --- a/tools/linux/macros/DIGITAL_WRITE_SB.sci +++ b/tools/scilab/linux/macros/DIGITAL_WRITE_SB.sci diff --git a/tools/linux/macros/ENCODER_SB.bin b/tools/scilab/linux/macros/ENCODER_SB.bin Binary files differindex 47ae030..47ae030 100644 --- a/tools/linux/macros/ENCODER_SB.bin +++ b/tools/scilab/linux/macros/ENCODER_SB.bin diff --git a/tools/linux/macros/ENCODER_SB.sci b/tools/scilab/linux/macros/ENCODER_SB.sci index 577bf12..577bf12 100644 --- a/tools/linux/macros/ENCODER_SB.sci +++ b/tools/scilab/linux/macros/ENCODER_SB.sci diff --git a/tools/linux/macros/INTERRUPT_SB.bin b/tools/scilab/linux/macros/INTERRUPT_SB.bin Binary files differindex 218bba2..218bba2 100644 --- a/tools/linux/macros/INTERRUPT_SB.bin +++ b/tools/scilab/linux/macros/INTERRUPT_SB.bin diff --git a/tools/linux/macros/INTERRUPT_SB.sci b/tools/scilab/linux/macros/INTERRUPT_SB.sci index a4289a6..a4289a6 100644 --- a/tools/linux/macros/INTERRUPT_SB.sci +++ b/tools/scilab/linux/macros/INTERRUPT_SB.sci diff --git a/tools/linux/macros/SERVO_READ_SB.bin b/tools/scilab/linux/macros/SERVO_READ_SB.bin Binary files differindex b58e6b6..b58e6b6 100644 --- a/tools/linux/macros/SERVO_READ_SB.bin +++ b/tools/scilab/linux/macros/SERVO_READ_SB.bin diff --git a/tools/linux/macros/SERVO_READ_SB.sci b/tools/scilab/linux/macros/SERVO_READ_SB.sci index 85ab3db..85ab3db 100644 --- a/tools/linux/macros/SERVO_READ_SB.sci +++ b/tools/scilab/linux/macros/SERVO_READ_SB.sci diff --git a/tools/linux/macros/SERVO_WRITE_SB.bin b/tools/scilab/linux/macros/SERVO_WRITE_SB.bin Binary files differindex 244e3c8..244e3c8 100644 --- a/tools/linux/macros/SERVO_WRITE_SB.bin +++ b/tools/scilab/linux/macros/SERVO_WRITE_SB.bin diff --git a/tools/linux/macros/SERVO_WRITE_SB.sci b/tools/scilab/linux/macros/SERVO_WRITE_SB.sci index 82f346e..82f346e 100644 --- a/tools/linux/macros/SERVO_WRITE_SB.sci +++ b/tools/scilab/linux/macros/SERVO_WRITE_SB.sci diff --git a/tools/linux/macros/STEPPER_SB.bin b/tools/scilab/linux/macros/STEPPER_SB.bin Binary files differindex 723b46b..723b46b 100644 --- a/tools/linux/macros/STEPPER_SB.bin +++ b/tools/scilab/linux/macros/STEPPER_SB.bin diff --git a/tools/linux/macros/STEPPER_SB.sci b/tools/scilab/linux/macros/STEPPER_SB.sci index 3a8dded..3a8dded 100644 --- a/tools/linux/macros/STEPPER_SB.sci +++ b/tools/scilab/linux/macros/STEPPER_SB.sci diff --git a/tools/linux/macros/TIME_SAMPLE.bin b/tools/scilab/linux/macros/TIME_SAMPLE.bin Binary files differindex d2be8eb..d2be8eb 100644 --- a/tools/linux/macros/TIME_SAMPLE.bin +++ b/tools/scilab/linux/macros/TIME_SAMPLE.bin diff --git a/tools/linux/macros/TIME_SAMPLE.sci b/tools/scilab/linux/macros/TIME_SAMPLE.sci index b9d1729..b9d1729 100644 --- a/tools/linux/macros/TIME_SAMPLE.sci +++ b/tools/scilab/linux/macros/TIME_SAMPLE.sci diff --git a/tools/linux/macros/buildmacros.sce b/tools/scilab/linux/macros/buildmacros.sce index a129dc7..a129dc7 100644 --- a/tools/linux/macros/buildmacros.sce +++ b/tools/scilab/linux/macros/buildmacros.sce diff --git a/tools/linux/macros/close_serial.bin b/tools/scilab/linux/macros/close_serial.bin Binary files differindex fee303d..fee303d 100644 --- a/tools/linux/macros/close_serial.bin +++ b/tools/scilab/linux/macros/close_serial.bin diff --git a/tools/linux/macros/close_serial.sci b/tools/scilab/linux/macros/close_serial.sci index 9c5b85f..9c5b85f 100644 --- a/tools/linux/macros/close_serial.sci +++ b/tools/scilab/linux/macros/close_serial.sci diff --git a/tools/linux/macros/cmd_analog_in.bin b/tools/scilab/linux/macros/cmd_analog_in.bin Binary files differindex 5bb56a1..5bb56a1 100644 --- a/tools/linux/macros/cmd_analog_in.bin +++ b/tools/scilab/linux/macros/cmd_analog_in.bin diff --git a/tools/linux/macros/cmd_analog_in.sci b/tools/scilab/linux/macros/cmd_analog_in.sci index 101d7ca..101d7ca 100644 --- a/tools/linux/macros/cmd_analog_in.sci +++ b/tools/scilab/linux/macros/cmd_analog_in.sci diff --git a/tools/linux/macros/cmd_analog_in_volt.bin b/tools/scilab/linux/macros/cmd_analog_in_volt.bin Binary files differindex 67a835d..67a835d 100644 --- a/tools/linux/macros/cmd_analog_in_volt.bin +++ b/tools/scilab/linux/macros/cmd_analog_in_volt.bin diff --git a/tools/linux/macros/cmd_analog_in_volt.sci b/tools/scilab/linux/macros/cmd_analog_in_volt.sci index 8c83254..8c83254 100644 --- a/tools/linux/macros/cmd_analog_in_volt.sci +++ b/tools/scilab/linux/macros/cmd_analog_in_volt.sci diff --git a/tools/linux/macros/cmd_analog_out.bin b/tools/scilab/linux/macros/cmd_analog_out.bin Binary files differindex 550bd1a..550bd1a 100644 --- a/tools/linux/macros/cmd_analog_out.bin +++ b/tools/scilab/linux/macros/cmd_analog_out.bin diff --git a/tools/linux/macros/cmd_analog_out.sci b/tools/scilab/linux/macros/cmd_analog_out.sci index a667cd8..a667cd8 100644 --- a/tools/linux/macros/cmd_analog_out.sci +++ b/tools/scilab/linux/macros/cmd_analog_out.sci diff --git a/tools/linux/macros/cmd_analog_out_volt.bin b/tools/scilab/linux/macros/cmd_analog_out_volt.bin Binary files differindex 2c34a48..2c34a48 100644 --- a/tools/linux/macros/cmd_analog_out_volt.bin +++ b/tools/scilab/linux/macros/cmd_analog_out_volt.bin diff --git a/tools/linux/macros/cmd_analog_out_volt.sci b/tools/scilab/linux/macros/cmd_analog_out_volt.sci index 60e9b6d..60e9b6d 100644 --- a/tools/linux/macros/cmd_analog_out_volt.sci +++ b/tools/scilab/linux/macros/cmd_analog_out_volt.sci diff --git a/tools/linux/macros/cmd_arduino_a_control.bin b/tools/scilab/linux/macros/cmd_arduino_a_control.bin Binary files differindex 7cc424a..7cc424a 100644 --- a/tools/linux/macros/cmd_arduino_a_control.bin +++ b/tools/scilab/linux/macros/cmd_arduino_a_control.bin diff --git a/tools/linux/macros/cmd_arduino_a_control.sci b/tools/scilab/linux/macros/cmd_arduino_a_control.sci index 9ff1492..9ff1492 100644 --- a/tools/linux/macros/cmd_arduino_a_control.sci +++ b/tools/scilab/linux/macros/cmd_arduino_a_control.sci diff --git a/tools/linux/macros/cmd_arduino_d_control.bin b/tools/scilab/linux/macros/cmd_arduino_d_control.bin Binary files differindex 74046f1..74046f1 100644 --- a/tools/linux/macros/cmd_arduino_d_control.bin +++ b/tools/scilab/linux/macros/cmd_arduino_d_control.bin diff --git a/tools/linux/macros/cmd_arduino_d_control.sci b/tools/scilab/linux/macros/cmd_arduino_d_control.sci index 576b2a8..576b2a8 100644 --- a/tools/linux/macros/cmd_arduino_d_control.sci +++ b/tools/scilab/linux/macros/cmd_arduino_d_control.sci diff --git a/tools/linux/macros/cmd_arduino_meter.bin b/tools/scilab/linux/macros/cmd_arduino_meter.bin Binary files differindex cdc406e..cdc406e 100644 --- a/tools/linux/macros/cmd_arduino_meter.bin +++ b/tools/scilab/linux/macros/cmd_arduino_meter.bin diff --git a/tools/linux/macros/cmd_arduino_meter.sci b/tools/scilab/linux/macros/cmd_arduino_meter.sci index 52d9de8..52d9de8 100644 --- a/tools/linux/macros/cmd_arduino_meter.sci +++ b/tools/scilab/linux/macros/cmd_arduino_meter.sci diff --git a/tools/linux/macros/cmd_dcmotor_release.bin b/tools/scilab/linux/macros/cmd_dcmotor_release.bin Binary files differindex 8ca7ca5..8ca7ca5 100644 --- a/tools/linux/macros/cmd_dcmotor_release.bin +++ b/tools/scilab/linux/macros/cmd_dcmotor_release.bin diff --git a/tools/linux/macros/cmd_dcmotor_release.sci b/tools/scilab/linux/macros/cmd_dcmotor_release.sci index daf694d..daf694d 100644 --- a/tools/linux/macros/cmd_dcmotor_release.sci +++ b/tools/scilab/linux/macros/cmd_dcmotor_release.sci diff --git a/tools/linux/macros/cmd_dcmotor_run.bin b/tools/scilab/linux/macros/cmd_dcmotor_run.bin Binary files differindex 205c06e..205c06e 100644 --- a/tools/linux/macros/cmd_dcmotor_run.bin +++ b/tools/scilab/linux/macros/cmd_dcmotor_run.bin diff --git a/tools/linux/macros/cmd_dcmotor_run.sci b/tools/scilab/linux/macros/cmd_dcmotor_run.sci index f564c84..f564c84 100644 --- a/tools/linux/macros/cmd_dcmotor_run.sci +++ b/tools/scilab/linux/macros/cmd_dcmotor_run.sci diff --git a/tools/linux/macros/cmd_dcmotor_setup.bin b/tools/scilab/linux/macros/cmd_dcmotor_setup.bin Binary files differindex 23bb85f..23bb85f 100644 --- a/tools/linux/macros/cmd_dcmotor_setup.bin +++ b/tools/scilab/linux/macros/cmd_dcmotor_setup.bin diff --git a/tools/linux/macros/cmd_dcmotor_setup.sci b/tools/scilab/linux/macros/cmd_dcmotor_setup.sci index 2808bc4..2808bc4 100644 --- a/tools/linux/macros/cmd_dcmotor_setup.sci +++ b/tools/scilab/linux/macros/cmd_dcmotor_setup.sci diff --git a/tools/linux/macros/cmd_digital_in.bin b/tools/scilab/linux/macros/cmd_digital_in.bin Binary files differindex 54acc83..54acc83 100644 --- a/tools/linux/macros/cmd_digital_in.bin +++ b/tools/scilab/linux/macros/cmd_digital_in.bin diff --git a/tools/linux/macros/cmd_digital_in.sci b/tools/scilab/linux/macros/cmd_digital_in.sci index 856cf24..856cf24 100644 --- a/tools/linux/macros/cmd_digital_in.sci +++ b/tools/scilab/linux/macros/cmd_digital_in.sci diff --git a/tools/linux/macros/cmd_digital_out.bin b/tools/scilab/linux/macros/cmd_digital_out.bin Binary files differindex 38359b4..38359b4 100644 --- a/tools/linux/macros/cmd_digital_out.bin +++ b/tools/scilab/linux/macros/cmd_digital_out.bin diff --git a/tools/linux/macros/cmd_digital_out.sci b/tools/scilab/linux/macros/cmd_digital_out.sci index 7cbd81f..7cbd81f 100644 --- a/tools/linux/macros/cmd_digital_out.sci +++ b/tools/scilab/linux/macros/cmd_digital_out.sci diff --git a/tools/linux/macros/cmd_encoder_init.bin b/tools/scilab/linux/macros/cmd_encoder_init.bin Binary files differindex a7f0722..a7f0722 100644 --- a/tools/linux/macros/cmd_encoder_init.bin +++ b/tools/scilab/linux/macros/cmd_encoder_init.bin diff --git a/tools/linux/macros/cmd_encoder_init.sci b/tools/scilab/linux/macros/cmd_encoder_init.sci index 13b5ccc..13b5ccc 100644 --- a/tools/linux/macros/cmd_encoder_init.sci +++ b/tools/scilab/linux/macros/cmd_encoder_init.sci diff --git a/tools/linux/macros/cmd_servo_attach.bin b/tools/scilab/linux/macros/cmd_servo_attach.bin Binary files differindex b946f92..b946f92 100644 --- a/tools/linux/macros/cmd_servo_attach.bin +++ b/tools/scilab/linux/macros/cmd_servo_attach.bin diff --git a/tools/linux/macros/cmd_servo_attach.sci b/tools/scilab/linux/macros/cmd_servo_attach.sci index d6e3fcd..d6e3fcd 100644 --- a/tools/linux/macros/cmd_servo_attach.sci +++ b/tools/scilab/linux/macros/cmd_servo_attach.sci diff --git a/tools/linux/macros/cmd_servo_detach.bin b/tools/scilab/linux/macros/cmd_servo_detach.bin Binary files differindex 29b08af..29b08af 100644 --- a/tools/linux/macros/cmd_servo_detach.bin +++ b/tools/scilab/linux/macros/cmd_servo_detach.bin diff --git a/tools/linux/macros/cmd_servo_detach.sci b/tools/scilab/linux/macros/cmd_servo_detach.sci index f6ac511..f6ac511 100644 --- a/tools/linux/macros/cmd_servo_detach.sci +++ b/tools/scilab/linux/macros/cmd_servo_detach.sci diff --git a/tools/linux/macros/cmd_servo_move.bin b/tools/scilab/linux/macros/cmd_servo_move.bin Binary files differindex 357a788..357a788 100644 --- a/tools/linux/macros/cmd_servo_move.bin +++ b/tools/scilab/linux/macros/cmd_servo_move.bin diff --git a/tools/linux/macros/cmd_servo_move.sci b/tools/scilab/linux/macros/cmd_servo_move.sci index 83309e1..83309e1 100644 --- a/tools/linux/macros/cmd_servo_move.sci +++ b/tools/scilab/linux/macros/cmd_servo_move.sci diff --git a/tools/linux/macros/genhelpscript.sce b/tools/scilab/linux/macros/genhelpscript.sce index 1220178..1220178 100644 --- a/tools/linux/macros/genhelpscript.sce +++ b/tools/scilab/linux/macros/genhelpscript.sce diff --git a/tools/linux/macros/getArduinoVersion.bin b/tools/scilab/linux/macros/getArduinoVersion.bin Binary files differindex c64a686..c64a686 100644 --- a/tools/linux/macros/getArduinoVersion.bin +++ b/tools/scilab/linux/macros/getArduinoVersion.bin diff --git a/tools/linux/macros/getArduinoVersion.sci b/tools/scilab/linux/macros/getArduinoVersion.sci index f655812..f655812 100644 --- a/tools/linux/macros/getArduinoVersion.sci +++ b/tools/scilab/linux/macros/getArduinoVersion.sci diff --git a/tools/linux/macros/init_arduino.bin b/tools/scilab/linux/macros/init_arduino.bin Binary files differindex cc1c4f4..cc1c4f4 100644 --- a/tools/linux/macros/init_arduino.bin +++ b/tools/scilab/linux/macros/init_arduino.bin diff --git a/tools/linux/macros/init_arduino.sci b/tools/scilab/linux/macros/init_arduino.sci index 634ece8..634ece8 100644 --- a/tools/linux/macros/init_arduino.sci +++ b/tools/scilab/linux/macros/init_arduino.sci diff --git a/tools/linux/macros/lib b/tools/scilab/linux/macros/lib Binary files differindex 5dfe47f..5dfe47f 100644 --- a/tools/linux/macros/lib +++ b/tools/scilab/linux/macros/lib diff --git a/tools/linux/macros/names b/tools/scilab/linux/macros/names index aa0bf80..aa0bf80 100644 --- a/tools/linux/macros/names +++ b/tools/scilab/linux/macros/names diff --git a/tools/linux/macros/nicescope.bin b/tools/scilab/linux/macros/nicescope.bin Binary files differindex ca66c69..ca66c69 100644 --- a/tools/linux/macros/nicescope.bin +++ b/tools/scilab/linux/macros/nicescope.bin diff --git a/tools/linux/macros/nicescope.sci b/tools/scilab/linux/macros/nicescope.sci index 0e1c5c0..0e1c5c0 100644 --- a/tools/linux/macros/nicescope.sci +++ b/tools/scilab/linux/macros/nicescope.sci diff --git a/tools/linux/macros/open_serial.bin b/tools/scilab/linux/macros/open_serial.bin Binary files differindex 05c1c6d..05c1c6d 100644 --- a/tools/linux/macros/open_serial.bin +++ b/tools/scilab/linux/macros/open_serial.bin diff --git a/tools/linux/macros/open_serial.sci b/tools/scilab/linux/macros/open_serial.sci index 980e852..980e852 100644 --- a/tools/linux/macros/open_serial.sci +++ b/tools/scilab/linux/macros/open_serial.sci diff --git a/tools/linux/macros/post_xcos_simulate.bin b/tools/scilab/linux/macros/post_xcos_simulate.bin Binary files differindex 0bc883d..0bc883d 100644 --- a/tools/linux/macros/post_xcos_simulate.bin +++ b/tools/scilab/linux/macros/post_xcos_simulate.bin diff --git a/tools/linux/macros/post_xcos_simulate.sci b/tools/scilab/linux/macros/post_xcos_simulate.sci index c298070..c298070 100644 --- a/tools/linux/macros/post_xcos_simulate.sci +++ b/tools/scilab/linux/macros/post_xcos_simulate.sci diff --git a/tools/linux/macros/pre_xcos_simulate.bin b/tools/scilab/linux/macros/pre_xcos_simulate.bin Binary files differindex e7747fa..e7747fa 100644 --- a/tools/linux/macros/pre_xcos_simulate.bin +++ b/tools/scilab/linux/macros/pre_xcos_simulate.bin diff --git a/tools/linux/macros/pre_xcos_simulate.sci b/tools/scilab/linux/macros/pre_xcos_simulate.sci index 0dd432b..0dd432b 100644 --- a/tools/linux/macros/pre_xcos_simulate.sci +++ b/tools/scilab/linux/macros/pre_xcos_simulate.sci diff --git a/tools/linux/macros/read_serial.bin b/tools/scilab/linux/macros/read_serial.bin Binary files differindex aeacf76..aeacf76 100644 --- a/tools/linux/macros/read_serial.bin +++ b/tools/scilab/linux/macros/read_serial.bin diff --git a/tools/linux/macros/read_serial.sci b/tools/scilab/linux/macros/read_serial.sci index c095320..c095320 100644 --- a/tools/linux/macros/read_serial.sci +++ b/tools/scilab/linux/macros/read_serial.sci diff --git a/tools/linux/macros/status_serial.bin b/tools/scilab/linux/macros/status_serial.bin Binary files differindex adc7737..adc7737 100644 --- a/tools/linux/macros/status_serial.bin +++ b/tools/scilab/linux/macros/status_serial.bin diff --git a/tools/linux/macros/status_serial.sci b/tools/scilab/linux/macros/status_serial.sci index ebeeafb..ebeeafb 100644 --- a/tools/linux/macros/status_serial.sci +++ b/tools/scilab/linux/macros/status_serial.sci diff --git a/tools/linux/macros/tkscaleblk.bin b/tools/scilab/linux/macros/tkscaleblk.bin Binary files differindex 28477f0..28477f0 100644 --- a/tools/linux/macros/tkscaleblk.bin +++ b/tools/scilab/linux/macros/tkscaleblk.bin diff --git a/tools/linux/macros/tkscaleblk.sci b/tools/scilab/linux/macros/tkscaleblk.sci index f1a480c..f1a480c 100644 --- a/tools/linux/macros/tkscaleblk.sci +++ b/tools/scilab/linux/macros/tkscaleblk.sci diff --git a/tools/linux/macros/write_serial.bin b/tools/scilab/linux/macros/write_serial.bin Binary files differindex 7f6f083..7f6f083 100644 --- a/tools/linux/macros/write_serial.bin +++ b/tools/scilab/linux/macros/write_serial.bin diff --git a/tools/linux/macros/write_serial.sci b/tools/scilab/linux/macros/write_serial.sci index bebc6b9..bebc6b9 100644 --- a/tools/linux/macros/write_serial.sci +++ b/tools/scilab/linux/macros/write_serial.sci diff --git a/tools/linux/unloader.sce b/tools/scilab/linux/unloader.sce index 68348a7..68348a7 100644 --- a/tools/linux/unloader.sce +++ b/tools/scilab/linux/unloader.sce diff --git a/tools/test_firmware.sce b/tools/scilab/test_firmware.sce index 118df9e..ff52a70 100644 --- a/tools/test_firmware.sce +++ b/tools/scilab/test_firmware.sce @@ -1,6 +1,6 @@ mode(0)
-h=open_serial(1,0,115200);
-for i=1:3
+h = open_serial(1,2,115200);
+for i = 1:3
write_serial(1,"v",1);
read_serial(1,2)
end
diff --git a/tools/windows/DESCRIPTION b/tools/scilab/windows/DESCRIPTION index 776d9f2..776d9f2 100644 --- a/tools/windows/DESCRIPTION +++ b/tools/scilab/windows/DESCRIPTION diff --git a/tools/windows/VERSION b/tools/scilab/windows/VERSION index ea710ab..ea710ab 100644 --- a/tools/windows/VERSION +++ b/tools/scilab/windows/VERSION diff --git a/tools/windows/builder.sce b/tools/scilab/windows/builder.sce index bcf1d38..bcf1d38 100644 --- a/tools/windows/builder.sce +++ b/tools/scilab/windows/builder.sce diff --git a/tools/windows/cleaner.sce b/tools/scilab/windows/cleaner.sce index 89ea603..89ea603 100644 --- a/tools/windows/cleaner.sce +++ b/tools/scilab/windows/cleaner.sce diff --git a/tools/windows/demos/analog_read.dem.sce b/tools/scilab/windows/demos/analog_read.dem.sce index 566bb9e..566bb9e 100644 --- a/tools/windows/demos/analog_read.dem.sce +++ b/tools/scilab/windows/demos/analog_read.dem.sce diff --git a/tools/windows/demos/analog_write.dem.sce b/tools/scilab/windows/demos/analog_write.dem.sce index 6fe244f..6fe244f 100644 --- a/tools/windows/demos/analog_write.dem.sce +++ b/tools/scilab/windows/demos/analog_write.dem.sce diff --git a/tools/windows/demos/arduino.dem.gateway.sce b/tools/scilab/windows/demos/arduino.dem.gateway.sce index 15f739e..15f739e 100644 --- a/tools/windows/demos/arduino.dem.gateway.sce +++ b/tools/scilab/windows/demos/arduino.dem.gateway.sce diff --git a/tools/windows/demos/arduino2.dem.sce b/tools/scilab/windows/demos/arduino2.dem.sce index ec1d365..ec1d365 100644 --- a/tools/windows/demos/arduino2.dem.sce +++ b/tools/scilab/windows/demos/arduino2.dem.sce diff --git a/tools/windows/demos/arduino3.dem.sce b/tools/scilab/windows/demos/arduino3.dem.sce index 90d6f04..90d6f04 100644 --- a/tools/windows/demos/arduino3.dem.sce +++ b/tools/scilab/windows/demos/arduino3.dem.sce diff --git a/tools/windows/demos/arduino4.dem.sce b/tools/scilab/windows/demos/arduino4.dem.sce index 8bc9a8c..8bc9a8c 100644 --- a/tools/windows/demos/arduino4.dem.sce +++ b/tools/scilab/windows/demos/arduino4.dem.sce diff --git a/tools/windows/demos/arduino5.dem.sce b/tools/scilab/windows/demos/arduino5.dem.sce index 6b8ceb4..6b8ceb4 100644 --- a/tools/windows/demos/arduino5.dem.sce +++ b/tools/scilab/windows/demos/arduino5.dem.sce diff --git a/tools/windows/demos/arduino7.dem.sce b/tools/scilab/windows/demos/arduino7.dem.sce index ed92328..ed92328 100644 --- a/tools/windows/demos/arduino7.dem.sce +++ b/tools/scilab/windows/demos/arduino7.dem.sce diff --git a/tools/windows/demos/arduino8.dem.sce b/tools/scilab/windows/demos/arduino8.dem.sce index 2dd5dbf..2dd5dbf 100644 --- a/tools/windows/demos/arduino8.dem.sce +++ b/tools/scilab/windows/demos/arduino8.dem.sce diff --git a/tools/windows/demos/arduino9.dem.sce b/tools/scilab/windows/demos/arduino9.dem.sce index 7d86a46..7d86a46 100644 --- a/tools/windows/demos/arduino9.dem.sce +++ b/tools/scilab/windows/demos/arduino9.dem.sce diff --git a/tools/windows/demos/asserv.dem.sce b/tools/scilab/windows/demos/asserv.dem.sce index 68d575e..68d575e 100644 --- a/tools/windows/demos/asserv.dem.sce +++ b/tools/scilab/windows/demos/asserv.dem.sce diff --git a/tools/windows/demos/clignotement_led.dem.sce b/tools/scilab/windows/demos/clignotement_led.dem.sce index 165e3d0..165e3d0 100644 --- a/tools/windows/demos/clignotement_led.dem.sce +++ b/tools/scilab/windows/demos/clignotement_led.dem.sce diff --git a/tools/windows/demos/digital_read_write.dem.sce b/tools/scilab/windows/demos/digital_read_write.dem.sce index 60e1e77..60e1e77 100644 --- a/tools/windows/demos/digital_read_write.dem.sce +++ b/tools/scilab/windows/demos/digital_read_write.dem.sce diff --git a/tools/windows/demos/encodeur.dem.sce b/tools/scilab/windows/demos/encodeur.dem.sce index eeec86a..eeec86a 100644 --- a/tools/windows/demos/encodeur.dem.sce +++ b/tools/scilab/windows/demos/encodeur.dem.sce diff --git a/tools/windows/demos/exemples_livret.dem.gateway.sce b/tools/scilab/windows/demos/exemples_livret.dem.gateway.sce index 68d9517..68d9517 100644 --- a/tools/windows/demos/exemples_livret.dem.gateway.sce +++ b/tools/scilab/windows/demos/exemples_livret.dem.gateway.sce diff --git a/tools/windows/demos/interrupt_compteur.dem.sce b/tools/scilab/windows/demos/interrupt_compteur.dem.sce index c78c5c1..c78c5c1 100644 --- a/tools/windows/demos/interrupt_compteur.dem.sce +++ b/tools/scilab/windows/demos/interrupt_compteur.dem.sce diff --git a/tools/windows/demos/motor.dem.sce b/tools/scilab/windows/demos/motor.dem.sce index 66c0ea5..66c0ea5 100644 --- a/tools/windows/demos/motor.dem.sce +++ b/tools/scilab/windows/demos/motor.dem.sce diff --git a/tools/windows/demos/servomotor.dem.sce b/tools/scilab/windows/demos/servomotor.dem.sce index 7ed1b13..7ed1b13 100644 --- a/tools/windows/demos/servomotor.dem.sce +++ b/tools/scilab/windows/demos/servomotor.dem.sce diff --git a/tools/windows/etc/arduino.quit b/tools/scilab/windows/etc/arduino.quit index 9693278..9693278 100644 --- a/tools/windows/etc/arduino.quit +++ b/tools/scilab/windows/etc/arduino.quit diff --git a/tools/windows/etc/arduino.start b/tools/scilab/windows/etc/arduino.start index fd66007..fd66007 100644 --- a/tools/windows/etc/arduino.start +++ b/tools/scilab/windows/etc/arduino.start diff --git a/tools/windows/examples/Arduino1.zcos b/tools/scilab/windows/examples/Arduino1.zcos Binary files differindex 870db84..870db84 100644 --- a/tools/windows/examples/Arduino1.zcos +++ b/tools/scilab/windows/examples/Arduino1.zcos diff --git a/tools/windows/examples/Arduino2.zcos b/tools/scilab/windows/examples/Arduino2.zcos Binary files differindex 1d85a80..1d85a80 100644 --- a/tools/windows/examples/Arduino2.zcos +++ b/tools/scilab/windows/examples/Arduino2.zcos diff --git a/tools/windows/examples/Arduino3.zcos b/tools/scilab/windows/examples/Arduino3.zcos Binary files differindex 8a73f5f..8a73f5f 100644 --- a/tools/windows/examples/Arduino3.zcos +++ b/tools/scilab/windows/examples/Arduino3.zcos diff --git a/tools/windows/examples/Arduino4.zcos b/tools/scilab/windows/examples/Arduino4.zcos Binary files differindex 551b10b..551b10b 100644 --- a/tools/windows/examples/Arduino4.zcos +++ b/tools/scilab/windows/examples/Arduino4.zcos diff --git a/tools/windows/examples/Arduino5.zcos b/tools/scilab/windows/examples/Arduino5.zcos Binary files differindex b2f8360..b2f8360 100644 --- a/tools/windows/examples/Arduino5.zcos +++ b/tools/scilab/windows/examples/Arduino5.zcos diff --git a/tools/windows/examples/Arduino6.zcos b/tools/scilab/windows/examples/Arduino6.zcos Binary files differindex 2c3139e..2c3139e 100644 --- a/tools/windows/examples/Arduino6.zcos +++ b/tools/scilab/windows/examples/Arduino6.zcos diff --git a/tools/windows/examples/Arduino7.zcos b/tools/scilab/windows/examples/Arduino7.zcos Binary files differindex 9c0f370..9c0f370 100644 --- a/tools/windows/examples/Arduino7.zcos +++ b/tools/scilab/windows/examples/Arduino7.zcos diff --git a/tools/windows/examples/Arduino8.zcos b/tools/scilab/windows/examples/Arduino8.zcos Binary files differindex c1bd62c..c1bd62c 100644 --- a/tools/windows/examples/Arduino8.zcos +++ b/tools/scilab/windows/examples/Arduino8.zcos diff --git a/tools/windows/examples/Arduino9.zcos b/tools/scilab/windows/examples/Arduino9.zcos Binary files differindex b2035e3..b2035e3 100644 --- a/tools/windows/examples/Arduino9.zcos +++ b/tools/scilab/windows/examples/Arduino9.zcos diff --git a/tools/windows/examples/asservissement.zcos b/tools/scilab/windows/examples/asservissement.zcos Binary files differindex 7032631..7032631 100644 --- a/tools/windows/examples/asservissement.zcos +++ b/tools/scilab/windows/examples/asservissement.zcos diff --git a/tools/windows/examples/asservpos.zcos b/tools/scilab/windows/examples/asservpos.zcos Binary files differindex a9fdcd4..a9fdcd4 100644 --- a/tools/windows/examples/asservpos.zcos +++ b/tools/scilab/windows/examples/asservpos.zcos diff --git a/tools/windows/examples/boutonpoussoir.zcos b/tools/scilab/windows/examples/boutonpoussoir.zcos Binary files differindex 4602922..4602922 100644 --- a/tools/windows/examples/boutonpoussoir.zcos +++ b/tools/scilab/windows/examples/boutonpoussoir.zcos diff --git a/tools/windows/examples/encodeur.zcos b/tools/scilab/windows/examples/encodeur.zcos Binary files differindex ce3ba95..ce3ba95 100644 --- a/tools/windows/examples/encodeur.zcos +++ b/tools/scilab/windows/examples/encodeur.zcos diff --git a/tools/windows/examples/interrupt_compteur.zcos b/tools/scilab/windows/examples/interrupt_compteur.zcos Binary files differindex d3bb15e..d3bb15e 100644 --- a/tools/windows/examples/interrupt_compteur.zcos +++ b/tools/scilab/windows/examples/interrupt_compteur.zcos diff --git a/tools/windows/examples/moteurBO.zcos b/tools/scilab/windows/examples/moteurBO.zcos Binary files differindex 1f0ff99..1f0ff99 100644 --- a/tools/windows/examples/moteurBO.zcos +++ b/tools/scilab/windows/examples/moteurBO.zcos diff --git a/tools/windows/examples/potentiometre.zcos b/tools/scilab/windows/examples/potentiometre.zcos Binary files differindex 57e1a55..57e1a55 100644 --- a/tools/windows/examples/potentiometre.zcos +++ b/tools/scilab/windows/examples/potentiometre.zcos diff --git a/tools/windows/examples/servomoteur.zcos b/tools/scilab/windows/examples/servomoteur.zcos Binary files differindex d08cbcf..d08cbcf 100644 --- a/tools/windows/examples/servomoteur.zcos +++ b/tools/scilab/windows/examples/servomoteur.zcos diff --git a/tools/windows/examples/variateurLED.zcos b/tools/scilab/windows/examples/variateurLED.zcos Binary files differindex 01747f5..01747f5 100644 --- a/tools/windows/examples/variateurLED.zcos +++ b/tools/scilab/windows/examples/variateurLED.zcos diff --git a/tools/windows/help/builder_help.sce b/tools/scilab/windows/help/builder_help.sce index f8e9e73..f8e9e73 100644 --- a/tools/windows/help/builder_help.sce +++ b/tools/scilab/windows/help/builder_help.sce diff --git a/tools/windows/help/en_US/ANALOG_READ_SB.xml b/tools/scilab/windows/help/en_US/ANALOG_READ_SB.xml index 991e540..991e540 100644 --- a/tools/windows/help/en_US/ANALOG_READ_SB.xml +++ b/tools/scilab/windows/help/en_US/ANALOG_READ_SB.xml diff --git a/tools/windows/help/en_US/ANALOG_READ_SB_dialogbox.png b/tools/scilab/windows/help/en_US/ANALOG_READ_SB_dialogbox.png Binary files differindex 0a4a823..0a4a823 100644 --- a/tools/windows/help/en_US/ANALOG_READ_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/ANALOG_READ_SB_dialogbox.png diff --git a/tools/windows/help/en_US/ANALOG_READ_SB_help.tst b/tools/scilab/windows/help/en_US/ANALOG_READ_SB_help.tst index 7ba080c..7ba080c 100644 --- a/tools/windows/help/en_US/ANALOG_READ_SB_help.tst +++ b/tools/scilab/windows/help/en_US/ANALOG_READ_SB_help.tst diff --git a/tools/windows/help/en_US/ANALOG_READ_example.png b/tools/scilab/windows/help/en_US/ANALOG_READ_example.png Binary files differindex 4df93cf..4df93cf 100644 --- a/tools/windows/help/en_US/ANALOG_READ_example.png +++ b/tools/scilab/windows/help/en_US/ANALOG_READ_example.png diff --git a/tools/windows/help/en_US/ANALOG_WRITE_SB.xml b/tools/scilab/windows/help/en_US/ANALOG_WRITE_SB.xml index 0d191b8..0d191b8 100644 --- a/tools/windows/help/en_US/ANALOG_WRITE_SB.xml +++ b/tools/scilab/windows/help/en_US/ANALOG_WRITE_SB.xml diff --git a/tools/windows/help/en_US/ANALOG_WRITE_SB_dialogbox.png b/tools/scilab/windows/help/en_US/ANALOG_WRITE_SB_dialogbox.png Binary files differindex febf848..febf848 100644 --- a/tools/windows/help/en_US/ANALOG_WRITE_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/ANALOG_WRITE_SB_dialogbox.png diff --git a/tools/windows/help/en_US/ANALOG_WRITE_SB_help.tst b/tools/scilab/windows/help/en_US/ANALOG_WRITE_SB_help.tst index bd305ed..bd305ed 100644 --- a/tools/windows/help/en_US/ANALOG_WRITE_SB_help.tst +++ b/tools/scilab/windows/help/en_US/ANALOG_WRITE_SB_help.tst diff --git a/tools/windows/help/en_US/ANALOG_WRITE_exemple.png b/tools/scilab/windows/help/en_US/ANALOG_WRITE_exemple.png Binary files differindex 8b84651..8b84651 100644 --- a/tools/windows/help/en_US/ANALOG_WRITE_exemple.png +++ b/tools/scilab/windows/help/en_US/ANALOG_WRITE_exemple.png diff --git a/tools/windows/help/en_US/ARDUINO_SETUP.xml b/tools/scilab/windows/help/en_US/ARDUINO_SETUP.xml index d5654d4..d5654d4 100644 --- a/tools/windows/help/en_US/ARDUINO_SETUP.xml +++ b/tools/scilab/windows/help/en_US/ARDUINO_SETUP.xml diff --git a/tools/windows/help/en_US/ARDUINO_SETUP_dialogbox.png b/tools/scilab/windows/help/en_US/ARDUINO_SETUP_dialogbox.png Binary files differindex 715ec38..715ec38 100644 --- a/tools/windows/help/en_US/ARDUINO_SETUP_dialogbox.png +++ b/tools/scilab/windows/help/en_US/ARDUINO_SETUP_dialogbox.png diff --git a/tools/windows/help/en_US/ARDUINO_SETUP_example.png b/tools/scilab/windows/help/en_US/ARDUINO_SETUP_example.png Binary files differindex 22f0da8..22f0da8 100644 --- a/tools/windows/help/en_US/ARDUINO_SETUP_example.png +++ b/tools/scilab/windows/help/en_US/ARDUINO_SETUP_example.png diff --git a/tools/windows/help/en_US/ARDUINO_SETUP_help.tst b/tools/scilab/windows/help/en_US/ARDUINO_SETUP_help.tst index f7de181..f7de181 100644 --- a/tools/windows/help/en_US/ARDUINO_SETUP_help.tst +++ b/tools/scilab/windows/help/en_US/ARDUINO_SETUP_help.tst diff --git a/tools/windows/help/en_US/ASSERV_POS_exemple.png b/tools/scilab/windows/help/en_US/ASSERV_POS_exemple.png Binary files differindex 2ddb447..2ddb447 100644 --- a/tools/windows/help/en_US/ASSERV_POS_exemple.png +++ b/tools/scilab/windows/help/en_US/ASSERV_POS_exemple.png diff --git a/tools/windows/help/en_US/DCMOTOR_SB.tst b/tools/scilab/windows/help/en_US/DCMOTOR_SB.tst index c14ffbe..c14ffbe 100644 --- a/tools/windows/help/en_US/DCMOTOR_SB.tst +++ b/tools/scilab/windows/help/en_US/DCMOTOR_SB.tst diff --git a/tools/windows/help/en_US/DCMOTOR_SB.xml b/tools/scilab/windows/help/en_US/DCMOTOR_SB.xml index f5e51dc..f5e51dc 100644 --- a/tools/windows/help/en_US/DCMOTOR_SB.xml +++ b/tools/scilab/windows/help/en_US/DCMOTOR_SB.xml diff --git a/tools/windows/help/en_US/DCMOTOR_SB_dialogbox1.png b/tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox1.png Binary files differindex 5bf8920..5bf8920 100644 --- a/tools/windows/help/en_US/DCMOTOR_SB_dialogbox1.png +++ b/tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox1.png diff --git a/tools/windows/help/en_US/DCMOTOR_SB_dialogbox2.png b/tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox2.png Binary files differindex 4d2a7b4..4d2a7b4 100644 --- a/tools/windows/help/en_US/DCMOTOR_SB_dialogbox2.png +++ b/tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox2.png diff --git a/tools/windows/help/en_US/DCMOTOR_SB_dialogbox3.png b/tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox3.png Binary files differindex 34a15d0..34a15d0 100644 --- a/tools/windows/help/en_US/DCMOTOR_SB_dialogbox3.png +++ b/tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox3.png diff --git a/tools/windows/help/en_US/DCMOTOR_SB_dialogbox4.png b/tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox4.png Binary files differindex c80e6c3..c80e6c3 100644 --- a/tools/windows/help/en_US/DCMOTOR_SB_dialogbox4.png +++ b/tools/scilab/windows/help/en_US/DCMOTOR_SB_dialogbox4.png diff --git a/tools/windows/help/en_US/DCMOTOR_exemple.png b/tools/scilab/windows/help/en_US/DCMOTOR_exemple.png Binary files differindex 24e50fe..24e50fe 100644 --- a/tools/windows/help/en_US/DCMOTOR_exemple.png +++ b/tools/scilab/windows/help/en_US/DCMOTOR_exemple.png diff --git a/tools/windows/help/en_US/DIGITAL_READ_SB.xml b/tools/scilab/windows/help/en_US/DIGITAL_READ_SB.xml index 81a5cda..81a5cda 100644 --- a/tools/windows/help/en_US/DIGITAL_READ_SB.xml +++ b/tools/scilab/windows/help/en_US/DIGITAL_READ_SB.xml diff --git a/tools/windows/help/en_US/DIGITAL_READ_SB_dialogbox.png b/tools/scilab/windows/help/en_US/DIGITAL_READ_SB_dialogbox.png Binary files differindex 244b37d..244b37d 100644 --- a/tools/windows/help/en_US/DIGITAL_READ_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/DIGITAL_READ_SB_dialogbox.png diff --git a/tools/windows/help/en_US/DIGITAL_READ_SB_help.tst b/tools/scilab/windows/help/en_US/DIGITAL_READ_SB_help.tst index 39ce410..39ce410 100644 --- a/tools/windows/help/en_US/DIGITAL_READ_SB_help.tst +++ b/tools/scilab/windows/help/en_US/DIGITAL_READ_SB_help.tst diff --git a/tools/windows/help/en_US/DIGITAL_WRITE_SB.xml b/tools/scilab/windows/help/en_US/DIGITAL_WRITE_SB.xml index b079f4c..b079f4c 100644 --- a/tools/windows/help/en_US/DIGITAL_WRITE_SB.xml +++ b/tools/scilab/windows/help/en_US/DIGITAL_WRITE_SB.xml diff --git a/tools/windows/help/en_US/DIGITAL_WRITE_SB_dialogbox.png b/tools/scilab/windows/help/en_US/DIGITAL_WRITE_SB_dialogbox.png Binary files differindex 4abc644..4abc644 100644 --- a/tools/windows/help/en_US/DIGITAL_WRITE_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/DIGITAL_WRITE_SB_dialogbox.png diff --git a/tools/windows/help/en_US/DIGITAL_WRITE_SB_help.tst b/tools/scilab/windows/help/en_US/DIGITAL_WRITE_SB_help.tst index 742a23f..742a23f 100644 --- a/tools/windows/help/en_US/DIGITAL_WRITE_SB_help.tst +++ b/tools/scilab/windows/help/en_US/DIGITAL_WRITE_SB_help.tst diff --git a/tools/windows/help/en_US/DIGITAL_exemple.png b/tools/scilab/windows/help/en_US/DIGITAL_exemple.png Binary files differindex 22832fa..22832fa 100644 --- a/tools/windows/help/en_US/DIGITAL_exemple.png +++ b/tools/scilab/windows/help/en_US/DIGITAL_exemple.png diff --git a/tools/windows/help/en_US/ENCODER_SB.tst b/tools/scilab/windows/help/en_US/ENCODER_SB.tst index 33fbfef..33fbfef 100644 --- a/tools/windows/help/en_US/ENCODER_SB.tst +++ b/tools/scilab/windows/help/en_US/ENCODER_SB.tst diff --git a/tools/windows/help/en_US/ENCODER_SB.xml b/tools/scilab/windows/help/en_US/ENCODER_SB.xml index d054e97..d054e97 100644 --- a/tools/windows/help/en_US/ENCODER_SB.xml +++ b/tools/scilab/windows/help/en_US/ENCODER_SB.xml diff --git a/tools/windows/help/en_US/ENCODER_SB_dialogbox1.png b/tools/scilab/windows/help/en_US/ENCODER_SB_dialogbox1.png Binary files differindex 8dbe19c..8dbe19c 100644 --- a/tools/windows/help/en_US/ENCODER_SB_dialogbox1.png +++ b/tools/scilab/windows/help/en_US/ENCODER_SB_dialogbox1.png diff --git a/tools/windows/help/en_US/ENCODER_SB_dialogbox2.png b/tools/scilab/windows/help/en_US/ENCODER_SB_dialogbox2.png Binary files differindex b63878e..b63878e 100644 --- a/tools/windows/help/en_US/ENCODER_SB_dialogbox2.png +++ b/tools/scilab/windows/help/en_US/ENCODER_SB_dialogbox2.png diff --git a/tools/windows/help/en_US/ENCODER_exemple.png b/tools/scilab/windows/help/en_US/ENCODER_exemple.png Binary files differindex 9c477cf..9c477cf 100644 --- a/tools/windows/help/en_US/ENCODER_exemple.png +++ b/tools/scilab/windows/help/en_US/ENCODER_exemple.png diff --git a/tools/windows/help/en_US/INTERRUPT_SB.tst b/tools/scilab/windows/help/en_US/INTERRUPT_SB.tst index ae09246..ae09246 100644 --- a/tools/windows/help/en_US/INTERRUPT_SB.tst +++ b/tools/scilab/windows/help/en_US/INTERRUPT_SB.tst diff --git a/tools/windows/help/en_US/INTERRUPT_SB.xml b/tools/scilab/windows/help/en_US/INTERRUPT_SB.xml index 58e90c2..58e90c2 100644 --- a/tools/windows/help/en_US/INTERRUPT_SB.xml +++ b/tools/scilab/windows/help/en_US/INTERRUPT_SB.xml diff --git a/tools/windows/help/en_US/INTERRUPT_SB_dialogbox.png b/tools/scilab/windows/help/en_US/INTERRUPT_SB_dialogbox.png Binary files differindex ec3f62c..ec3f62c 100644 --- a/tools/windows/help/en_US/INTERRUPT_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/INTERRUPT_SB_dialogbox.png diff --git a/tools/windows/help/en_US/INTERRUPT_exemple.png b/tools/scilab/windows/help/en_US/INTERRUPT_exemple.png Binary files differindex 7807247..7807247 100644 --- a/tools/windows/help/en_US/INTERRUPT_exemple.png +++ b/tools/scilab/windows/help/en_US/INTERRUPT_exemple.png diff --git a/tools/windows/help/en_US/SERVO_SB.tst b/tools/scilab/windows/help/en_US/SERVO_SB.tst index 93323c3..93323c3 100644 --- a/tools/windows/help/en_US/SERVO_SB.tst +++ b/tools/scilab/windows/help/en_US/SERVO_SB.tst diff --git a/tools/windows/help/en_US/SERVO_SB_dialogbox.png b/tools/scilab/windows/help/en_US/SERVO_SB_dialogbox.png Binary files differindex a421e75..a421e75 100644 --- a/tools/windows/help/en_US/SERVO_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/SERVO_SB_dialogbox.png diff --git a/tools/windows/help/en_US/SERVO_SB_exemple.png b/tools/scilab/windows/help/en_US/SERVO_SB_exemple.png Binary files differindex 86cb244..86cb244 100644 --- a/tools/windows/help/en_US/SERVO_SB_exemple.png +++ b/tools/scilab/windows/help/en_US/SERVO_SB_exemple.png diff --git a/tools/windows/help/en_US/SERVO_WRITE_SB.xml b/tools/scilab/windows/help/en_US/SERVO_WRITE_SB.xml index 27b9d3c..27b9d3c 100644 --- a/tools/windows/help/en_US/SERVO_WRITE_SB.xml +++ b/tools/scilab/windows/help/en_US/SERVO_WRITE_SB.xml diff --git a/tools/windows/help/en_US/TIME_SAMPLE.xml b/tools/scilab/windows/help/en_US/TIME_SAMPLE.xml index ae10a49..ae10a49 100644 --- a/tools/windows/help/en_US/TIME_SAMPLE.xml +++ b/tools/scilab/windows/help/en_US/TIME_SAMPLE.xml diff --git a/tools/windows/help/en_US/TIME_SAMPLE_dialogbox.png b/tools/scilab/windows/help/en_US/TIME_SAMPLE_dialogbox.png Binary files differindex 45022af..45022af 100644 --- a/tools/windows/help/en_US/TIME_SAMPLE_dialogbox.png +++ b/tools/scilab/windows/help/en_US/TIME_SAMPLE_dialogbox.png diff --git a/tools/windows/help/en_US/TIME_SAMPLE_help.tst b/tools/scilab/windows/help/en_US/TIME_SAMPLE_help.tst index 6f51d62..6f51d62 100644 --- a/tools/windows/help/en_US/TIME_SAMPLE_help.tst +++ b/tools/scilab/windows/help/en_US/TIME_SAMPLE_help.tst diff --git a/tools/windows/help/en_US/build_help.sce b/tools/scilab/windows/help/en_US/build_help.sce index 7065316..7065316 100644 --- a/tools/windows/help/en_US/build_help.sce +++ b/tools/scilab/windows/help/en_US/build_help.sce diff --git a/tools/windows/help/en_US/close_serial.xml b/tools/scilab/windows/help/en_US/close_serial.xml index 7b50eb6..7b50eb6 100644 --- a/tools/windows/help/en_US/close_serial.xml +++ b/tools/scilab/windows/help/en_US/close_serial.xml diff --git a/tools/windows/help/en_US/cmd_analog_in.tst b/tools/scilab/windows/help/en_US/cmd_analog_in.tst index e2504b0..e2504b0 100644 --- a/tools/windows/help/en_US/cmd_analog_in.tst +++ b/tools/scilab/windows/help/en_US/cmd_analog_in.tst diff --git a/tools/windows/help/en_US/cmd_analog_in.xml b/tools/scilab/windows/help/en_US/cmd_analog_in.xml index 76c48e9..76c48e9 100644 --- a/tools/windows/help/en_US/cmd_analog_in.xml +++ b/tools/scilab/windows/help/en_US/cmd_analog_in.xml diff --git a/tools/windows/help/en_US/cmd_analog_in_volt.xml b/tools/scilab/windows/help/en_US/cmd_analog_in_volt.xml index d140c13..d140c13 100644 --- a/tools/windows/help/en_US/cmd_analog_in_volt.xml +++ b/tools/scilab/windows/help/en_US/cmd_analog_in_volt.xml diff --git a/tools/windows/help/en_US/cmd_analog_out.xml b/tools/scilab/windows/help/en_US/cmd_analog_out.xml index 9895f79..9895f79 100644 --- a/tools/windows/help/en_US/cmd_analog_out.xml +++ b/tools/scilab/windows/help/en_US/cmd_analog_out.xml diff --git a/tools/windows/help/en_US/cmd_analog_out_volt.xml b/tools/scilab/windows/help/en_US/cmd_analog_out_volt.xml index 05f345c..05f345c 100644 --- a/tools/windows/help/en_US/cmd_analog_out_volt.xml +++ b/tools/scilab/windows/help/en_US/cmd_analog_out_volt.xml diff --git a/tools/windows/help/en_US/cmd_arduino_a_control.xml b/tools/scilab/windows/help/en_US/cmd_arduino_a_control.xml index f2d73cd..f2d73cd 100644 --- a/tools/windows/help/en_US/cmd_arduino_a_control.xml +++ b/tools/scilab/windows/help/en_US/cmd_arduino_a_control.xml diff --git a/tools/windows/help/en_US/cmd_arduino_d_control.xml b/tools/scilab/windows/help/en_US/cmd_arduino_d_control.xml index 43ec03b..43ec03b 100644 --- a/tools/windows/help/en_US/cmd_arduino_d_control.xml +++ b/tools/scilab/windows/help/en_US/cmd_arduino_d_control.xml diff --git a/tools/windows/help/en_US/cmd_arduino_meter.xml b/tools/scilab/windows/help/en_US/cmd_arduino_meter.xml index d64d3b2..d64d3b2 100644 --- a/tools/windows/help/en_US/cmd_arduino_meter.xml +++ b/tools/scilab/windows/help/en_US/cmd_arduino_meter.xml diff --git a/tools/windows/help/en_US/cmd_dcmotor_release.xml b/tools/scilab/windows/help/en_US/cmd_dcmotor_release.xml index 9f7d7c5..9f7d7c5 100644 --- a/tools/windows/help/en_US/cmd_dcmotor_release.xml +++ b/tools/scilab/windows/help/en_US/cmd_dcmotor_release.xml diff --git a/tools/windows/help/en_US/cmd_dcmotor_run.xml b/tools/scilab/windows/help/en_US/cmd_dcmotor_run.xml index c97faa0..c97faa0 100644 --- a/tools/windows/help/en_US/cmd_dcmotor_run.xml +++ b/tools/scilab/windows/help/en_US/cmd_dcmotor_run.xml diff --git a/tools/windows/help/en_US/cmd_dcmotor_setup.xml b/tools/scilab/windows/help/en_US/cmd_dcmotor_setup.xml index abbe317..abbe317 100644 --- a/tools/windows/help/en_US/cmd_dcmotor_setup.xml +++ b/tools/scilab/windows/help/en_US/cmd_dcmotor_setup.xml diff --git a/tools/windows/help/en_US/cmd_digital_in.xml b/tools/scilab/windows/help/en_US/cmd_digital_in.xml index 35d7117..35d7117 100644 --- a/tools/windows/help/en_US/cmd_digital_in.xml +++ b/tools/scilab/windows/help/en_US/cmd_digital_in.xml diff --git a/tools/windows/help/en_US/cmd_digital_out.xml b/tools/scilab/windows/help/en_US/cmd_digital_out.xml index 40c8683..40c8683 100644 --- a/tools/windows/help/en_US/cmd_digital_out.xml +++ b/tools/scilab/windows/help/en_US/cmd_digital_out.xml diff --git a/tools/windows/help/en_US/cmd_servo_attach.xml b/tools/scilab/windows/help/en_US/cmd_servo_attach.xml index 361c4c4..361c4c4 100644 --- a/tools/windows/help/en_US/cmd_servo_attach.xml +++ b/tools/scilab/windows/help/en_US/cmd_servo_attach.xml diff --git a/tools/windows/help/en_US/cmd_servo_detach.xml b/tools/scilab/windows/help/en_US/cmd_servo_detach.xml index 29e1cfc..29e1cfc 100644 --- a/tools/windows/help/en_US/cmd_servo_detach.xml +++ b/tools/scilab/windows/help/en_US/cmd_servo_detach.xml diff --git a/tools/windows/help/en_US/cmd_servo_move.xml b/tools/scilab/windows/help/en_US/cmd_servo_move.xml index 370b60c..370b60c 100644 --- a/tools/windows/help/en_US/cmd_servo_move.xml +++ b/tools/scilab/windows/help/en_US/cmd_servo_move.xml diff --git a/tools/windows/help/en_US/master_help.xml b/tools/scilab/windows/help/en_US/master_help.xml index 48cd646..48cd646 100644 --- a/tools/windows/help/en_US/master_help.xml +++ b/tools/scilab/windows/help/en_US/master_help.xml diff --git a/tools/windows/help/en_US/open_serial.xml b/tools/scilab/windows/help/en_US/open_serial.xml index 7f12d3c..7f12d3c 100644 --- a/tools/windows/help/en_US/open_serial.xml +++ b/tools/scilab/windows/help/en_US/open_serial.xml diff --git a/tools/windows/help/en_US/read_file_doc.sci b/tools/scilab/windows/help/en_US/read_file_doc.sci index dae0493..dae0493 100644 --- a/tools/windows/help/en_US/read_file_doc.sci +++ b/tools/scilab/windows/help/en_US/read_file_doc.sci diff --git a/tools/windows/help/en_US/read_file_doc2.sci b/tools/scilab/windows/help/en_US/read_file_doc2.sci index 45275bd..45275bd 100644 --- a/tools/windows/help/en_US/read_file_doc2.sci +++ b/tools/scilab/windows/help/en_US/read_file_doc2.sci diff --git a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif Binary files differindex 00a75c6..00a75c6 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.gif diff --git a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html index bfc43f0..bfc43f0 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png Binary files differindex 0a4a823..0a4a823 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_SB_dialogbox.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_example.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_example.png Binary files differindex 4df93cf..4df93cf 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_READ_example.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_READ_example.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif Binary files differindex 1da5d03..1da5d03 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.gif diff --git a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html index 6dbd86c..6dbd86c 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png Binary files differindex febf848..febf848 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_SB_dialogbox.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png Binary files differindex 8b84651..8b84651 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ANALOG_WRITE_exemple.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif b/tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif Binary files differindex e2e8d42..e2e8d42 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.gif diff --git a/tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html index 60db553..60db553 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png Binary files differindex 715ec38..715ec38 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_dialogbox.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png Binary files differindex 22f0da8..22f0da8 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ARDUINO_SETUP_example.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png Binary files differindex 2ddb447..2ddb447 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ASSERV_POS_exemple.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif Binary files differindex c5cf0e6..c5cf0e6 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.gif diff --git a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.html index 4dbde67..4dbde67 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png Binary files differindex 5bf8920..5bf8920 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox1.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png Binary files differindex 4d2a7b4..4d2a7b4 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox2.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png Binary files differindex 34a15d0..34a15d0 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox3.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png Binary files differindex c80e6c3..c80e6c3 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_SB_dialogbox4.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png Binary files differindex 24e50fe..24e50fe 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DCMOTOR_exemple.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif Binary files differindex 39dea04..39dea04 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.gif diff --git a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html index d4f4783..d4f4783 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png Binary files differindex 244b37d..244b37d 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_READ_SB_dialogbox.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif Binary files differindex e47dca2..e47dca2 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.gif diff --git a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html index 8cb0ad7..8cb0ad7 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png Binary files differindex 4abc644..4abc644 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_WRITE_SB_dialogbox.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_exemple.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_exemple.png Binary files differindex 22832fa..22832fa 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/DIGITAL_exemple.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/DIGITAL_exemple.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB.gif b/tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB.gif Binary files differindex 6cbd55b..6cbd55b 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB.gif +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB.gif diff --git a/tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB.html index 4c653bd..4c653bd 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png Binary files differindex 8dbe19c..8dbe19c 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox1.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png Binary files differindex b63878e..b63878e 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_SB_dialogbox2.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ENCODER_exemple.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_exemple.png Binary files differindex 9c477cf..9c477cf 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ENCODER_exemple.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ENCODER_exemple.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif b/tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif Binary files differindex ec40a43..ec40a43 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.gif diff --git a/tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.html index b662daa..b662daa 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png Binary files differindex ec3f62c..ec3f62c 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_SB_dialogbox.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png Binary files differindex 7807247..7807247 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/INTERRUPT_exemple.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS Binary files differindex 0726cd0..0726cd0 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS diff --git a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB index 8bf9cd9..8bf9cd9 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB diff --git a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS index 7be89b3..7be89b3 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS diff --git a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS Binary files differindex 317823c..317823c 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS diff --git a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA index 8a01b4d..8a01b4d 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA diff --git a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP Binary files differindex 34ad582..34ad582 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP diff --git a/tools/windows/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png Binary files differindex a421e75..a421e75 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_SB_dialogbox.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png Binary files differindex 86cb244..86cb244 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_SB_exemple.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif b/tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif Binary files differindex f04d9fe..f04d9fe 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.gif diff --git a/tools/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html index 96eb16f..96eb16f 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/SERVO_WRITE_SB.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/ScilabCaution.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabCaution.png Binary files differindex a9e4ff3..a9e4ff3 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ScilabCaution.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabCaution.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ScilabEdit.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabEdit.png Binary files differindex 188e1c1..188e1c1 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ScilabEdit.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabEdit.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ScilabExecute.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabExecute.png Binary files differindex a7de0fe..a7de0fe 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ScilabExecute.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabExecute.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ScilabImportant.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabImportant.png Binary files differindex 81e9ed2..81e9ed2 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ScilabImportant.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabImportant.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ScilabNote.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabNote.png Binary files differindex 8851b99..8851b99 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ScilabNote.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabNote.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ScilabTip.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabTip.png Binary files differindex 8851b99..8851b99 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ScilabTip.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabTip.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/ScilabWarning.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabWarning.png Binary files differindex a9e4ff3..a9e4ff3 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/ScilabWarning.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/ScilabWarning.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif b/tools/scilab/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif Binary files differindex 01837f0..01837f0 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.gif diff --git a/tools/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.html index 47b366b..47b366b 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png b/tools/scilab/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png Binary files differindex 45022af..45022af 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/TIME_SAMPLE_dialogbox.png diff --git a/tools/windows/help/en_US/scilab_en_US_help/c_code.css b/tools/scilab/windows/help/en_US/scilab_en_US_help/c_code.css index ae8e1c9..ae8e1c9 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/c_code.css +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/c_code.css diff --git a/tools/windows/help/en_US/scilab_en_US_help/close_serial.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/close_serial.html index da3f14d..da3f14d 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/close_serial.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/close_serial.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_analog_in.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_in.html index f66ba47..f66ba47 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_analog_in.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_in.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html index 0965d79..0965d79 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_in_volt.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_analog_out.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_out.html index af1a887..af1a887 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_analog_out.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_out.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html index f9d2c45..f9d2c45 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_analog_out_volt.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html index af8367e..af8367e 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_arduino_a_control.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html index d20b8f8..d20b8f8 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_arduino_d_control.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_arduino_meter.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_arduino_meter.html index d981317..d981317 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_arduino_meter.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_arduino_meter.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html index 7f83c1d..7f83c1d 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_release.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html index ac57caf..ac57caf 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_run.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html index 16df1dc..16df1dc 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_dcmotor_setup.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_digital_in.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_digital_in.html index d4f84de..d4f84de 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_digital_in.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_digital_in.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_digital_out.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_digital_out.html index d7b255a..d7b255a 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_digital_out.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_digital_out.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_servo_attach.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_servo_attach.html index 766368c..766368c 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_servo_attach.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_servo_attach.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_servo_detach.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_servo_detach.html index 5a79a7e..5a79a7e 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_servo_detach.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_servo_detach.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/cmd_servo_move.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_servo_move.html index 3f0bd41..3f0bd41 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/cmd_servo_move.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/cmd_servo_move.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/index.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/index.html index c1962a5..c1962a5 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/index.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/index.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/jhelpidx.xml b/tools/scilab/windows/help/en_US/scilab_en_US_help/jhelpidx.xml index aa5a66e..aa5a66e 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/jhelpidx.xml +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/jhelpidx.xml diff --git a/tools/windows/help/en_US/scilab_en_US_help/jhelpmap.jhm b/tools/scilab/windows/help/en_US/scilab_en_US_help/jhelpmap.jhm index c73e02b..c73e02b 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/jhelpmap.jhm +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/jhelpmap.jhm diff --git a/tools/windows/help/en_US/scilab_en_US_help/jhelpset.hs b/tools/scilab/windows/help/en_US/scilab_en_US_help/jhelpset.hs index 80509ea..80509ea 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/jhelpset.hs +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/jhelpset.hs diff --git a/tools/windows/help/en_US/scilab_en_US_help/jhelptoc.xml b/tools/scilab/windows/help/en_US/scilab_en_US_help/jhelptoc.xml index 82bfd2e..82bfd2e 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/jhelptoc.xml +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/jhelptoc.xml diff --git a/tools/windows/help/en_US/scilab_en_US_help/open_serial.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/open_serial.html index 235cb6d..235cb6d 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/open_serial.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/open_serial.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/scilab_code.css b/tools/scilab/windows/help/en_US/scilab_en_US_help/scilab_code.css index e36a084..e36a084 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/scilab_code.css +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/scilab_code.css diff --git a/tools/windows/help/en_US/scilab_en_US_help/section_147efb2e6adc067fcd27975e0e16385a.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/section_147efb2e6adc067fcd27975e0e16385a.html index d7feab5..d7feab5 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/section_147efb2e6adc067fcd27975e0e16385a.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/section_147efb2e6adc067fcd27975e0e16385a.html diff --git a/tools/scilab/windows/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html new file mode 100644 index 0000000..d7feab5 --- /dev/null +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/section_d8c18d63fe0e0a7831b9ab7a10831e5a.html @@ -0,0 +1,184 @@ +<html><head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <title></title> + <style type="text/css" media="all"> + @import url("scilab_code.css"); + @import url("xml_code.css"); + @import url("c_code.css"); + @import url("style.css"); + </style> + </head> + <body> + <div class="manualnavbar"> + <table width="100%"><tr> + <td width="30%"> + + </td> + <td width="40%" class="center"> + <span class="top"><a href="index.html">Arduino toolbox</a></span> + + </td> + <td width="30%" class="next"> + + </td> + </tr></table> + <hr /> + </div> + + + + <span class="path"><a href="index.html">Arduino toolbox</a> >> Arduino toolbox</span> + + <br /><br /> + <h3 class="title-part">Arduino toolbox</h3> +<ul class="list-chapter"><li><a href="ANALOG_READ_SB.html" class="refentry">ANALOG_READ_SB</a> — <span class="refentry-description">Analog ports of an Arduino board which allow the acquisition of an analog input</span></li> + + +<li><a href="ANALOG_WRITE_SB.html" class="refentry">ANALOG_WRITE_SB</a> — <span class="refentry-description">Analog outputs which allow generation of analog voltage on a given port</span></li> + + +<li><a href="ARDUINO_SETUP.html" class="refentry">ARDUINO_SETUP</a> — <span class="refentry-description">This block is used to configure the serial port setting for communication between the Arduino and Scilab.</span></li> + + +<li><a href="DCMOTOR_SB.html" class="refentry">DCMOTOR_SB</a> — <span class="refentry-description">This block is used to control a DC motor</span></li> + + +<li><a href="DIGITAL_READ_SB.html" class="refentry">DIGITAL_READ_SB</a> — <span class="refentry-description">Allows to receive a logical value 0 or 1 on a given port.</span></li> + + +<li><a href="DIGITAL_WRITE_SB.html" class="refentry">DIGITAL_WRITE_SB</a> — <span class="refentry-description">Allows to send a logical value 0 or 1 on a given port.</span></li> + + +<li><a href="ENCODER_SB.html" class="refentry">ENCODER_SB</a> — <span class="refentry-description">Used to read encoder signal from one or more channels.</span></li> + + +<li><a href="INTERRUPT_SB.html" class="refentry">INTERRUPT_SB</a> — <span class="refentry-description">Used to track a set of events on one or more channels.</span></li> + + +<li><a href="SERVO_WRITE_SB.html" class="refentry">SERVO_WRITE_SB</a> — <span class="refentry-description">Drive a servomotor by sending command of the angle from 0 to 180°</span></li> + + +<li><a href="TIME_SAMPLE.html" class="refentry">TIME_SAMPLE</a> — <span class="refentry-description">Set the control duration and the sampling time</span></li> + + + + + +<li><a href="close_serial.html" class="refentry">close_serial</a> — <span class="refentry-description">Command to close the serial port which is connected to Arduino</span></li> + + + + + +<li><a href="cmd_analog_in.html" class="refentry">cmd_analog_in</a> — <span class="refentry-description">Command to read in analog signal from a connected Arduino board</span></li> + + + + + +<li><a href="cmd_analog_in_volt.html" class="refentry">cmd_analog_in_volt</a> — <span class="refentry-description">Command to read in analog signal from a connected Arduino board</span></li> + + + + + +<li><a href="cmd_analog_out.html" class="refentry">cmd_analog_out</a> — <span class="refentry-description">Command to sent out analog signal to a connected Arduino board</span></li> + + + + + +<li><a href="cmd_analog_out_volt.html" class="refentry">cmd_analog_out_volt</a> — <span class="refentry-description">Command to sent out analog signal to a connected Arduino board</span></li> + + + + + +<li><a href="cmd_arduino_a_control.html" class="refentry">cmd_arduino_a_control</a> — <span class="refentry-description">GUI to control analog signal to be sent to a connected Arduino board</span></li> + + + + + +<li><a href="cmd_arduino_d_control.html" class="refentry">cmd_arduino_d_control</a> — <span class="refentry-description">GUI to control digital signal to be sent to a connected Arduino board</span></li> + + + + + +<li><a href="cmd_arduino_meter.html" class="refentry">cmd_arduino_meter</a> — <span class="refentry-description">GUI to display continuous signal from a loop, and break the loop after termination of the GUI</span></li> + + + + + +<li><a href="cmd_dcmotor_release.html" class="refentry">cmd_dcmotor_release</a> — <span class="refentry-description">Command to release pins which have setup for DC motor</span></li> + + + + + +<li><a href="cmd_dcmotor_run.html" class="refentry">cmd_dcmotor_run</a> — <span class="refentry-description">Command to run DC motor after setting up</span></li> + + + + + +<li><a href="cmd_dcmotor_setup.html" class="refentry">cmd_dcmotor_setup</a> — <span class="refentry-description">Command to setup pins to control DC motor</span></li> + + + + + +<li><a href="cmd_digital_in.html" class="refentry">cmd_digital_in</a> — <span class="refentry-description">Command to read in digital signal from a connected Arduino board</span></li> + + + + + +<li><a href="cmd_digital_out.html" class="refentry">cmd_digital_out</a> — <span class="refentry-description">Command to sent out digital signal to a connected Arduino board</span></li> + + + + + +<li><a href="cmd_servo_attach.html" class="refentry">cmd_servo_attach</a> — <span class="refentry-description">Command to attach servo motor to Arduino</span></li> + + + + + +<li><a href="cmd_servo_detach.html" class="refentry">cmd_servo_detach</a> — <span class="refentry-description">Command to release the pin which has been setup for servo motor</span></li> + + + + + +<li><a href="cmd_servo_move.html" class="refentry">cmd_servo_move</a> — <span class="refentry-description">Command to run servo motor which has been setup</span></li> + + + + + +<li><a href="open_serial.html" class="refentry">open_serial</a> — <span class="refentry-description">Command to initialize the serial port which is connected to Arduino</span></li></ul> + <br /> + + <div class="manualnavbar"> + <table width="100%"> + <tr><td colspan="3" class="next"><a href="http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages" class="ulink">Report an issue</a></td></tr> +<tr> + <td width="30%"> + + </td> + <td width="40%" class="center"> + <span class="top"><a href="index.html">Arduino toolbox</a></span> + + </td> + <td width="30%" class="next"> + + </td> + </tr></table> + <hr /> + </div> + </body> +</html> diff --git a/tools/windows/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html b/tools/scilab/windows/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html index 51f6ce1..51f6ce1 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/section_f3a404459a61fd97daa21459936e95ac.html diff --git a/tools/windows/help/en_US/scilab_en_US_help/style.css b/tools/scilab/windows/help/en_US/scilab_en_US_help/style.css index 618870f..618870f 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/style.css +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/style.css diff --git a/tools/windows/help/en_US/scilab_en_US_help/xml_code.css b/tools/scilab/windows/help/en_US/scilab_en_US_help/xml_code.css index f75ac01..f75ac01 100644 --- a/tools/windows/help/en_US/scilab_en_US_help/xml_code.css +++ b/tools/scilab/windows/help/en_US/scilab_en_US_help/xml_code.css diff --git a/tools/windows/help/fr_En/ANALOG_READ_SB.xml b/tools/scilab/windows/help/fr_En/ANALOG_READ_SB.xml index 408fb79..408fb79 100644 --- a/tools/windows/help/fr_En/ANALOG_READ_SB.xml +++ b/tools/scilab/windows/help/fr_En/ANALOG_READ_SB.xml diff --git a/tools/windows/help/fr_En/ANALOG_READ_SB_dialogbox.png b/tools/scilab/windows/help/fr_En/ANALOG_READ_SB_dialogbox.png Binary files differindex 0a4a823..0a4a823 100644 --- a/tools/windows/help/fr_En/ANALOG_READ_SB_dialogbox.png +++ b/tools/scilab/windows/help/fr_En/ANALOG_READ_SB_dialogbox.png diff --git a/tools/windows/help/fr_En/ANALOG_READ_SB_help.tst b/tools/scilab/windows/help/fr_En/ANALOG_READ_SB_help.tst index a580e42..a580e42 100644 --- a/tools/windows/help/fr_En/ANALOG_READ_SB_help.tst +++ b/tools/scilab/windows/help/fr_En/ANALOG_READ_SB_help.tst diff --git a/tools/windows/help/fr_En/ANALOG_READ_example.png b/tools/scilab/windows/help/fr_En/ANALOG_READ_example.png Binary files differindex 4df93cf..4df93cf 100644 --- a/tools/windows/help/fr_En/ANALOG_READ_example.png +++ b/tools/scilab/windows/help/fr_En/ANALOG_READ_example.png diff --git a/tools/windows/help/fr_En/ANALOG_WRITE_SB.xml b/tools/scilab/windows/help/fr_En/ANALOG_WRITE_SB.xml index 39baf4b..39baf4b 100644 --- a/tools/windows/help/fr_En/ANALOG_WRITE_SB.xml +++ b/tools/scilab/windows/help/fr_En/ANALOG_WRITE_SB.xml diff --git a/tools/windows/help/fr_En/ANALOG_WRITE_SB_dialogbox.png b/tools/scilab/windows/help/fr_En/ANALOG_WRITE_SB_dialogbox.png Binary files differindex febf848..febf848 100644 --- a/tools/windows/help/fr_En/ANALOG_WRITE_SB_dialogbox.png +++ b/tools/scilab/windows/help/fr_En/ANALOG_WRITE_SB_dialogbox.png diff --git a/tools/windows/help/fr_En/ANALOG_WRITE_SB_help.tst b/tools/scilab/windows/help/fr_En/ANALOG_WRITE_SB_help.tst index dffcda1..dffcda1 100644 --- a/tools/windows/help/fr_En/ANALOG_WRITE_SB_help.tst +++ b/tools/scilab/windows/help/fr_En/ANALOG_WRITE_SB_help.tst diff --git a/tools/windows/help/fr_En/ANALOG_WRITE_exemple.png b/tools/scilab/windows/help/fr_En/ANALOG_WRITE_exemple.png Binary files differindex 8b84651..8b84651 100644 --- a/tools/windows/help/fr_En/ANALOG_WRITE_exemple.png +++ b/tools/scilab/windows/help/fr_En/ANALOG_WRITE_exemple.png diff --git a/tools/windows/help/fr_En/ARDUINO_SETUP.xml b/tools/scilab/windows/help/fr_En/ARDUINO_SETUP.xml index 51ba760..51ba760 100644 --- a/tools/windows/help/fr_En/ARDUINO_SETUP.xml +++ b/tools/scilab/windows/help/fr_En/ARDUINO_SETUP.xml diff --git a/tools/windows/help/fr_En/ARDUINO_SETUP_dialogbox.png b/tools/scilab/windows/help/fr_En/ARDUINO_SETUP_dialogbox.png Binary files differindex 715ec38..715ec38 100644 --- a/tools/windows/help/fr_En/ARDUINO_SETUP_dialogbox.png +++ b/tools/scilab/windows/help/fr_En/ARDUINO_SETUP_dialogbox.png diff --git a/tools/windows/help/fr_En/ARDUINO_SETUP_example.png b/tools/scilab/windows/help/fr_En/ARDUINO_SETUP_example.png Binary files differindex 22f0da8..22f0da8 100644 --- a/tools/windows/help/fr_En/ARDUINO_SETUP_example.png +++ b/tools/scilab/windows/help/fr_En/ARDUINO_SETUP_example.png diff --git a/tools/windows/help/fr_En/ARDUINO_SETUP_help.tst b/tools/scilab/windows/help/fr_En/ARDUINO_SETUP_help.tst index 01ec5af..01ec5af 100644 --- a/tools/windows/help/fr_En/ARDUINO_SETUP_help.tst +++ b/tools/scilab/windows/help/fr_En/ARDUINO_SETUP_help.tst diff --git a/tools/windows/help/fr_En/ASSERV_POS_exemple.png b/tools/scilab/windows/help/fr_En/ASSERV_POS_exemple.png Binary files differindex 2ddb447..2ddb447 100644 --- a/tools/windows/help/fr_En/ASSERV_POS_exemple.png +++ b/tools/scilab/windows/help/fr_En/ASSERV_POS_exemple.png diff --git a/tools/windows/help/fr_En/DCMOTOR_SB.tst b/tools/scilab/windows/help/fr_En/DCMOTOR_SB.tst index bebb341..bebb341 100644 --- a/tools/windows/help/fr_En/DCMOTOR_SB.tst +++ b/tools/scilab/windows/help/fr_En/DCMOTOR_SB.tst diff --git a/tools/windows/help/fr_En/DCMOTOR_SB.xml b/tools/scilab/windows/help/fr_En/DCMOTOR_SB.xml index f33cca0..f33cca0 100644 --- a/tools/windows/help/fr_En/DCMOTOR_SB.xml +++ b/tools/scilab/windows/help/fr_En/DCMOTOR_SB.xml diff --git a/tools/windows/help/fr_En/DCMOTOR_SB_dialogbox1.png b/tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox1.png Binary files differindex 5bf8920..5bf8920 100644 --- a/tools/windows/help/fr_En/DCMOTOR_SB_dialogbox1.png +++ b/tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox1.png diff --git a/tools/windows/help/fr_En/DCMOTOR_SB_dialogbox2.png b/tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox2.png Binary files differindex 4d2a7b4..4d2a7b4 100644 --- a/tools/windows/help/fr_En/DCMOTOR_SB_dialogbox2.png +++ b/tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox2.png diff --git a/tools/windows/help/fr_En/DCMOTOR_SB_dialogbox3.png b/tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox3.png Binary files differindex 34a15d0..34a15d0 100644 --- a/tools/windows/help/fr_En/DCMOTOR_SB_dialogbox3.png +++ b/tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox3.png diff --git a/tools/windows/help/fr_En/DCMOTOR_SB_dialogbox4.png b/tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox4.png Binary files differindex c80e6c3..c80e6c3 100644 --- a/tools/windows/help/fr_En/DCMOTOR_SB_dialogbox4.png +++ b/tools/scilab/windows/help/fr_En/DCMOTOR_SB_dialogbox4.png diff --git a/tools/windows/help/fr_En/DCMOTOR_exemple.png b/tools/scilab/windows/help/fr_En/DCMOTOR_exemple.png Binary files differindex 24e50fe..24e50fe 100644 --- a/tools/windows/help/fr_En/DCMOTOR_exemple.png +++ b/tools/scilab/windows/help/fr_En/DCMOTOR_exemple.png diff --git a/tools/windows/help/fr_En/DIGITAL_READ_SB.xml b/tools/scilab/windows/help/fr_En/DIGITAL_READ_SB.xml index 3a0bbc7..3a0bbc7 100644 --- a/tools/windows/help/fr_En/DIGITAL_READ_SB.xml +++ b/tools/scilab/windows/help/fr_En/DIGITAL_READ_SB.xml diff --git a/tools/windows/help/fr_En/DIGITAL_READ_SB_dialogbox.png b/tools/scilab/windows/help/fr_En/DIGITAL_READ_SB_dialogbox.png Binary files differindex 244b37d..244b37d 100644 --- a/tools/windows/help/fr_En/DIGITAL_READ_SB_dialogbox.png +++ b/tools/scilab/windows/help/fr_En/DIGITAL_READ_SB_dialogbox.png diff --git a/tools/windows/help/fr_En/DIGITAL_READ_SB_help.tst b/tools/scilab/windows/help/fr_En/DIGITAL_READ_SB_help.tst index 4527a64..4527a64 100644 --- a/tools/windows/help/fr_En/DIGITAL_READ_SB_help.tst +++ b/tools/scilab/windows/help/fr_En/DIGITAL_READ_SB_help.tst diff --git a/tools/windows/help/fr_En/DIGITAL_WRITE_SB.xml b/tools/scilab/windows/help/fr_En/DIGITAL_WRITE_SB.xml index 1170bfa..1170bfa 100644 --- a/tools/windows/help/fr_En/DIGITAL_WRITE_SB.xml +++ b/tools/scilab/windows/help/fr_En/DIGITAL_WRITE_SB.xml diff --git a/tools/windows/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png b/tools/scilab/windows/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png Binary files differindex 4abc644..4abc644 100644 --- a/tools/windows/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png +++ b/tools/scilab/windows/help/fr_En/DIGITAL_WRITE_SB_dialogbox.png diff --git a/tools/windows/help/fr_En/DIGITAL_WRITE_SB_help.tst b/tools/scilab/windows/help/fr_En/DIGITAL_WRITE_SB_help.tst index 10a9262..10a9262 100644 --- a/tools/windows/help/fr_En/DIGITAL_WRITE_SB_help.tst +++ b/tools/scilab/windows/help/fr_En/DIGITAL_WRITE_SB_help.tst diff --git a/tools/windows/help/fr_En/DIGITAL_exemple.png b/tools/scilab/windows/help/fr_En/DIGITAL_exemple.png Binary files differindex 22832fa..22832fa 100644 --- a/tools/windows/help/fr_En/DIGITAL_exemple.png +++ b/tools/scilab/windows/help/fr_En/DIGITAL_exemple.png diff --git a/tools/windows/help/fr_En/ENCODER_SB.tst b/tools/scilab/windows/help/fr_En/ENCODER_SB.tst index bc2c04d..bc2c04d 100644 --- a/tools/windows/help/fr_En/ENCODER_SB.tst +++ b/tools/scilab/windows/help/fr_En/ENCODER_SB.tst diff --git a/tools/windows/help/fr_En/ENCODER_SB.xml b/tools/scilab/windows/help/fr_En/ENCODER_SB.xml index 827be7c..827be7c 100644 --- a/tools/windows/help/fr_En/ENCODER_SB.xml +++ b/tools/scilab/windows/help/fr_En/ENCODER_SB.xml diff --git a/tools/windows/help/fr_En/ENCODER_SB_dialogbox1.png b/tools/scilab/windows/help/fr_En/ENCODER_SB_dialogbox1.png Binary files differindex 8dbe19c..8dbe19c 100644 --- a/tools/windows/help/fr_En/ENCODER_SB_dialogbox1.png +++ b/tools/scilab/windows/help/fr_En/ENCODER_SB_dialogbox1.png diff --git a/tools/windows/help/fr_En/ENCODER_SB_dialogbox2.png b/tools/scilab/windows/help/fr_En/ENCODER_SB_dialogbox2.png Binary files differindex b63878e..b63878e 100644 --- a/tools/windows/help/fr_En/ENCODER_SB_dialogbox2.png +++ b/tools/scilab/windows/help/fr_En/ENCODER_SB_dialogbox2.png diff --git a/tools/windows/help/fr_En/ENCODER_exemple.png b/tools/scilab/windows/help/fr_En/ENCODER_exemple.png Binary files differindex 9c477cf..9c477cf 100644 --- a/tools/windows/help/fr_En/ENCODER_exemple.png +++ b/tools/scilab/windows/help/fr_En/ENCODER_exemple.png diff --git a/tools/windows/help/fr_En/INTERRUPT_SB.tst b/tools/scilab/windows/help/fr_En/INTERRUPT_SB.tst index 81c6117..81c6117 100644 --- a/tools/windows/help/fr_En/INTERRUPT_SB.tst +++ b/tools/scilab/windows/help/fr_En/INTERRUPT_SB.tst diff --git a/tools/windows/help/fr_En/INTERRUPT_SB.xml b/tools/scilab/windows/help/fr_En/INTERRUPT_SB.xml index 3f15c00..3f15c00 100644 --- a/tools/windows/help/fr_En/INTERRUPT_SB.xml +++ b/tools/scilab/windows/help/fr_En/INTERRUPT_SB.xml diff --git a/tools/windows/help/fr_En/INTERRUPT_SB_dialogbox.png b/tools/scilab/windows/help/fr_En/INTERRUPT_SB_dialogbox.png Binary files differindex ec3f62c..ec3f62c 100644 --- a/tools/windows/help/fr_En/INTERRUPT_SB_dialogbox.png +++ b/tools/scilab/windows/help/fr_En/INTERRUPT_SB_dialogbox.png diff --git a/tools/windows/help/fr_En/INTERRUPT_exemple.png b/tools/scilab/windows/help/fr_En/INTERRUPT_exemple.png Binary files differindex 7807247..7807247 100644 --- a/tools/windows/help/fr_En/INTERRUPT_exemple.png +++ b/tools/scilab/windows/help/fr_En/INTERRUPT_exemple.png diff --git a/tools/windows/help/fr_En/SERVO_SB.tst b/tools/scilab/windows/help/fr_En/SERVO_SB.tst index a79340d..a79340d 100644 --- a/tools/windows/help/fr_En/SERVO_SB.tst +++ b/tools/scilab/windows/help/fr_En/SERVO_SB.tst diff --git a/tools/windows/help/fr_En/SERVO_SB_dialogbox.png b/tools/scilab/windows/help/fr_En/SERVO_SB_dialogbox.png Binary files differindex a421e75..a421e75 100644 --- a/tools/windows/help/fr_En/SERVO_SB_dialogbox.png +++ b/tools/scilab/windows/help/fr_En/SERVO_SB_dialogbox.png diff --git a/tools/windows/help/fr_En/SERVO_SB_exemple.png b/tools/scilab/windows/help/fr_En/SERVO_SB_exemple.png Binary files differindex 45b7e51..45b7e51 100644 --- a/tools/windows/help/fr_En/SERVO_SB_exemple.png +++ b/tools/scilab/windows/help/fr_En/SERVO_SB_exemple.png diff --git a/tools/windows/help/fr_En/SERVO_WRITE_SB.xml b/tools/scilab/windows/help/fr_En/SERVO_WRITE_SB.xml index a2bf3d1..a2bf3d1 100644 --- a/tools/windows/help/fr_En/SERVO_WRITE_SB.xml +++ b/tools/scilab/windows/help/fr_En/SERVO_WRITE_SB.xml diff --git a/tools/windows/help/fr_En/TIME_SAMPLE.xml b/tools/scilab/windows/help/fr_En/TIME_SAMPLE.xml index 9994a66..9994a66 100644 --- a/tools/windows/help/fr_En/TIME_SAMPLE.xml +++ b/tools/scilab/windows/help/fr_En/TIME_SAMPLE.xml diff --git a/tools/windows/help/fr_En/TIME_SAMPLE_dialogbox.png b/tools/scilab/windows/help/fr_En/TIME_SAMPLE_dialogbox.png Binary files differindex 45022af..45022af 100644 --- a/tools/windows/help/fr_En/TIME_SAMPLE_dialogbox.png +++ b/tools/scilab/windows/help/fr_En/TIME_SAMPLE_dialogbox.png diff --git a/tools/windows/help/fr_En/TIME_SAMPLE_help.tst b/tools/scilab/windows/help/fr_En/TIME_SAMPLE_help.tst index 56ed48a..56ed48a 100644 --- a/tools/windows/help/fr_En/TIME_SAMPLE_help.tst +++ b/tools/scilab/windows/help/fr_En/TIME_SAMPLE_help.tst diff --git a/tools/windows/help/fr_En/build_help.sce b/tools/scilab/windows/help/fr_En/build_help.sce index 7065316..7065316 100644 --- a/tools/windows/help/fr_En/build_help.sce +++ b/tools/scilab/windows/help/fr_En/build_help.sce diff --git a/tools/windows/help/fr_En/read_file_doc.sci b/tools/scilab/windows/help/fr_En/read_file_doc.sci index 254a1d1..254a1d1 100644 --- a/tools/windows/help/fr_En/read_file_doc.sci +++ b/tools/scilab/windows/help/fr_En/read_file_doc.sci diff --git a/tools/windows/images/gif/ANALOG_READ_SB.gif b/tools/scilab/windows/images/gif/ANALOG_READ_SB.gif Binary files differindex 00a75c6..00a75c6 100644 --- a/tools/windows/images/gif/ANALOG_READ_SB.gif +++ b/tools/scilab/windows/images/gif/ANALOG_READ_SB.gif diff --git a/tools/windows/images/gif/ANALOG_WRITE_SB.gif b/tools/scilab/windows/images/gif/ANALOG_WRITE_SB.gif Binary files differindex 1da5d03..1da5d03 100644 --- a/tools/windows/images/gif/ANALOG_WRITE_SB.gif +++ b/tools/scilab/windows/images/gif/ANALOG_WRITE_SB.gif diff --git a/tools/windows/images/gif/ARDUINO_ANALOG_READ.gif b/tools/scilab/windows/images/gif/ARDUINO_ANALOG_READ.gif Binary files differindex 2a680b7..2a680b7 100644 --- a/tools/windows/images/gif/ARDUINO_ANALOG_READ.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_ANALOG_READ.gif diff --git a/tools/windows/images/gif/ARDUINO_ANALOG_WRITE.gif b/tools/scilab/windows/images/gif/ARDUINO_ANALOG_WRITE.gif Binary files differindex 3cf3364..3cf3364 100644 --- a/tools/windows/images/gif/ARDUINO_ANALOG_WRITE.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_ANALOG_WRITE.gif diff --git a/tools/windows/images/gif/ARDUINO_DCMOTOR.gif b/tools/scilab/windows/images/gif/ARDUINO_DCMOTOR.gif Binary files differindex f873281..f873281 100644 --- a/tools/windows/images/gif/ARDUINO_DCMOTOR.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_DCMOTOR.gif diff --git a/tools/windows/images/gif/ARDUINO_DIGITAL_READ.gif b/tools/scilab/windows/images/gif/ARDUINO_DIGITAL_READ.gif Binary files differindex d9dd4d1..d9dd4d1 100644 --- a/tools/windows/images/gif/ARDUINO_DIGITAL_READ.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_DIGITAL_READ.gif diff --git a/tools/windows/images/gif/ARDUINO_DIGITAL_WRITE.gif b/tools/scilab/windows/images/gif/ARDUINO_DIGITAL_WRITE.gif Binary files differindex 29a333a..29a333a 100644 --- a/tools/windows/images/gif/ARDUINO_DIGITAL_WRITE.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_DIGITAL_WRITE.gif diff --git a/tools/windows/images/gif/ARDUINO_ENCODER.gif b/tools/scilab/windows/images/gif/ARDUINO_ENCODER.gif Binary files differindex 51603db..51603db 100644 --- a/tools/windows/images/gif/ARDUINO_ENCODER.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_ENCODER.gif diff --git a/tools/windows/images/gif/ARDUINO_INTERRUPT.gif b/tools/scilab/windows/images/gif/ARDUINO_INTERRUPT.gif Binary files differindex f9540a0..f9540a0 100644 --- a/tools/windows/images/gif/ARDUINO_INTERRUPT.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_INTERRUPT.gif diff --git a/tools/windows/images/gif/ARDUINO_SCOPE.gif b/tools/scilab/windows/images/gif/ARDUINO_SCOPE.gif Binary files differindex 55d3ccd..55d3ccd 100644 --- a/tools/windows/images/gif/ARDUINO_SCOPE.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_SCOPE.gif diff --git a/tools/windows/images/gif/ARDUINO_SERVO_READ.gif b/tools/scilab/windows/images/gif/ARDUINO_SERVO_READ.gif Binary files differindex d6e584e..d6e584e 100644 --- a/tools/windows/images/gif/ARDUINO_SERVO_READ.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_SERVO_READ.gif diff --git a/tools/windows/images/gif/ARDUINO_SERVO_WRITE.gif b/tools/scilab/windows/images/gif/ARDUINO_SERVO_WRITE.gif Binary files differindex f3e7195..f3e7195 100644 --- a/tools/windows/images/gif/ARDUINO_SERVO_WRITE.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_SERVO_WRITE.gif diff --git a/tools/windows/images/gif/ARDUINO_SETUP.gif b/tools/scilab/windows/images/gif/ARDUINO_SETUP.gif Binary files differindex e2e8d42..e2e8d42 100644 --- a/tools/windows/images/gif/ARDUINO_SETUP.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_SETUP.gif diff --git a/tools/windows/images/gif/ARDUINO_STEPPER.gif b/tools/scilab/windows/images/gif/ARDUINO_STEPPER.gif Binary files differindex 7313733..7313733 100644 --- a/tools/windows/images/gif/ARDUINO_STEPPER.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_STEPPER.gif diff --git a/tools/windows/images/gif/ARDUINO_WRITE.gif b/tools/scilab/windows/images/gif/ARDUINO_WRITE.gif Binary files differindex f9540a0..f9540a0 100644 --- a/tools/windows/images/gif/ARDUINO_WRITE.gif +++ b/tools/scilab/windows/images/gif/ARDUINO_WRITE.gif diff --git a/tools/windows/images/gif/DCMOTOR_SB.gif b/tools/scilab/windows/images/gif/DCMOTOR_SB.gif Binary files differindex c5cf0e6..c5cf0e6 100644 --- a/tools/windows/images/gif/DCMOTOR_SB.gif +++ b/tools/scilab/windows/images/gif/DCMOTOR_SB.gif diff --git a/tools/windows/images/gif/DIGITAL_READ_SB.gif b/tools/scilab/windows/images/gif/DIGITAL_READ_SB.gif Binary files differindex 39dea04..39dea04 100644 --- a/tools/windows/images/gif/DIGITAL_READ_SB.gif +++ b/tools/scilab/windows/images/gif/DIGITAL_READ_SB.gif diff --git a/tools/windows/images/gif/DIGITAL_WRITE_SB.gif b/tools/scilab/windows/images/gif/DIGITAL_WRITE_SB.gif Binary files differindex e47dca2..e47dca2 100644 --- a/tools/windows/images/gif/DIGITAL_WRITE_SB.gif +++ b/tools/scilab/windows/images/gif/DIGITAL_WRITE_SB.gif diff --git a/tools/windows/images/gif/ENCODER_SB.gif b/tools/scilab/windows/images/gif/ENCODER_SB.gif Binary files differindex 6cbd55b..6cbd55b 100644 --- a/tools/windows/images/gif/ENCODER_SB.gif +++ b/tools/scilab/windows/images/gif/ENCODER_SB.gif diff --git a/tools/windows/images/gif/INTERRUPT_SB.gif b/tools/scilab/windows/images/gif/INTERRUPT_SB.gif Binary files differindex ec40a43..ec40a43 100644 --- a/tools/windows/images/gif/INTERRUPT_SB.gif +++ b/tools/scilab/windows/images/gif/INTERRUPT_SB.gif diff --git a/tools/windows/images/gif/SERVO_READ_SB.gif b/tools/scilab/windows/images/gif/SERVO_READ_SB.gif Binary files differindex f9540a0..f9540a0 100644 --- a/tools/windows/images/gif/SERVO_READ_SB.gif +++ b/tools/scilab/windows/images/gif/SERVO_READ_SB.gif diff --git a/tools/windows/images/gif/SERVO_WRITE_SB.gif b/tools/scilab/windows/images/gif/SERVO_WRITE_SB.gif Binary files differindex f04d9fe..f04d9fe 100644 --- a/tools/windows/images/gif/SERVO_WRITE_SB.gif +++ b/tools/scilab/windows/images/gif/SERVO_WRITE_SB.gif diff --git a/tools/windows/images/gif/STEPPER_SB.gif b/tools/scilab/windows/images/gif/STEPPER_SB.gif Binary files differindex e49a338..e49a338 100644 --- a/tools/windows/images/gif/STEPPER_SB.gif +++ b/tools/scilab/windows/images/gif/STEPPER_SB.gif diff --git a/tools/windows/images/gif/TIME_SAMPLE.gif b/tools/scilab/windows/images/gif/TIME_SAMPLE.gif Binary files differindex 01837f0..01837f0 100644 --- a/tools/windows/images/gif/TIME_SAMPLE.gif +++ b/tools/scilab/windows/images/gif/TIME_SAMPLE.gif diff --git a/tools/windows/images/h5/ANALOG_READ_SB.sod b/tools/scilab/windows/images/h5/ANALOG_READ_SB.sod Binary files differindex 73d7cf5..73d7cf5 100644 --- a/tools/windows/images/h5/ANALOG_READ_SB.sod +++ b/tools/scilab/windows/images/h5/ANALOG_READ_SB.sod diff --git a/tools/windows/images/h5/ANALOG_WRITE_SB.sod b/tools/scilab/windows/images/h5/ANALOG_WRITE_SB.sod Binary files differindex f6d42f6..f6d42f6 100644 --- a/tools/windows/images/h5/ANALOG_WRITE_SB.sod +++ b/tools/scilab/windows/images/h5/ANALOG_WRITE_SB.sod diff --git a/tools/windows/images/h5/ARDUINO_ANALOG_READ.sod b/tools/scilab/windows/images/h5/ARDUINO_ANALOG_READ.sod Binary files differindex daf7d21..daf7d21 100644 --- a/tools/windows/images/h5/ARDUINO_ANALOG_READ.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_ANALOG_READ.sod diff --git a/tools/windows/images/h5/ARDUINO_ANALOG_WRITE.sod b/tools/scilab/windows/images/h5/ARDUINO_ANALOG_WRITE.sod Binary files differindex cd356f4..cd356f4 100644 --- a/tools/windows/images/h5/ARDUINO_ANALOG_WRITE.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_ANALOG_WRITE.sod diff --git a/tools/windows/images/h5/ARDUINO_DCMOTOR.sod b/tools/scilab/windows/images/h5/ARDUINO_DCMOTOR.sod Binary files differindex 9642a9a..9642a9a 100644 --- a/tools/windows/images/h5/ARDUINO_DCMOTOR.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_DCMOTOR.sod diff --git a/tools/windows/images/h5/ARDUINO_DIGITAL_READ.sod b/tools/scilab/windows/images/h5/ARDUINO_DIGITAL_READ.sod Binary files differindex ab61f13..ab61f13 100644 --- a/tools/windows/images/h5/ARDUINO_DIGITAL_READ.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_DIGITAL_READ.sod diff --git a/tools/windows/images/h5/ARDUINO_DIGITAL_WRITE.sod b/tools/scilab/windows/images/h5/ARDUINO_DIGITAL_WRITE.sod Binary files differindex 7c1fc31..7c1fc31 100644 --- a/tools/windows/images/h5/ARDUINO_DIGITAL_WRITE.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_DIGITAL_WRITE.sod diff --git a/tools/windows/images/h5/ARDUINO_ENCODER.sod b/tools/scilab/windows/images/h5/ARDUINO_ENCODER.sod Binary files differindex dd4a324..dd4a324 100644 --- a/tools/windows/images/h5/ARDUINO_ENCODER.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_ENCODER.sod diff --git a/tools/windows/images/h5/ARDUINO_INTERRUPT.sod b/tools/scilab/windows/images/h5/ARDUINO_INTERRUPT.sod Binary files differindex 7e72ccb..7e72ccb 100644 --- a/tools/windows/images/h5/ARDUINO_INTERRUPT.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_INTERRUPT.sod diff --git a/tools/windows/images/h5/ARDUINO_SCOPE.sod b/tools/scilab/windows/images/h5/ARDUINO_SCOPE.sod Binary files differindex 0713582..0713582 100644 --- a/tools/windows/images/h5/ARDUINO_SCOPE.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_SCOPE.sod diff --git a/tools/windows/images/h5/ARDUINO_SERVO_READ.sod b/tools/scilab/windows/images/h5/ARDUINO_SERVO_READ.sod Binary files differindex bc473f2..bc473f2 100644 --- a/tools/windows/images/h5/ARDUINO_SERVO_READ.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_SERVO_READ.sod diff --git a/tools/windows/images/h5/ARDUINO_SERVO_WRITE.sod b/tools/scilab/windows/images/h5/ARDUINO_SERVO_WRITE.sod Binary files differindex 401292c..401292c 100644 --- a/tools/windows/images/h5/ARDUINO_SERVO_WRITE.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_SERVO_WRITE.sod diff --git a/tools/windows/images/h5/ARDUINO_SETUP.sod b/tools/scilab/windows/images/h5/ARDUINO_SETUP.sod Binary files differindex 38a11eb..38a11eb 100644 --- a/tools/windows/images/h5/ARDUINO_SETUP.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_SETUP.sod diff --git a/tools/windows/images/h5/ARDUINO_STEPPER.sod b/tools/scilab/windows/images/h5/ARDUINO_STEPPER.sod Binary files differindex 6067bfe..6067bfe 100644 --- a/tools/windows/images/h5/ARDUINO_STEPPER.sod +++ b/tools/scilab/windows/images/h5/ARDUINO_STEPPER.sod diff --git a/tools/windows/images/h5/DCMOTOR_SB.sod b/tools/scilab/windows/images/h5/DCMOTOR_SB.sod Binary files differindex 2d6ff4a..2d6ff4a 100644 --- a/tools/windows/images/h5/DCMOTOR_SB.sod +++ b/tools/scilab/windows/images/h5/DCMOTOR_SB.sod diff --git a/tools/windows/images/h5/DIGITAL_READ_SB.sod b/tools/scilab/windows/images/h5/DIGITAL_READ_SB.sod Binary files differindex f614636..f614636 100644 --- a/tools/windows/images/h5/DIGITAL_READ_SB.sod +++ b/tools/scilab/windows/images/h5/DIGITAL_READ_SB.sod diff --git a/tools/windows/images/h5/DIGITAL_WRITE_SB.sod b/tools/scilab/windows/images/h5/DIGITAL_WRITE_SB.sod Binary files differindex 54b6012..54b6012 100644 --- a/tools/windows/images/h5/DIGITAL_WRITE_SB.sod +++ b/tools/scilab/windows/images/h5/DIGITAL_WRITE_SB.sod diff --git a/tools/windows/images/h5/ENCODER_SB.sod b/tools/scilab/windows/images/h5/ENCODER_SB.sod Binary files differindex 0ffd2a6..0ffd2a6 100644 --- a/tools/windows/images/h5/ENCODER_SB.sod +++ b/tools/scilab/windows/images/h5/ENCODER_SB.sod diff --git a/tools/windows/images/h5/INTERRUPT_SB.sod b/tools/scilab/windows/images/h5/INTERRUPT_SB.sod Binary files differindex 2a72b83..2a72b83 100644 --- a/tools/windows/images/h5/INTERRUPT_SB.sod +++ b/tools/scilab/windows/images/h5/INTERRUPT_SB.sod diff --git a/tools/windows/images/h5/SERVO_READ_SB.sod b/tools/scilab/windows/images/h5/SERVO_READ_SB.sod Binary files differindex 8d83cee..8d83cee 100644 --- a/tools/windows/images/h5/SERVO_READ_SB.sod +++ b/tools/scilab/windows/images/h5/SERVO_READ_SB.sod diff --git a/tools/windows/images/h5/SERVO_WRITE_SB.sod b/tools/scilab/windows/images/h5/SERVO_WRITE_SB.sod Binary files differindex 617d88f..617d88f 100644 --- a/tools/windows/images/h5/SERVO_WRITE_SB.sod +++ b/tools/scilab/windows/images/h5/SERVO_WRITE_SB.sod diff --git a/tools/windows/images/h5/STEPPER_SB.sod b/tools/scilab/windows/images/h5/STEPPER_SB.sod Binary files differindex 5171f13..5171f13 100644 --- a/tools/windows/images/h5/STEPPER_SB.sod +++ b/tools/scilab/windows/images/h5/STEPPER_SB.sod diff --git a/tools/windows/images/h5/TIME_SAMPLE.sod b/tools/scilab/windows/images/h5/TIME_SAMPLE.sod Binary files differindex c3e1f2c..c3e1f2c 100644 --- a/tools/windows/images/h5/TIME_SAMPLE.sod +++ b/tools/scilab/windows/images/h5/TIME_SAMPLE.sod diff --git a/tools/windows/images/svg/ANALOG_READ_SB.svg b/tools/scilab/windows/images/svg/ANALOG_READ_SB.svg index b714955..b714955 100644 --- a/tools/windows/images/svg/ANALOG_READ_SB.svg +++ b/tools/scilab/windows/images/svg/ANALOG_READ_SB.svg diff --git a/tools/windows/images/svg/ANALOG_WRITE_SB.svg b/tools/scilab/windows/images/svg/ANALOG_WRITE_SB.svg index 36ef087..36ef087 100644 --- a/tools/windows/images/svg/ANALOG_WRITE_SB.svg +++ b/tools/scilab/windows/images/svg/ANALOG_WRITE_SB.svg diff --git a/tools/windows/images/svg/ARDUINO_ANALOG_READ.svg b/tools/scilab/windows/images/svg/ARDUINO_ANALOG_READ.svg index b714955..b714955 100644 --- a/tools/windows/images/svg/ARDUINO_ANALOG_READ.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_ANALOG_READ.svg diff --git a/tools/windows/images/svg/ARDUINO_ANALOG_WRITE.svg b/tools/scilab/windows/images/svg/ARDUINO_ANALOG_WRITE.svg index 36ef087..36ef087 100644 --- a/tools/windows/images/svg/ARDUINO_ANALOG_WRITE.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_ANALOG_WRITE.svg diff --git a/tools/windows/images/svg/ARDUINO_DCMOTOR.svg b/tools/scilab/windows/images/svg/ARDUINO_DCMOTOR.svg index 0b18a66..0b18a66 100644 --- a/tools/windows/images/svg/ARDUINO_DCMOTOR.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_DCMOTOR.svg diff --git a/tools/windows/images/svg/ARDUINO_DIGITAL_READ.svg b/tools/scilab/windows/images/svg/ARDUINO_DIGITAL_READ.svg index 720a675..720a675 100644 --- a/tools/windows/images/svg/ARDUINO_DIGITAL_READ.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_DIGITAL_READ.svg diff --git a/tools/windows/images/svg/ARDUINO_DIGITAL_WRITE.svg b/tools/scilab/windows/images/svg/ARDUINO_DIGITAL_WRITE.svg index 720a675..720a675 100644 --- a/tools/windows/images/svg/ARDUINO_DIGITAL_WRITE.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_DIGITAL_WRITE.svg diff --git a/tools/windows/images/svg/ARDUINO_ENCODER.svg b/tools/scilab/windows/images/svg/ARDUINO_ENCODER.svg index e3ce332..e3ce332 100644 --- a/tools/windows/images/svg/ARDUINO_ENCODER.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_ENCODER.svg diff --git a/tools/windows/images/svg/ARDUINO_INTERRUPT.svg b/tools/scilab/windows/images/svg/ARDUINO_INTERRUPT.svg index e3ce332..e3ce332 100644 --- a/tools/windows/images/svg/ARDUINO_INTERRUPT.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_INTERRUPT.svg diff --git a/tools/windows/images/svg/ARDUINO_SCOPE.svg b/tools/scilab/windows/images/svg/ARDUINO_SCOPE.svg index bd06723..bd06723 100644 --- a/tools/windows/images/svg/ARDUINO_SCOPE.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_SCOPE.svg diff --git a/tools/windows/images/svg/ARDUINO_SERVO_READ.svg b/tools/scilab/windows/images/svg/ARDUINO_SERVO_READ.svg index 960d74f..960d74f 100644 --- a/tools/windows/images/svg/ARDUINO_SERVO_READ.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_SERVO_READ.svg diff --git a/tools/windows/images/svg/ARDUINO_SERVO_WRITE.svg b/tools/scilab/windows/images/svg/ARDUINO_SERVO_WRITE.svg index 960d74f..960d74f 100644 --- a/tools/windows/images/svg/ARDUINO_SERVO_WRITE.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_SERVO_WRITE.svg diff --git a/tools/windows/images/svg/ARDUINO_SETUP.svg b/tools/scilab/windows/images/svg/ARDUINO_SETUP.svg index b9b2097..b9b2097 100644 --- a/tools/windows/images/svg/ARDUINO_SETUP.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_SETUP.svg diff --git a/tools/windows/images/svg/ARDUINO_STEPPER.svg b/tools/scilab/windows/images/svg/ARDUINO_STEPPER.svg index 068cfdf..068cfdf 100644 --- a/tools/windows/images/svg/ARDUINO_STEPPER.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_STEPPER.svg diff --git a/tools/windows/images/svg/ARDUINO_WRITE.svg b/tools/scilab/windows/images/svg/ARDUINO_WRITE.svg index 9ed8f4d..9ed8f4d 100644 --- a/tools/windows/images/svg/ARDUINO_WRITE.svg +++ b/tools/scilab/windows/images/svg/ARDUINO_WRITE.svg diff --git a/tools/windows/images/svg/DCMOTOR_SB.svg b/tools/scilab/windows/images/svg/DCMOTOR_SB.svg index 0b18a66..0b18a66 100644 --- a/tools/windows/images/svg/DCMOTOR_SB.svg +++ b/tools/scilab/windows/images/svg/DCMOTOR_SB.svg diff --git a/tools/windows/images/svg/DIGITAL_READ_SB.svg b/tools/scilab/windows/images/svg/DIGITAL_READ_SB.svg index 720a675..720a675 100644 --- a/tools/windows/images/svg/DIGITAL_READ_SB.svg +++ b/tools/scilab/windows/images/svg/DIGITAL_READ_SB.svg diff --git a/tools/windows/images/svg/DIGITAL_WRITE_SB.svg b/tools/scilab/windows/images/svg/DIGITAL_WRITE_SB.svg index 720a675..720a675 100644 --- a/tools/windows/images/svg/DIGITAL_WRITE_SB.svg +++ b/tools/scilab/windows/images/svg/DIGITAL_WRITE_SB.svg diff --git a/tools/windows/images/svg/ENCODER_SB.svg b/tools/scilab/windows/images/svg/ENCODER_SB.svg index e3ce332..e3ce332 100644 --- a/tools/windows/images/svg/ENCODER_SB.svg +++ b/tools/scilab/windows/images/svg/ENCODER_SB.svg diff --git a/tools/windows/images/svg/INTERRUPT_SB.svg b/tools/scilab/windows/images/svg/INTERRUPT_SB.svg index ffcc1b1..ffcc1b1 100644 --- a/tools/windows/images/svg/INTERRUPT_SB.svg +++ b/tools/scilab/windows/images/svg/INTERRUPT_SB.svg diff --git a/tools/windows/images/svg/SERVO_READ_SB.svg b/tools/scilab/windows/images/svg/SERVO_READ_SB.svg index 960d74f..960d74f 100644 --- a/tools/windows/images/svg/SERVO_READ_SB.svg +++ b/tools/scilab/windows/images/svg/SERVO_READ_SB.svg diff --git a/tools/windows/images/svg/SERVO_WRITE_SB.svg b/tools/scilab/windows/images/svg/SERVO_WRITE_SB.svg index 960d74f..960d74f 100644 --- a/tools/windows/images/svg/SERVO_WRITE_SB.svg +++ b/tools/scilab/windows/images/svg/SERVO_WRITE_SB.svg diff --git a/tools/windows/images/svg/STEPPER_SB.svg b/tools/scilab/windows/images/svg/STEPPER_SB.svg index 068cfdf..068cfdf 100644 --- a/tools/windows/images/svg/STEPPER_SB.svg +++ b/tools/scilab/windows/images/svg/STEPPER_SB.svg diff --git a/tools/windows/images/svg/TIME_SAMPLE.svg b/tools/scilab/windows/images/svg/TIME_SAMPLE.svg index 04530bd..04530bd 100644 --- a/tools/windows/images/svg/TIME_SAMPLE.svg +++ b/tools/scilab/windows/images/svg/TIME_SAMPLE.svg diff --git a/tools/windows/jar/scilab_en_US_help.jar b/tools/scilab/windows/jar/scilab_en_US_help.jar Binary files differindex 1d3e317..1d3e317 100644 --- a/tools/windows/jar/scilab_en_US_help.jar +++ b/tools/scilab/windows/jar/scilab_en_US_help.jar diff --git a/tools/windows/loader.sce b/tools/scilab/windows/loader.sce index 9d61be6..9d61be6 100644 --- a/tools/windows/loader.sce +++ b/tools/scilab/windows/loader.sce diff --git a/tools/windows/macros/ANALOG_READ_SB.bin b/tools/scilab/windows/macros/ANALOG_READ_SB.bin Binary files differindex 5c2cfe7..5c2cfe7 100644 --- a/tools/windows/macros/ANALOG_READ_SB.bin +++ b/tools/scilab/windows/macros/ANALOG_READ_SB.bin diff --git a/tools/windows/macros/ANALOG_READ_SB.sci b/tools/scilab/windows/macros/ANALOG_READ_SB.sci index f2f1b4c..f2f1b4c 100644 --- a/tools/windows/macros/ANALOG_READ_SB.sci +++ b/tools/scilab/windows/macros/ANALOG_READ_SB.sci diff --git a/tools/windows/macros/ANALOG_WRITE_SB.bin b/tools/scilab/windows/macros/ANALOG_WRITE_SB.bin Binary files differindex 6920c5f..6920c5f 100644 --- a/tools/windows/macros/ANALOG_WRITE_SB.bin +++ b/tools/scilab/windows/macros/ANALOG_WRITE_SB.bin diff --git a/tools/windows/macros/ANALOG_WRITE_SB.sci b/tools/scilab/windows/macros/ANALOG_WRITE_SB.sci index b9af007..b9af007 100644 --- a/tools/windows/macros/ANALOG_WRITE_SB.sci +++ b/tools/scilab/windows/macros/ANALOG_WRITE_SB.sci diff --git a/tools/windows/macros/ARDUINO_ANALOG_READ.bin b/tools/scilab/windows/macros/ARDUINO_ANALOG_READ.bin Binary files differindex ed51dec..ed51dec 100644 --- a/tools/windows/macros/ARDUINO_ANALOG_READ.bin +++ b/tools/scilab/windows/macros/ARDUINO_ANALOG_READ.bin diff --git a/tools/windows/macros/ARDUINO_ANALOG_READ.sci b/tools/scilab/windows/macros/ARDUINO_ANALOG_READ.sci index 6677419..6677419 100644 --- a/tools/windows/macros/ARDUINO_ANALOG_READ.sci +++ b/tools/scilab/windows/macros/ARDUINO_ANALOG_READ.sci diff --git a/tools/windows/macros/ARDUINO_ANALOG_READ_sim.bin b/tools/scilab/windows/macros/ARDUINO_ANALOG_READ_sim.bin Binary files differindex 6294990..6294990 100644 --- a/tools/windows/macros/ARDUINO_ANALOG_READ_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_ANALOG_READ_sim.bin diff --git a/tools/windows/macros/ARDUINO_ANALOG_READ_sim.sci b/tools/scilab/windows/macros/ARDUINO_ANALOG_READ_sim.sci index 1778fd3..1778fd3 100644 --- a/tools/windows/macros/ARDUINO_ANALOG_READ_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_ANALOG_READ_sim.sci diff --git a/tools/windows/macros/ARDUINO_ANALOG_WRITE.bin b/tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE.bin Binary files differindex 6f0ee0b..6f0ee0b 100644 --- a/tools/windows/macros/ARDUINO_ANALOG_WRITE.bin +++ b/tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE.bin diff --git a/tools/windows/macros/ARDUINO_ANALOG_WRITE.sci b/tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE.sci index 6932907..6932907 100644 --- a/tools/windows/macros/ARDUINO_ANALOG_WRITE.sci +++ b/tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE.sci diff --git a/tools/windows/macros/ARDUINO_ANALOG_WRITE_sim.bin b/tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE_sim.bin Binary files differindex f3f23ba..f3f23ba 100644 --- a/tools/windows/macros/ARDUINO_ANALOG_WRITE_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE_sim.bin diff --git a/tools/windows/macros/ARDUINO_ANALOG_WRITE_sim.sci b/tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE_sim.sci index c2a5bac..c2a5bac 100644 --- a/tools/windows/macros/ARDUINO_ANALOG_WRITE_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_ANALOG_WRITE_sim.sci diff --git a/tools/windows/macros/ARDUINO_DCMOTOR.bin b/tools/scilab/windows/macros/ARDUINO_DCMOTOR.bin Binary files differindex 308b1c5..308b1c5 100644 --- a/tools/windows/macros/ARDUINO_DCMOTOR.bin +++ b/tools/scilab/windows/macros/ARDUINO_DCMOTOR.bin diff --git a/tools/windows/macros/ARDUINO_DCMOTOR.sci b/tools/scilab/windows/macros/ARDUINO_DCMOTOR.sci index 054b4ef..054b4ef 100644 --- a/tools/windows/macros/ARDUINO_DCMOTOR.sci +++ b/tools/scilab/windows/macros/ARDUINO_DCMOTOR.sci diff --git a/tools/windows/macros/ARDUINO_DCMOTOR_sim.bin b/tools/scilab/windows/macros/ARDUINO_DCMOTOR_sim.bin Binary files differindex e33d79a..e33d79a 100644 --- a/tools/windows/macros/ARDUINO_DCMOTOR_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_DCMOTOR_sim.bin diff --git a/tools/windows/macros/ARDUINO_DCMOTOR_sim.sci b/tools/scilab/windows/macros/ARDUINO_DCMOTOR_sim.sci index d69635c..d69635c 100644 --- a/tools/windows/macros/ARDUINO_DCMOTOR_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_DCMOTOR_sim.sci diff --git a/tools/windows/macros/ARDUINO_DIGITAL_READ.bin b/tools/scilab/windows/macros/ARDUINO_DIGITAL_READ.bin Binary files differindex 5d4e155..5d4e155 100644 --- a/tools/windows/macros/ARDUINO_DIGITAL_READ.bin +++ b/tools/scilab/windows/macros/ARDUINO_DIGITAL_READ.bin diff --git a/tools/windows/macros/ARDUINO_DIGITAL_READ.sci b/tools/scilab/windows/macros/ARDUINO_DIGITAL_READ.sci index 78d0e00..78d0e00 100644 --- a/tools/windows/macros/ARDUINO_DIGITAL_READ.sci +++ b/tools/scilab/windows/macros/ARDUINO_DIGITAL_READ.sci diff --git a/tools/windows/macros/ARDUINO_DIGITAL_READ_sim.bin b/tools/scilab/windows/macros/ARDUINO_DIGITAL_READ_sim.bin Binary files differindex f42d148..f42d148 100644 --- a/tools/windows/macros/ARDUINO_DIGITAL_READ_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_DIGITAL_READ_sim.bin diff --git a/tools/windows/macros/ARDUINO_DIGITAL_READ_sim.sci b/tools/scilab/windows/macros/ARDUINO_DIGITAL_READ_sim.sci index ad132bb..ad132bb 100644 --- a/tools/windows/macros/ARDUINO_DIGITAL_READ_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_DIGITAL_READ_sim.sci diff --git a/tools/windows/macros/ARDUINO_DIGITAL_WRITE.bin b/tools/scilab/windows/macros/ARDUINO_DIGITAL_WRITE.bin Binary files differindex 2ad4691..2ad4691 100644 --- a/tools/windows/macros/ARDUINO_DIGITAL_WRITE.bin +++ b/tools/scilab/windows/macros/ARDUINO_DIGITAL_WRITE.bin diff --git a/tools/windows/macros/ARDUINO_DIGITAL_WRITE.sci b/tools/scilab/windows/macros/ARDUINO_DIGITAL_WRITE.sci index 3b800a9..3b800a9 100644 --- a/tools/windows/macros/ARDUINO_DIGITAL_WRITE.sci +++ b/tools/scilab/windows/macros/ARDUINO_DIGITAL_WRITE.sci diff --git a/tools/windows/macros/ARDUINO_DIG_WRITE_sim.bin b/tools/scilab/windows/macros/ARDUINO_DIG_WRITE_sim.bin Binary files differindex 6ae3d08..6ae3d08 100644 --- a/tools/windows/macros/ARDUINO_DIG_WRITE_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_DIG_WRITE_sim.bin diff --git a/tools/windows/macros/ARDUINO_DIG_WRITE_sim.sci b/tools/scilab/windows/macros/ARDUINO_DIG_WRITE_sim.sci index 6b2a355..6b2a355 100644 --- a/tools/windows/macros/ARDUINO_DIG_WRITE_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_DIG_WRITE_sim.sci diff --git a/tools/windows/macros/ARDUINO_ENCODER.bin b/tools/scilab/windows/macros/ARDUINO_ENCODER.bin Binary files differindex b5b904d..b5b904d 100644 --- a/tools/windows/macros/ARDUINO_ENCODER.bin +++ b/tools/scilab/windows/macros/ARDUINO_ENCODER.bin diff --git a/tools/windows/macros/ARDUINO_ENCODER.sci b/tools/scilab/windows/macros/ARDUINO_ENCODER.sci index c5bd025..c5bd025 100644 --- a/tools/windows/macros/ARDUINO_ENCODER.sci +++ b/tools/scilab/windows/macros/ARDUINO_ENCODER.sci diff --git a/tools/windows/macros/ARDUINO_ENCODER_sim.bin b/tools/scilab/windows/macros/ARDUINO_ENCODER_sim.bin Binary files differindex 475b5ae..475b5ae 100644 --- a/tools/windows/macros/ARDUINO_ENCODER_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_ENCODER_sim.bin diff --git a/tools/windows/macros/ARDUINO_ENCODER_sim.sci b/tools/scilab/windows/macros/ARDUINO_ENCODER_sim.sci index aa3e860..aa3e860 100644 --- a/tools/windows/macros/ARDUINO_ENCODER_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_ENCODER_sim.sci diff --git a/tools/windows/macros/ARDUINO_INTERRUPT.bin b/tools/scilab/windows/macros/ARDUINO_INTERRUPT.bin Binary files differindex f4adf0a..f4adf0a 100644 --- a/tools/windows/macros/ARDUINO_INTERRUPT.bin +++ b/tools/scilab/windows/macros/ARDUINO_INTERRUPT.bin diff --git a/tools/windows/macros/ARDUINO_INTERRUPT.sci b/tools/scilab/windows/macros/ARDUINO_INTERRUPT.sci index 754054e..754054e 100644 --- a/tools/windows/macros/ARDUINO_INTERRUPT.sci +++ b/tools/scilab/windows/macros/ARDUINO_INTERRUPT.sci diff --git a/tools/windows/macros/ARDUINO_INTERRUPT_sim.bin b/tools/scilab/windows/macros/ARDUINO_INTERRUPT_sim.bin Binary files differindex 0fa8b69..0fa8b69 100644 --- a/tools/windows/macros/ARDUINO_INTERRUPT_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_INTERRUPT_sim.bin diff --git a/tools/windows/macros/ARDUINO_INTERRUPT_sim.sci b/tools/scilab/windows/macros/ARDUINO_INTERRUPT_sim.sci index 75bcea3..75bcea3 100644 --- a/tools/windows/macros/ARDUINO_INTERRUPT_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_INTERRUPT_sim.sci diff --git a/tools/windows/macros/ARDUINO_PMODHB5.bin b/tools/scilab/windows/macros/ARDUINO_PMODHB5.bin Binary files differindex a892246..a892246 100644 --- a/tools/windows/macros/ARDUINO_PMODHB5.bin +++ b/tools/scilab/windows/macros/ARDUINO_PMODHB5.bin diff --git a/tools/windows/macros/ARDUINO_PMODHB5.sci b/tools/scilab/windows/macros/ARDUINO_PMODHB5.sci index e44fd39..e44fd39 100644 --- a/tools/windows/macros/ARDUINO_PMODHB5.sci +++ b/tools/scilab/windows/macros/ARDUINO_PMODHB5.sci diff --git a/tools/windows/macros/ARDUINO_PMODHB5_WRITE_sim.bin b/tools/scilab/windows/macros/ARDUINO_PMODHB5_WRITE_sim.bin Binary files differindex f9443a2..f9443a2 100644 --- a/tools/windows/macros/ARDUINO_PMODHB5_WRITE_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_PMODHB5_WRITE_sim.bin diff --git a/tools/windows/macros/ARDUINO_PMODHB5_WRITE_sim.sci b/tools/scilab/windows/macros/ARDUINO_PMODHB5_WRITE_sim.sci index 4bf1ba3..4bf1ba3 100644 --- a/tools/windows/macros/ARDUINO_PMODHB5_WRITE_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_PMODHB5_WRITE_sim.sci diff --git a/tools/windows/macros/ARDUINO_SCOPE.bin b/tools/scilab/windows/macros/ARDUINO_SCOPE.bin Binary files differindex d64ac90..d64ac90 100644 --- a/tools/windows/macros/ARDUINO_SCOPE.bin +++ b/tools/scilab/windows/macros/ARDUINO_SCOPE.bin diff --git a/tools/windows/macros/ARDUINO_SCOPE.sci b/tools/scilab/windows/macros/ARDUINO_SCOPE.sci index a10883b..a10883b 100644 --- a/tools/windows/macros/ARDUINO_SCOPE.sci +++ b/tools/scilab/windows/macros/ARDUINO_SCOPE.sci diff --git a/tools/windows/macros/ARDUINO_SERVO_READ.bin b/tools/scilab/windows/macros/ARDUINO_SERVO_READ.bin Binary files differindex 7a5cc8d..7a5cc8d 100644 --- a/tools/windows/macros/ARDUINO_SERVO_READ.bin +++ b/tools/scilab/windows/macros/ARDUINO_SERVO_READ.bin diff --git a/tools/windows/macros/ARDUINO_SERVO_READ.sci b/tools/scilab/windows/macros/ARDUINO_SERVO_READ.sci index 1f99c3a..1f99c3a 100644 --- a/tools/windows/macros/ARDUINO_SERVO_READ.sci +++ b/tools/scilab/windows/macros/ARDUINO_SERVO_READ.sci diff --git a/tools/windows/macros/ARDUINO_SERVO_READ_sim.bin b/tools/scilab/windows/macros/ARDUINO_SERVO_READ_sim.bin Binary files differindex 1d45554..1d45554 100644 --- a/tools/windows/macros/ARDUINO_SERVO_READ_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_SERVO_READ_sim.bin diff --git a/tools/windows/macros/ARDUINO_SERVO_READ_sim.sci b/tools/scilab/windows/macros/ARDUINO_SERVO_READ_sim.sci index 2de0e44..2de0e44 100644 --- a/tools/windows/macros/ARDUINO_SERVO_READ_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_SERVO_READ_sim.sci diff --git a/tools/windows/macros/ARDUINO_SERVO_WRITE.bin b/tools/scilab/windows/macros/ARDUINO_SERVO_WRITE.bin Binary files differindex 73dac6a..73dac6a 100644 --- a/tools/windows/macros/ARDUINO_SERVO_WRITE.bin +++ b/tools/scilab/windows/macros/ARDUINO_SERVO_WRITE.bin diff --git a/tools/windows/macros/ARDUINO_SERVO_WRITE.sci b/tools/scilab/windows/macros/ARDUINO_SERVO_WRITE.sci index 17fb4a7..17fb4a7 100644 --- a/tools/windows/macros/ARDUINO_SERVO_WRITE.sci +++ b/tools/scilab/windows/macros/ARDUINO_SERVO_WRITE.sci diff --git a/tools/windows/macros/ARDUINO_SERVO_WRITE_sim.bin b/tools/scilab/windows/macros/ARDUINO_SERVO_WRITE_sim.bin Binary files differindex 7b27865..7b27865 100644 --- a/tools/windows/macros/ARDUINO_SERVO_WRITE_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_SERVO_WRITE_sim.bin diff --git a/tools/windows/macros/ARDUINO_SERVO_WRITE_sim.sci b/tools/scilab/windows/macros/ARDUINO_SERVO_WRITE_sim.sci index 4c6826d..4c6826d 100644 --- a/tools/windows/macros/ARDUINO_SERVO_WRITE_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_SERVO_WRITE_sim.sci diff --git a/tools/windows/macros/ARDUINO_SETUP.bin b/tools/scilab/windows/macros/ARDUINO_SETUP.bin Binary files differindex 6d60571..6d60571 100644 --- a/tools/windows/macros/ARDUINO_SETUP.bin +++ b/tools/scilab/windows/macros/ARDUINO_SETUP.bin diff --git a/tools/windows/macros/ARDUINO_SETUP.sci b/tools/scilab/windows/macros/ARDUINO_SETUP.sci index 21e2065..21e2065 100644 --- a/tools/windows/macros/ARDUINO_SETUP.sci +++ b/tools/scilab/windows/macros/ARDUINO_SETUP.sci diff --git a/tools/windows/macros/ARDUINO_STEPPER.bin b/tools/scilab/windows/macros/ARDUINO_STEPPER.bin Binary files differindex a431693..a431693 100644 --- a/tools/windows/macros/ARDUINO_STEPPER.bin +++ b/tools/scilab/windows/macros/ARDUINO_STEPPER.bin diff --git a/tools/windows/macros/ARDUINO_STEPPER.sci b/tools/scilab/windows/macros/ARDUINO_STEPPER.sci index 7c96d72..7c96d72 100644 --- a/tools/windows/macros/ARDUINO_STEPPER.sci +++ b/tools/scilab/windows/macros/ARDUINO_STEPPER.sci diff --git a/tools/windows/macros/ARDUINO_STEPPER_sim.bin b/tools/scilab/windows/macros/ARDUINO_STEPPER_sim.bin Binary files differindex bde0077..bde0077 100644 --- a/tools/windows/macros/ARDUINO_STEPPER_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_STEPPER_sim.bin diff --git a/tools/windows/macros/ARDUINO_STEPPER_sim.sci b/tools/scilab/windows/macros/ARDUINO_STEPPER_sim.sci index 58b1dcd..58b1dcd 100644 --- a/tools/windows/macros/ARDUINO_STEPPER_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_STEPPER_sim.sci diff --git a/tools/windows/macros/ARDUINO_WRITE.bin b/tools/scilab/windows/macros/ARDUINO_WRITE.bin Binary files differindex 914dc94..914dc94 100644 --- a/tools/windows/macros/ARDUINO_WRITE.bin +++ b/tools/scilab/windows/macros/ARDUINO_WRITE.bin diff --git a/tools/windows/macros/ARDUINO_WRITE.sci b/tools/scilab/windows/macros/ARDUINO_WRITE.sci index 5d70487..5d70487 100644 --- a/tools/windows/macros/ARDUINO_WRITE.sci +++ b/tools/scilab/windows/macros/ARDUINO_WRITE.sci diff --git a/tools/windows/macros/ARDUINO_WRITE_sim.bin b/tools/scilab/windows/macros/ARDUINO_WRITE_sim.bin Binary files differindex 9959ea7..9959ea7 100644 --- a/tools/windows/macros/ARDUINO_WRITE_sim.bin +++ b/tools/scilab/windows/macros/ARDUINO_WRITE_sim.bin diff --git a/tools/windows/macros/ARDUINO_WRITE_sim.sci b/tools/scilab/windows/macros/ARDUINO_WRITE_sim.sci index e52e445..e52e445 100644 --- a/tools/windows/macros/ARDUINO_WRITE_sim.sci +++ b/tools/scilab/windows/macros/ARDUINO_WRITE_sim.sci diff --git a/tools/windows/macros/ARDUINO_post_simulate.bin b/tools/scilab/windows/macros/ARDUINO_post_simulate.bin Binary files differindex a50c189..a50c189 100644 --- a/tools/windows/macros/ARDUINO_post_simulate.bin +++ b/tools/scilab/windows/macros/ARDUINO_post_simulate.bin diff --git a/tools/windows/macros/ARDUINO_post_simulate.sci b/tools/scilab/windows/macros/ARDUINO_post_simulate.sci index 5e0c6d1..5e0c6d1 100644 --- a/tools/windows/macros/ARDUINO_post_simulate.sci +++ b/tools/scilab/windows/macros/ARDUINO_post_simulate.sci diff --git a/tools/windows/macros/ARDUINO_pre_simulate.bin b/tools/scilab/windows/macros/ARDUINO_pre_simulate.bin Binary files differindex 8ae7d3b..8ae7d3b 100644 --- a/tools/windows/macros/ARDUINO_pre_simulate.bin +++ b/tools/scilab/windows/macros/ARDUINO_pre_simulate.bin diff --git a/tools/windows/macros/ARDUINO_pre_simulate.sci b/tools/scilab/windows/macros/ARDUINO_pre_simulate.sci index 7886a97..7886a97 100644 --- a/tools/windows/macros/ARDUINO_pre_simulate.sci +++ b/tools/scilab/windows/macros/ARDUINO_pre_simulate.sci diff --git a/tools/windows/macros/ArduinoUnoR3.png b/tools/scilab/windows/macros/ArduinoUnoR3.png Binary files differindex 80ca21b..80ca21b 100644 --- a/tools/windows/macros/ArduinoUnoR3.png +++ b/tools/scilab/windows/macros/ArduinoUnoR3.png diff --git a/tools/windows/macros/Arduino_GUI.sce b/tools/scilab/windows/macros/Arduino_GUI.sce index 36a8576..36a8576 100644 --- a/tools/windows/macros/Arduino_GUI.sce +++ b/tools/scilab/windows/macros/Arduino_GUI.sce diff --git a/tools/windows/macros/DCMOTOR_SB.bin b/tools/scilab/windows/macros/DCMOTOR_SB.bin Binary files differindex 02fa14a..02fa14a 100644 --- a/tools/windows/macros/DCMOTOR_SB.bin +++ b/tools/scilab/windows/macros/DCMOTOR_SB.bin diff --git a/tools/windows/macros/DCMOTOR_SB.sci b/tools/scilab/windows/macros/DCMOTOR_SB.sci index f35fe91..f35fe91 100644 --- a/tools/windows/macros/DCMOTOR_SB.sci +++ b/tools/scilab/windows/macros/DCMOTOR_SB.sci diff --git a/tools/windows/macros/DIGITAL_READ_SB.bin b/tools/scilab/windows/macros/DIGITAL_READ_SB.bin Binary files differindex ef8c382..ef8c382 100644 --- a/tools/windows/macros/DIGITAL_READ_SB.bin +++ b/tools/scilab/windows/macros/DIGITAL_READ_SB.bin diff --git a/tools/windows/macros/DIGITAL_READ_SB.sci b/tools/scilab/windows/macros/DIGITAL_READ_SB.sci index c87edbf..c87edbf 100644 --- a/tools/windows/macros/DIGITAL_READ_SB.sci +++ b/tools/scilab/windows/macros/DIGITAL_READ_SB.sci diff --git a/tools/windows/macros/DIGITAL_WRITE_SB.bin b/tools/scilab/windows/macros/DIGITAL_WRITE_SB.bin Binary files differindex cae5a1c..cae5a1c 100644 --- a/tools/windows/macros/DIGITAL_WRITE_SB.bin +++ b/tools/scilab/windows/macros/DIGITAL_WRITE_SB.bin diff --git a/tools/windows/macros/DIGITAL_WRITE_SB.sci b/tools/scilab/windows/macros/DIGITAL_WRITE_SB.sci index df97949..df97949 100644 --- a/tools/windows/macros/DIGITAL_WRITE_SB.sci +++ b/tools/scilab/windows/macros/DIGITAL_WRITE_SB.sci diff --git a/tools/windows/macros/ENCODER_SB.bin b/tools/scilab/windows/macros/ENCODER_SB.bin Binary files differindex ce6e100..ce6e100 100644 --- a/tools/windows/macros/ENCODER_SB.bin +++ b/tools/scilab/windows/macros/ENCODER_SB.bin diff --git a/tools/windows/macros/ENCODER_SB.sci b/tools/scilab/windows/macros/ENCODER_SB.sci index 577bf12..577bf12 100644 --- a/tools/windows/macros/ENCODER_SB.sci +++ b/tools/scilab/windows/macros/ENCODER_SB.sci diff --git a/tools/windows/macros/INTERRUPT_SB.bin b/tools/scilab/windows/macros/INTERRUPT_SB.bin Binary files differindex c7a8343..c7a8343 100644 --- a/tools/windows/macros/INTERRUPT_SB.bin +++ b/tools/scilab/windows/macros/INTERRUPT_SB.bin diff --git a/tools/windows/macros/INTERRUPT_SB.sci b/tools/scilab/windows/macros/INTERRUPT_SB.sci index a4289a6..a4289a6 100644 --- a/tools/windows/macros/INTERRUPT_SB.sci +++ b/tools/scilab/windows/macros/INTERRUPT_SB.sci diff --git a/tools/windows/macros/SERVO_READ_SB.bin b/tools/scilab/windows/macros/SERVO_READ_SB.bin Binary files differindex aaa9ea9..aaa9ea9 100644 --- a/tools/windows/macros/SERVO_READ_SB.bin +++ b/tools/scilab/windows/macros/SERVO_READ_SB.bin diff --git a/tools/windows/macros/SERVO_READ_SB.sci b/tools/scilab/windows/macros/SERVO_READ_SB.sci index 85ab3db..85ab3db 100644 --- a/tools/windows/macros/SERVO_READ_SB.sci +++ b/tools/scilab/windows/macros/SERVO_READ_SB.sci diff --git a/tools/windows/macros/SERVO_WRITE_SB.bin b/tools/scilab/windows/macros/SERVO_WRITE_SB.bin Binary files differindex 28cc062..28cc062 100644 --- a/tools/windows/macros/SERVO_WRITE_SB.bin +++ b/tools/scilab/windows/macros/SERVO_WRITE_SB.bin diff --git a/tools/windows/macros/SERVO_WRITE_SB.sci b/tools/scilab/windows/macros/SERVO_WRITE_SB.sci index 82f346e..82f346e 100644 --- a/tools/windows/macros/SERVO_WRITE_SB.sci +++ b/tools/scilab/windows/macros/SERVO_WRITE_SB.sci diff --git a/tools/windows/macros/STEPPER_SB.bin b/tools/scilab/windows/macros/STEPPER_SB.bin Binary files differindex 9c5f1d7..9c5f1d7 100644 --- a/tools/windows/macros/STEPPER_SB.bin +++ b/tools/scilab/windows/macros/STEPPER_SB.bin diff --git a/tools/windows/macros/STEPPER_SB.sci b/tools/scilab/windows/macros/STEPPER_SB.sci index 3a8dded..3a8dded 100644 --- a/tools/windows/macros/STEPPER_SB.sci +++ b/tools/scilab/windows/macros/STEPPER_SB.sci diff --git a/tools/windows/macros/TIME_SAMPLE.bin b/tools/scilab/windows/macros/TIME_SAMPLE.bin Binary files differindex e00e18d..e00e18d 100644 --- a/tools/windows/macros/TIME_SAMPLE.bin +++ b/tools/scilab/windows/macros/TIME_SAMPLE.bin diff --git a/tools/windows/macros/TIME_SAMPLE.sci b/tools/scilab/windows/macros/TIME_SAMPLE.sci index b9d1729..b9d1729 100644 --- a/tools/windows/macros/TIME_SAMPLE.sci +++ b/tools/scilab/windows/macros/TIME_SAMPLE.sci diff --git a/tools/windows/macros/buildmacros.sce b/tools/scilab/windows/macros/buildmacros.sce index a129dc7..a129dc7 100644 --- a/tools/windows/macros/buildmacros.sce +++ b/tools/scilab/windows/macros/buildmacros.sce diff --git a/tools/windows/macros/close_serial.bin b/tools/scilab/windows/macros/close_serial.bin Binary files differindex fee303d..fee303d 100644 --- a/tools/windows/macros/close_serial.bin +++ b/tools/scilab/windows/macros/close_serial.bin diff --git a/tools/windows/macros/close_serial.sci b/tools/scilab/windows/macros/close_serial.sci index 9c5b85f..9c5b85f 100644 --- a/tools/windows/macros/close_serial.sci +++ b/tools/scilab/windows/macros/close_serial.sci diff --git a/tools/windows/macros/cmd_analog_in.bin b/tools/scilab/windows/macros/cmd_analog_in.bin Binary files differindex d2b0771..d2b0771 100644 --- a/tools/windows/macros/cmd_analog_in.bin +++ b/tools/scilab/windows/macros/cmd_analog_in.bin diff --git a/tools/windows/macros/cmd_analog_in.sci b/tools/scilab/windows/macros/cmd_analog_in.sci index 9c40d7b..9c40d7b 100644 --- a/tools/windows/macros/cmd_analog_in.sci +++ b/tools/scilab/windows/macros/cmd_analog_in.sci diff --git a/tools/windows/macros/cmd_analog_in_volt.bin b/tools/scilab/windows/macros/cmd_analog_in_volt.bin Binary files differindex d888dbe..d888dbe 100644 --- a/tools/windows/macros/cmd_analog_in_volt.bin +++ b/tools/scilab/windows/macros/cmd_analog_in_volt.bin diff --git a/tools/windows/macros/cmd_analog_in_volt.sci b/tools/scilab/windows/macros/cmd_analog_in_volt.sci index 8c83254..8c83254 100644 --- a/tools/windows/macros/cmd_analog_in_volt.sci +++ b/tools/scilab/windows/macros/cmd_analog_in_volt.sci diff --git a/tools/windows/macros/cmd_analog_out.bin b/tools/scilab/windows/macros/cmd_analog_out.bin Binary files differindex 4229203..4229203 100644 --- a/tools/windows/macros/cmd_analog_out.bin +++ b/tools/scilab/windows/macros/cmd_analog_out.bin diff --git a/tools/windows/macros/cmd_analog_out.sci b/tools/scilab/windows/macros/cmd_analog_out.sci index a667cd8..a667cd8 100644 --- a/tools/windows/macros/cmd_analog_out.sci +++ b/tools/scilab/windows/macros/cmd_analog_out.sci diff --git a/tools/windows/macros/cmd_analog_out_volt.bin b/tools/scilab/windows/macros/cmd_analog_out_volt.bin Binary files differindex 9e37f87..9e37f87 100644 --- a/tools/windows/macros/cmd_analog_out_volt.bin +++ b/tools/scilab/windows/macros/cmd_analog_out_volt.bin diff --git a/tools/windows/macros/cmd_analog_out_volt.sci b/tools/scilab/windows/macros/cmd_analog_out_volt.sci index 60e9b6d..60e9b6d 100644 --- a/tools/windows/macros/cmd_analog_out_volt.sci +++ b/tools/scilab/windows/macros/cmd_analog_out_volt.sci diff --git a/tools/windows/macros/cmd_arduino_a_control.bin b/tools/scilab/windows/macros/cmd_arduino_a_control.bin Binary files differindex 7cc424a..7cc424a 100644 --- a/tools/windows/macros/cmd_arduino_a_control.bin +++ b/tools/scilab/windows/macros/cmd_arduino_a_control.bin diff --git a/tools/windows/macros/cmd_arduino_a_control.sci b/tools/scilab/windows/macros/cmd_arduino_a_control.sci index 9ff1492..9ff1492 100644 --- a/tools/windows/macros/cmd_arduino_a_control.sci +++ b/tools/scilab/windows/macros/cmd_arduino_a_control.sci diff --git a/tools/windows/macros/cmd_arduino_d_control.bin b/tools/scilab/windows/macros/cmd_arduino_d_control.bin Binary files differindex e4b6789..e4b6789 100644 --- a/tools/windows/macros/cmd_arduino_d_control.bin +++ b/tools/scilab/windows/macros/cmd_arduino_d_control.bin diff --git a/tools/windows/macros/cmd_arduino_d_control.sci b/tools/scilab/windows/macros/cmd_arduino_d_control.sci index 576b2a8..576b2a8 100644 --- a/tools/windows/macros/cmd_arduino_d_control.sci +++ b/tools/scilab/windows/macros/cmd_arduino_d_control.sci diff --git a/tools/windows/macros/cmd_arduino_meter.bin b/tools/scilab/windows/macros/cmd_arduino_meter.bin Binary files differindex cdc406e..cdc406e 100644 --- a/tools/windows/macros/cmd_arduino_meter.bin +++ b/tools/scilab/windows/macros/cmd_arduino_meter.bin diff --git a/tools/windows/macros/cmd_arduino_meter.sci b/tools/scilab/windows/macros/cmd_arduino_meter.sci index 52d9de8..52d9de8 100644 --- a/tools/windows/macros/cmd_arduino_meter.sci +++ b/tools/scilab/windows/macros/cmd_arduino_meter.sci diff --git a/tools/windows/macros/cmd_dcmotor_release.bin b/tools/scilab/windows/macros/cmd_dcmotor_release.bin Binary files differindex 8ca7ca5..8ca7ca5 100644 --- a/tools/windows/macros/cmd_dcmotor_release.bin +++ b/tools/scilab/windows/macros/cmd_dcmotor_release.bin diff --git a/tools/windows/macros/cmd_dcmotor_release.sci b/tools/scilab/windows/macros/cmd_dcmotor_release.sci index daf694d..daf694d 100644 --- a/tools/windows/macros/cmd_dcmotor_release.sci +++ b/tools/scilab/windows/macros/cmd_dcmotor_release.sci diff --git a/tools/windows/macros/cmd_dcmotor_run.bin b/tools/scilab/windows/macros/cmd_dcmotor_run.bin Binary files differindex 205c06e..205c06e 100644 --- a/tools/windows/macros/cmd_dcmotor_run.bin +++ b/tools/scilab/windows/macros/cmd_dcmotor_run.bin diff --git a/tools/windows/macros/cmd_dcmotor_run.sci b/tools/scilab/windows/macros/cmd_dcmotor_run.sci index f564c84..f564c84 100644 --- a/tools/windows/macros/cmd_dcmotor_run.sci +++ b/tools/scilab/windows/macros/cmd_dcmotor_run.sci diff --git a/tools/windows/macros/cmd_dcmotor_setup.bin b/tools/scilab/windows/macros/cmd_dcmotor_setup.bin Binary files differindex 30c501a..30c501a 100644 --- a/tools/windows/macros/cmd_dcmotor_setup.bin +++ b/tools/scilab/windows/macros/cmd_dcmotor_setup.bin diff --git a/tools/windows/macros/cmd_dcmotor_setup.sci b/tools/scilab/windows/macros/cmd_dcmotor_setup.sci index 2808bc4..2808bc4 100644 --- a/tools/windows/macros/cmd_dcmotor_setup.sci +++ b/tools/scilab/windows/macros/cmd_dcmotor_setup.sci diff --git a/tools/windows/macros/cmd_digital_in.bin b/tools/scilab/windows/macros/cmd_digital_in.bin Binary files differindex f28d66e..f28d66e 100644 --- a/tools/windows/macros/cmd_digital_in.bin +++ b/tools/scilab/windows/macros/cmd_digital_in.bin diff --git a/tools/windows/macros/cmd_digital_in.sci b/tools/scilab/windows/macros/cmd_digital_in.sci index f3cdba7..f3cdba7 100644 --- a/tools/windows/macros/cmd_digital_in.sci +++ b/tools/scilab/windows/macros/cmd_digital_in.sci diff --git a/tools/windows/macros/cmd_digital_out.bin b/tools/scilab/windows/macros/cmd_digital_out.bin Binary files differindex 38359b4..38359b4 100644 --- a/tools/windows/macros/cmd_digital_out.bin +++ b/tools/scilab/windows/macros/cmd_digital_out.bin diff --git a/tools/windows/macros/cmd_digital_out.sci b/tools/scilab/windows/macros/cmd_digital_out.sci index e91cf52..e91cf52 100644 --- a/tools/windows/macros/cmd_digital_out.sci +++ b/tools/scilab/windows/macros/cmd_digital_out.sci diff --git a/tools/windows/macros/cmd_encoder_init.bin b/tools/scilab/windows/macros/cmd_encoder_init.bin Binary files differindex a7f0722..a7f0722 100644 --- a/tools/windows/macros/cmd_encoder_init.bin +++ b/tools/scilab/windows/macros/cmd_encoder_init.bin diff --git a/tools/windows/macros/cmd_encoder_init.sci b/tools/scilab/windows/macros/cmd_encoder_init.sci index 13b5ccc..13b5ccc 100644 --- a/tools/windows/macros/cmd_encoder_init.sci +++ b/tools/scilab/windows/macros/cmd_encoder_init.sci diff --git a/tools/windows/macros/cmd_servo_attach.bin b/tools/scilab/windows/macros/cmd_servo_attach.bin Binary files differindex b946f92..b946f92 100644 --- a/tools/windows/macros/cmd_servo_attach.bin +++ b/tools/scilab/windows/macros/cmd_servo_attach.bin diff --git a/tools/windows/macros/cmd_servo_attach.sci b/tools/scilab/windows/macros/cmd_servo_attach.sci index d6e3fcd..d6e3fcd 100644 --- a/tools/windows/macros/cmd_servo_attach.sci +++ b/tools/scilab/windows/macros/cmd_servo_attach.sci diff --git a/tools/windows/macros/cmd_servo_detach.bin b/tools/scilab/windows/macros/cmd_servo_detach.bin Binary files differindex 29b08af..29b08af 100644 --- a/tools/windows/macros/cmd_servo_detach.bin +++ b/tools/scilab/windows/macros/cmd_servo_detach.bin diff --git a/tools/windows/macros/cmd_servo_detach.sci b/tools/scilab/windows/macros/cmd_servo_detach.sci index f6ac511..f6ac511 100644 --- a/tools/windows/macros/cmd_servo_detach.sci +++ b/tools/scilab/windows/macros/cmd_servo_detach.sci diff --git a/tools/windows/macros/cmd_servo_move.bin b/tools/scilab/windows/macros/cmd_servo_move.bin Binary files differindex 357a788..357a788 100644 --- a/tools/windows/macros/cmd_servo_move.bin +++ b/tools/scilab/windows/macros/cmd_servo_move.bin diff --git a/tools/windows/macros/cmd_servo_move.sci b/tools/scilab/windows/macros/cmd_servo_move.sci index 83309e1..83309e1 100644 --- a/tools/windows/macros/cmd_servo_move.sci +++ b/tools/scilab/windows/macros/cmd_servo_move.sci diff --git a/tools/windows/macros/genhelpscript.sce b/tools/scilab/windows/macros/genhelpscript.sce index 1220178..1220178 100644 --- a/tools/windows/macros/genhelpscript.sce +++ b/tools/scilab/windows/macros/genhelpscript.sce diff --git a/tools/windows/macros/getArduinoVersion.bin b/tools/scilab/windows/macros/getArduinoVersion.bin Binary files differindex c64a686..c64a686 100644 --- a/tools/windows/macros/getArduinoVersion.bin +++ b/tools/scilab/windows/macros/getArduinoVersion.bin diff --git a/tools/windows/macros/getArduinoVersion.sci b/tools/scilab/windows/macros/getArduinoVersion.sci index f655812..f655812 100644 --- a/tools/windows/macros/getArduinoVersion.sci +++ b/tools/scilab/windows/macros/getArduinoVersion.sci diff --git a/tools/windows/macros/init_arduino.bin b/tools/scilab/windows/macros/init_arduino.bin Binary files differindex c6effb6..c6effb6 100644 --- a/tools/windows/macros/init_arduino.bin +++ b/tools/scilab/windows/macros/init_arduino.bin diff --git a/tools/windows/macros/init_arduino.sci b/tools/scilab/windows/macros/init_arduino.sci index 634ece8..634ece8 100644 --- a/tools/windows/macros/init_arduino.sci +++ b/tools/scilab/windows/macros/init_arduino.sci diff --git a/tools/windows/macros/lib b/tools/scilab/windows/macros/lib Binary files differindex 6471df1..6471df1 100644 --- a/tools/windows/macros/lib +++ b/tools/scilab/windows/macros/lib diff --git a/tools/windows/macros/names b/tools/scilab/windows/macros/names index 0890d56..0890d56 100644 --- a/tools/windows/macros/names +++ b/tools/scilab/windows/macros/names diff --git a/tools/windows/macros/nicescope.bin b/tools/scilab/windows/macros/nicescope.bin Binary files differindex 9436f73..9436f73 100644 --- a/tools/windows/macros/nicescope.bin +++ b/tools/scilab/windows/macros/nicescope.bin diff --git a/tools/windows/macros/nicescope.sci b/tools/scilab/windows/macros/nicescope.sci index 0e1c5c0..0e1c5c0 100644 --- a/tools/windows/macros/nicescope.sci +++ b/tools/scilab/windows/macros/nicescope.sci diff --git a/tools/windows/macros/open_serial.bin b/tools/scilab/windows/macros/open_serial.bin Binary files differindex 05c1c6d..05c1c6d 100644 --- a/tools/windows/macros/open_serial.bin +++ b/tools/scilab/windows/macros/open_serial.bin diff --git a/tools/windows/macros/open_serial.sci b/tools/scilab/windows/macros/open_serial.sci index 980e852..980e852 100644 --- a/tools/windows/macros/open_serial.sci +++ b/tools/scilab/windows/macros/open_serial.sci diff --git a/tools/windows/macros/post_xcos_simulate.bin b/tools/scilab/windows/macros/post_xcos_simulate.bin Binary files differindex 6b7e413..6b7e413 100644 --- a/tools/windows/macros/post_xcos_simulate.bin +++ b/tools/scilab/windows/macros/post_xcos_simulate.bin diff --git a/tools/windows/macros/post_xcos_simulate.sci b/tools/scilab/windows/macros/post_xcos_simulate.sci index c298070..c298070 100644 --- a/tools/windows/macros/post_xcos_simulate.sci +++ b/tools/scilab/windows/macros/post_xcos_simulate.sci diff --git a/tools/windows/macros/pre_xcos_simulate.bin b/tools/scilab/windows/macros/pre_xcos_simulate.bin Binary files differindex 65170ad..65170ad 100644 --- a/tools/windows/macros/pre_xcos_simulate.bin +++ b/tools/scilab/windows/macros/pre_xcos_simulate.bin diff --git a/tools/windows/macros/pre_xcos_simulate.sci b/tools/scilab/windows/macros/pre_xcos_simulate.sci index 2066086..2066086 100644 --- a/tools/windows/macros/pre_xcos_simulate.sci +++ b/tools/scilab/windows/macros/pre_xcos_simulate.sci diff --git a/tools/windows/macros/read_serial.bin b/tools/scilab/windows/macros/read_serial.bin Binary files differindex aeacf76..aeacf76 100644 --- a/tools/windows/macros/read_serial.bin +++ b/tools/scilab/windows/macros/read_serial.bin diff --git a/tools/windows/macros/read_serial.sci b/tools/scilab/windows/macros/read_serial.sci index c095320..c095320 100644 --- a/tools/windows/macros/read_serial.sci +++ b/tools/scilab/windows/macros/read_serial.sci diff --git a/tools/windows/macros/status_serial.bin b/tools/scilab/windows/macros/status_serial.bin Binary files differindex adc7737..adc7737 100644 --- a/tools/windows/macros/status_serial.bin +++ b/tools/scilab/windows/macros/status_serial.bin diff --git a/tools/windows/macros/status_serial.sci b/tools/scilab/windows/macros/status_serial.sci index ebeeafb..ebeeafb 100644 --- a/tools/windows/macros/status_serial.sci +++ b/tools/scilab/windows/macros/status_serial.sci diff --git a/tools/windows/macros/tkscaleblk.bin b/tools/scilab/windows/macros/tkscaleblk.bin Binary files differindex a30843b..a30843b 100644 --- a/tools/windows/macros/tkscaleblk.bin +++ b/tools/scilab/windows/macros/tkscaleblk.bin diff --git a/tools/windows/macros/tkscaleblk.sci b/tools/scilab/windows/macros/tkscaleblk.sci index f1a480c..f1a480c 100644 --- a/tools/windows/macros/tkscaleblk.sci +++ b/tools/scilab/windows/macros/tkscaleblk.sci diff --git a/tools/windows/macros/write_serial.bin b/tools/scilab/windows/macros/write_serial.bin Binary files differindex 7f6f083..7f6f083 100644 --- a/tools/windows/macros/write_serial.bin +++ b/tools/scilab/windows/macros/write_serial.bin diff --git a/tools/windows/macros/write_serial.sci b/tools/scilab/windows/macros/write_serial.sci index bebc6b9..bebc6b9 100644 --- a/tools/windows/macros/write_serial.sci +++ b/tools/scilab/windows/macros/write_serial.sci diff --git a/tools/windows/src/libserial.dll b/tools/scilab/windows/src/libserial.dll Binary files differindex 516ac3b..516ac3b 100644 --- a/tools/windows/src/libserial.dll +++ b/tools/scilab/windows/src/libserial.dll diff --git a/tools/windows/src/libserial64.dll b/tools/scilab/windows/src/libserial64.dll Binary files differindex dc9dd3a..dc9dd3a 100644 --- a/tools/windows/src/libserial64.dll +++ b/tools/scilab/windows/src/libserial64.dll diff --git a/tools/windows/src/loader.sce b/tools/scilab/windows/src/loader.sce index b247189..b247189 100644 --- a/tools/windows/src/loader.sce +++ b/tools/scilab/windows/src/loader.sce diff --git a/tools/windows/src/main.c b/tools/scilab/windows/src/main.c index d4877eb..d4877eb 100644 --- a/tools/windows/src/main.c +++ b/tools/scilab/windows/src/main.c diff --git a/tools/windows/src/make.txt b/tools/scilab/windows/src/make.txt index e64e023..e64e023 100644 --- a/tools/windows/src/make.txt +++ b/tools/scilab/windows/src/make.txt diff --git a/tools/windows/unloader.sce b/tools/scilab/windows/unloader.sce index 2e1dd1c..2e1dd1c 100644 --- a/tools/windows/unloader.sce +++ b/tools/scilab/windows/unloader.sce diff --git a/user-code/dcmotor/julia/ArduinoTools.jl b/user-code/dcmotor/julia/ArduinoTools.jl new file mode 100644 index 0000000..7137294 --- /dev/null +++ b/user-code/dcmotor/julia/ArduinoTools.jl @@ -0,0 +1,189 @@ +module ArduinoTools + +using SerialPorts + + +function connectBoard(baudrate::Int64) # Automatically detects SerialPort and opens it + arr = list_serialports() # with given baudrate + port = arr[1] + ser = SerialPort(port,baudrate) # Caution: works in most cases... If doesn't, + sleep(2) # Use the openSerial() function + return ser +end + +# function openSerial(port::ASCIIString, baudrate::Int64) # starts serial communication +# ser = SerialPorts.SerialPort(port,baudrate) +# sleep(2) +# return ser +# end + +function closeSerial(ser::SerialPorts.SerialPort) # closes serial port + SerialPorts.close(ser) +end + +# function Write(ser::SerialPorts.SerialPort, str::ASCIIString) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +# function Write(ser::SerialPorts.SerialPort, str::UTF8String) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +function Read(ser::SerialPorts.SerialPort, bytes::Int64) # reads 'bytes' number of bytes from serial port + SerialPorts.read(ser,bytes) +end + +function ReadAvailable(ser::SerialPorts.SerialPort) # reads all available bytes from serial port + SerialPorts.readavailable(ser) +end + +function nbAvailable(ser::SerialPorts.SerialPort) # returns number of bytes available for reading + SerialPorts.nb_available(ser) +end + +function listSerialPorts() # returns array of serial port names on computer + SerialPorts.list_serialports() +end + +function pinMode(file_des::SerialPorts.SerialPort , pin_no::Int64 , mode::String) + # isascii(mode) && throw("Mode needs to be ascii") #This will throw an error if mode is not ascii + # m = uppercase(mode) # Prevent errors due to case differences + if mode == "INPUT" str = "Da"*string(Char(48+pin_no))*"0" end # Dan0 for INPUT + if mode == "OUTPUT" str = "Da"*string(Char(48+pin_no))*"1" end # Dan1 for OUTPUT + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 0 str = "Dw"*string(Char(48+pin_no))*"1" end # Dwn1 for HIGH + if val == 0 str = "Dw"*string(Char(48+pin_no))*"0" end # Dwn0 for LOW + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "Dr"*string(Char(48+pin_no)) # Drn to read digital pin n + str = ascii(str) # Convert UTF8String to ASCIIString + write(file_des,str) + sleep(0.01) # Delay the next step by 10 milliseconds + c = read(file_des,1) # Read one byte from SerialPort + n = parse(Int,c) # Convert the received string into integer + return n # Return the integer +end + +function analogWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 255 val = 255 end # Make sure val isn't beyond limits + if val < 0 val = 0 end + c = Char(val) # Conversion of val into character + d = string(c) # Converting character to string + s = "W"*string(Char(48+pin_no))*d # Wnm for analog value m on pin n + write(file_des,s) +end + +function analogRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "A"*string(Char(48+pin_no)) #"An" for analog value on pin n + write(file_des,str) + sleep(0.1) # Delay next step by 100 milliseconds + n = bytesavailable(file_des) # Get number of bytes in input buffer + s = read(file_des, n) # Read n bytes from SerialPort + iolit = IOBuffer(s) + num = read(iolit, Int16) + # num = reinterpret(Int16, s) + # println(sizeof(num)) + # println(num[1]) + # @printf("value = %d", Int(num)) + # close(iolit) + + # typeof(s) + # k = parse(Int,s) # Convert String to integer + return num # Return the integer +end + +function DCMotorSetup(file_des::SerialPorts.SerialPort, driver_type::Int64, motor_no::Int64, pin1::Int64, pin2::Int64) + println("Initializing motor") + if (driver_type == 1) # adafruit + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 2) # L298 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 3) # L293 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"0" + end + write(file_des,code_sent) + sleep(0.1) # sleep for a tenth of a second + s = readavailable(file_des) # read all available bytes from input buffer + if s == "OK" + println("Motor Setup Successful") + else + println("Motor Setup unsuccessful") + end +end # end function + +function DCMotorRun(file_des::SerialPorts.SerialPort, motor_no::Int64, speed::Int64) + sgn = sign(speed) # Checking sign of speed to set direction + if sgn >= 0 + direction = "1" + else + direction = "0" + end + speed = abs(speed) # Dropping the sign + if speed > 255 speed = 255 end # Make sure speed is not beyond limit + code_sent = "M"*string(motor_no)*direction*string(Char(speed)) + write(file_des,code_sent) +end # end function + +function DCMotorRelease(file_des::SerialPorts.SerialPort, motor_no::Int64) + code_sent = "M"*string(motor_no)*"1"*string(Char(0)) + write(file_des,code_sent) # Stops the motor first + sleep(0.1) # Delay of 0.1 second + code_sent = "M"*string(motor_no)*"r" + write(file_des,code_sent) # Releases the motor +end + +function ServoAttach(file_des::SerialPorts.SerialPort, servo_no::Int64) + println("Initializing servo") + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function ServoMove(file_des::SerialPorts.SerialPort, servo_no::Int64, val::Int64) + if val < 0 val = 0 end + if val >180 val = 180 end + pin = "Sw"*string(servo_no)*string(Char(val)) + write(file_des,pin) +end + +function ServoDetach(file_des::SerialPorts.SerialPort, servo_no::Int64) + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function MPUReadin(file_des::SerialPorts.SerialPort) + cmd = "F" + write(file_des,cmd) + analog_times = [] + sleep(0.03) + s = readavailable(file_des) + sarr = split(s,"/") + for i in 1:length(sarr) + push!(analog_times,parse(Int,sarr[i])) + end + return analog_times +end + +export connectBoard,openSerial,closeSerial,Write,Read,ReadAvailable,nbAvailable,listSerialPorts,pinMode,digiWrite,digiRead,analogWrite,analogRead,DCMotorSetup,DCMotorRun,DCMotorRelease,ServoAttach,ServoMove,ServoDetach,MPUReadin + +end # module diff --git a/user-code/dcmotor/julia/dcmotor-both.jl b/user-code/dcmotor/julia/dcmotor-both.jl index a1b65e2..98bb633 100644 --- a/user-code/dcmotor/julia/dcmotor-both.jl +++ b/user-code/dcmotor/julia/dcmotor-both.jl @@ -1,11 +1,11 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -DCMotorSetup(ser,3,1,9,10) -DCMotorRun(ser,1,100) +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.DCMotorSetup(ser,3,1,9,10) +ArduinoTools.DCMotorRun(ser,1,100) sleep(3) -DCMotorRun(ser,1,-100) +ArduinoTools.DCMotorRun(ser,1,-100) sleep(3) -DCMotorRelease(ser,1) +ArduinoTools.DCMotorRelease(ser,1) close(ser) diff --git a/user-code/dcmotor/julia/dcmotor-clock.jl b/user-code/dcmotor/julia/dcmotor-clock.jl index df185d6..464fb5b 100644 --- a/user-code/dcmotor/julia/dcmotor-clock.jl +++ b/user-code/dcmotor/julia/dcmotor-clock.jl @@ -1,9 +1,9 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -DCMotorSetup(ser,3,1,9,10) -DCMotorRun(ser,1,100) +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.DCMotorSetup(ser,3,1,9,10) +ArduinoTools.DCMotorRun(ser,1,100) sleep(3) -DCMotorRelease(ser,1) +ArduinoTools.DCMotorRelease(ser,1) close(ser) diff --git a/user-code/dcmotor/julia/dcmotor-loop.jl b/user-code/dcmotor/julia/dcmotor-loop.jl index 1d09943..decbf5c 100644 --- a/user-code/dcmotor/julia/dcmotor-loop.jl +++ b/user-code/dcmotor/julia/dcmotor-loop.jl @@ -1,15 +1,15 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -DCMotorSetup(ser,3,1,9,10) +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.DCMotorSetup(ser,3,1,9,10) for i = 1:4 - DCMotorRun(ser,1,100) + ArduinoTools.DCMotorRun(ser,1,100) sleep(3) - DCMotorRun(ser,1,0) + ArduinoTools.DCMotorRun(ser,1,0) sleep(2) - DCMotorRun(ser,1,-100) + ArduinoTools.DCMotorRun(ser,1,-100) sleep(2) end -DCMotorRelease(ser,1) +ArduinoTools.DCMotorRelease(ser,1) close(ser) diff --git a/user-code/dcmotor/python/Arduino/Arduino.py b/user-code/dcmotor/python/Arduino/Arduino.py new file mode 100644 index 0000000..b28f43c --- /dev/null +++ b/user-code/dcmotor/python/Arduino/Arduino.py @@ -0,0 +1,327 @@ + +import sys +import serial +from serial import Serial +from serial.tools.list_ports import comports +from time import sleep + +p1=0 #Initial Position of servo motor +p2=0 #Final Position of servo motor + +a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] +class Initialization: + def __init__(self): + pass + + def locateport(self): + if sys.platform.startswith('win'): + port ='' + ports = list(comports()) + for i in ports: + for j in i: + if 'Arduino' in j: + port = i[0] + elif sys.platform.startswith('linux'): + b=[] + port ='' + ports = list(comports()) + for i in range(len(ports)): + for x in range(7): + portname="/dev/ttyACM"+str(x) + if ports[i][0]==portname: + b.append(ports[i][0]) + port=b[0] + return port + + def open_serial(self,ard_no, PortNo,baudrate): + #global ser + if PortNo =='': + sys.exit("aa..error..! arduino not found") + else: + self.ser = Serial(PortNo,baudrate) + sleep(2) + self.checkfirmware() + + def close_serial(self): + #global ser + self.ser.close() + + def checkfirmware(self): + print ("Check Firm Ware") + #global ser + self.ser.write(bytes([118])) #chr(118) + try: + x=self.ser.read() + #print(x) + #x=self.ser.read() + #print(x) + if x==b'o': + try: + x=self.ser.read() + except: + sys.exit("aa..! error..! it seems correct firmware not loaded") + else: + sys.exit("aa..! error..! it seems correct firmware not loaded") + except: + sys.exit("aa..! error..! it seems correct firmware not loaded") + + +class Arduino(Initialization): + def __init__(self): + print ("Init Arduino") + #self.baudrate=0 + #self.ard_no=1 + #self.PortNo=0 + #self.pin=0 + #self.val=0 + #self.mode=0 + #self.mno=0 + #self.pin1=0 + #self.pin2=0 + #self.servo=0 + + + + def cmd_digital_out(self,ard_no,pin,val): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="D"+"a"+a[pin]+"1" + self.ser.write(cmd.encode('utf-8')) + cmd="" + cmd="D"+"w"+a[pin]+str(val) + self.ser.write(cmd.encode('utf-8')) + + def cmd_digital_in(self,ard_no,pin): + b=[] + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="D"+"a"+a[pin]+"0" + self.ser.write(cmd.encode('utf-8')) + cmd="" + cmd="D"+"r"+a[pin] + self.ser.write(cmd.encode('utf-8')) + a=self.ser.read() + return(a.decode('UTF-8')) + + def cmd_analog_in(self,ard_no,pin): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="A"+a[pin] + self.ser.write(cmd.encode('utf-8')) + analog_times=[] + b1=ord(self.ser.read(1)) + b2=ord(self.ser.read(1)) + a=b1+b2*256 + #a=ser.read() + return(a) + #return(int((1023-0)*int(ord(a))/(255-0))) + + + def cmd_analog_out(self,ard_no, pin, val): + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd = "W" + a[pin] + chr(val) + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_setup(self,ard_no,mode,mno,pin1,pin2): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="C"+a[mno]+a[pin1]+a[pin2]+a[mode] + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_run(self,ard_no,mno,val): + cmd="" + if(val <0): + dirc=0 + else: + dirc=1 + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="M"+a[mno]+a[dirc]+chr(abs(val)) + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_release(self,ard_no,mno): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="M"+a[mno]+"r" + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_attach(self,ard_no,servo): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"a"+a[servo] + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_detach(self,ard_no,servo): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"d"+a[servo] + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_move(self,ard_no,servo,angle): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"w"+a[servo]+chr(angle) + self.ser.write(cmd.encode('utf-8')) + + + + +#For PISO shift register + def cmd_shift_in(self,dataPin,clockPin,ledPin,clockLed): + value=[0 for _ in range(0,8)] + #print value + value2=[value for _ in range(0,8)] + #print value2 + for i in range(0,8): + so= self.cmd_digital_in(1,dataPin) #Reads serial out of IC + print (so) + if so=='1': + self.cmd_digital_out(1,ledPin,1) + sleep(0.1) + else: + self.cmd_digital_out(1,ledPin,0) + sleep(0.1) + value2[i][i]=int(so) + #performs value=value|value2[i] + for j in range(0,8): + if value[j]==1 or value2[i][j]==1: + value[j]=1 + else: + value[j]=0 + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockLed,1) + sleep(0.5) + self.cmd_digital_out(1,clockPin,0) + self.cmd_digital_out(1,clockLed,0) #clockLED: Led indicating clock pulses + sleep(0.4) + #after every clock pulse, 1 right shift occurs for every bit + #thus after 8 clock pulses, the entire parallel input is shifted out, + #and obtained at the dataPin, one bit per clock pulse + #Thus we get the bit by bit serial output of the Parallel Load + print (value) + + + + +#For PISO shift register +#shift in for n bits + def cmd_shift_in_n(self,dataPin,clockPin,ledPin,clockLed,numBits): + n=numBits #no. of bits + value=[0 for _ in range(0,n)] #a list of n elements, all 0s, to store the n bits of the inputs together + value2=[value for _ in range(0,n)] #a list of lists, analogous to nxn array of all 0s + for i in range(0,n): #n iterations since n bit input is given + so=self.cmd_digital_in(1,dataPin) + if so=='1': + self.cmd_digital_out(1,ledPin,1) + sleep(0.1) + else: + self.cmd_digital_out(1,ledPin,0) + sleep(0.1) + value2[i][i]=int(so) + #performs value=value|value2[i] + for j in range(0,n): + if value[j]==1 or value2[i][j]==1: + value[j]=1 + else: + value[j]=0 + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockLed,1) + sleep(0.5) + self.cmd_digital_out(1,clockPin,0) + self.cmd_digital_out(1,clockLed,0) #clockLED: Led indicating clock pulses + sleep(0.4) + print (value) + + + + + +#For SIPO shift register + def cmd_shift_out(self,dataPin,clockPin,bitOrder,val): + val2=0 + mat=[] + if bitOrder=='MSBFIRST': + #to create identity matrix + for i in range(0,8): + matsub=[0 for _ in range(0,8)] + matsub[i]=1 + mat.append(matsub) + else: + #to create horizontally flipped identity matrix + for i in range(0,8): + matsub=[0 for _ in range(0,8)] + matsub[7-i]=1 + mat.append(matsub) + for i in range(0,8): + #performs & operation on corresponding elements of list + for x,y in zip(val,mat[i]): + if x==1 and y==1: + val2=1 + break + else: + val2=0 + self.cmd_digital_out(1,dataPin,val2) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + + + +#For SIPO shift register + def cmd_shift_out_(self,dataPin,clockPin,inPin): + print ("Give serial input: ") + sleep(0.25) + self.cmd_digital_out(1,dataPin,self.cmd_digital_in(1,inPin)) #if inPin is HIGH, + #i.e. if input is given, write HIGH on Serial In Pin of IC + print("Serial input stored: ") + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) #One clock pulse + sleep(0.15) + + + + + +#For SIPO shift register +#shift out for n bits + def cmd_shift_out_n(self,dataPin,clockPin,bitOrder,val,numBits): + n=int(numBits) #number of bits + if (n%8)==0: + p=n + else: + p=(8*(n/8))+8 + val1=[0 for _ in range(0,n)] #output matrix. + #If all elements of the matrix are 0, + #output pinstate will be 0 (i.e LOW). + #If 1 or more elements of the matrix is 1, + #output pinstate will be 1 (i.e HIGH) + val2=0 + mat=[] + if bitOrder=='MSBFIRST': + for i in range(0,n): + matsub=[0 for _ in range(0,n)] + matsub[i]=1 + mat.append(matsub) + else: + for i in range(0,n): + matsub=[0 for _ in range(0,n)] + matsub[(n-1)-i]=1 + mat.append(matsub) + for j in range(0,(p-n)): #do nothing for the first (p-n) clock pulses + self.cmd_digital_out(1,dataPin,0) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + for i in range(0,n): #shift for last n clock pulses + #to perform val & mat[i] + for x,y in zip(val,mat[i]): + if x==1 and y==1: + val2=1 + break + else: + val2=0 + print (val2,) + self.cmd_digital_out(1,dataPin,val2) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + + + + diff --git a/user-code/dcmotor/python/Arduino/__init__.py b/user-code/dcmotor/python/Arduino/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/user-code/dcmotor/python/Arduino/__init__.py diff --git a/user-code/dcmotor/python/Arduino/__pycache__/Arduino.cpython-38.pyc b/user-code/dcmotor/python/Arduino/__pycache__/Arduino.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..dafdab7 --- /dev/null +++ b/user-code/dcmotor/python/Arduino/__pycache__/Arduino.cpython-38.pyc diff --git a/user-code/dcmotor/python/Arduino/__pycache__/__init__.cpython-38.pyc b/user-code/dcmotor/python/Arduino/__pycache__/__init__.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..ccbb74a --- /dev/null +++ b/user-code/dcmotor/python/Arduino/__pycache__/__init__.cpython-38.pyc diff --git a/user-code/dcmotor/scilab/dcmotor-both.sce b/user-code/dcmotor/scilab/dcmotor-both.sce index 104b518..04f4ff8 100644 --- a/user-code/dcmotor/scilab/dcmotor-both.sce +++ b/user-code/dcmotor/scilab/dcmotor-both.sce @@ -1,4 +1,4 @@ -ok = open_serial(1,4,115200) //COM port is 4 and baud rate is 115200 +ok = open_serial(1,2,115200) //COM port is 2 and baud rate is 115200 cmd_dcmotor_setup(1,3,1,10,11) // Setup DC motor of type 3 (L293D), motor 1, pin 9 and 10 cmd_dcmotor_run(1,1,100) // Motor 1 runs at PWM 100 sleep(3000) // for 3 seconds diff --git a/user-code/dcmotor/scilab/dcmotor-clock.sce b/user-code/dcmotor/scilab/dcmotor-clock.sce index 310c72f..9a32392 100644 --- a/user-code/dcmotor/scilab/dcmotor-clock.sce +++ b/user-code/dcmotor/scilab/dcmotor-clock.sce @@ -1,4 +1,4 @@ -ok = open_serial(1,4,115200) //COM port is 4 and baud rate is 115200 +ok = open_serial(1,2,115200) //COM port is 2 and baud rate is 115200 cmd_dcmotor_setup(1,3,1,9,10) // Setup DC motor of type 3 (L293D), motor 1, pin 9 and 10 cmd_dcmotor_run(1,1,100) // Motor 1 runs at PWM 100 sleep(3000) // This is allowed to continue for 3 seconds diff --git a/user-code/dcmotor/scilab/dcmotor-loop.sce b/user-code/dcmotor/scilab/dcmotor-loop.sce index fdb5b67..ceee5a2 100644 --- a/user-code/dcmotor/scilab/dcmotor-loop.sce +++ b/user-code/dcmotor/scilab/dcmotor-loop.sce @@ -1,4 +1,4 @@ -ok = open_serial(1,4,115200)//COM port is 4 and baud rate is 115200 +ok = open_serial(1,2,115200)//COM port is 2 and baud rate is 115200 if ok~=0, error('Serial port is not accesible'); end cmd_dcmotor_setup(1,3,1,9,10) // Setup DC motor of type 3 (L293D), motor 1, pins 9 and 10 for x=1:4 diff --git a/user-code/ldr/OpenModelica/ldr-led.mo b/user-code/ldr/OpenModelica/ldr-led.mo index 1cf6fb8..0dafd1d 100644 --- a/user-code/ldr/OpenModelica/ldr-led.mo +++ b/user-code/ldr/OpenModelica/ldr-led.mo @@ -8,7 +8,7 @@ model ldr_led "LED indicating light sensor readings" Integer c_ok(fixed = false);
algorithm
when initial() then
- ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200";
+ ok := sComm.open_serial(1, 2, 115200) "At port 0 with baudrate of 115200";
sComm.delay(2000);
if ok <> 0 then
strm.print("Unable to open serial port, please check");
@@ -31,4 +31,4 @@ algorithm //Run for 500 iterations
//Setting Threshold value of 300
annotation(experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 0.02));
-end ldr_led;
\ No newline at end of file +end ldr_led;
diff --git a/user-code/ldr/OpenModelica/ldr-read.mo b/user-code/ldr/OpenModelica/ldr-read.mo index d58cab3..e5ab61f 100644 --- a/user-code/ldr/OpenModelica/ldr-read.mo +++ b/user-code/ldr/OpenModelica/ldr-read.mo @@ -7,7 +7,7 @@ model ldr_read "Reading light intensity using ldr" Integer c_ok(fixed = false); algorithm when initial() then - ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + ok := sComm.open_serial(1, 2, 115200) "At port 0 with baudrate of 115200"; sComm.delay(2000); if ok <> 0 then strm.print("Unable to open serial port, please check"); @@ -24,4 +24,4 @@ algorithm end when; //Run for 10 iterations annotation(experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 1)); -end ldr_read;
\ No newline at end of file +end ldr_read; diff --git a/user-code/ldr/julia/ArduinoTools.jl b/user-code/ldr/julia/ArduinoTools.jl new file mode 100644 index 0000000..7137294 --- /dev/null +++ b/user-code/ldr/julia/ArduinoTools.jl @@ -0,0 +1,189 @@ +module ArduinoTools + +using SerialPorts + + +function connectBoard(baudrate::Int64) # Automatically detects SerialPort and opens it + arr = list_serialports() # with given baudrate + port = arr[1] + ser = SerialPort(port,baudrate) # Caution: works in most cases... If doesn't, + sleep(2) # Use the openSerial() function + return ser +end + +# function openSerial(port::ASCIIString, baudrate::Int64) # starts serial communication +# ser = SerialPorts.SerialPort(port,baudrate) +# sleep(2) +# return ser +# end + +function closeSerial(ser::SerialPorts.SerialPort) # closes serial port + SerialPorts.close(ser) +end + +# function Write(ser::SerialPorts.SerialPort, str::ASCIIString) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +# function Write(ser::SerialPorts.SerialPort, str::UTF8String) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +function Read(ser::SerialPorts.SerialPort, bytes::Int64) # reads 'bytes' number of bytes from serial port + SerialPorts.read(ser,bytes) +end + +function ReadAvailable(ser::SerialPorts.SerialPort) # reads all available bytes from serial port + SerialPorts.readavailable(ser) +end + +function nbAvailable(ser::SerialPorts.SerialPort) # returns number of bytes available for reading + SerialPorts.nb_available(ser) +end + +function listSerialPorts() # returns array of serial port names on computer + SerialPorts.list_serialports() +end + +function pinMode(file_des::SerialPorts.SerialPort , pin_no::Int64 , mode::String) + # isascii(mode) && throw("Mode needs to be ascii") #This will throw an error if mode is not ascii + # m = uppercase(mode) # Prevent errors due to case differences + if mode == "INPUT" str = "Da"*string(Char(48+pin_no))*"0" end # Dan0 for INPUT + if mode == "OUTPUT" str = "Da"*string(Char(48+pin_no))*"1" end # Dan1 for OUTPUT + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 0 str = "Dw"*string(Char(48+pin_no))*"1" end # Dwn1 for HIGH + if val == 0 str = "Dw"*string(Char(48+pin_no))*"0" end # Dwn0 for LOW + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "Dr"*string(Char(48+pin_no)) # Drn to read digital pin n + str = ascii(str) # Convert UTF8String to ASCIIString + write(file_des,str) + sleep(0.01) # Delay the next step by 10 milliseconds + c = read(file_des,1) # Read one byte from SerialPort + n = parse(Int,c) # Convert the received string into integer + return n # Return the integer +end + +function analogWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 255 val = 255 end # Make sure val isn't beyond limits + if val < 0 val = 0 end + c = Char(val) # Conversion of val into character + d = string(c) # Converting character to string + s = "W"*string(Char(48+pin_no))*d # Wnm for analog value m on pin n + write(file_des,s) +end + +function analogRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "A"*string(Char(48+pin_no)) #"An" for analog value on pin n + write(file_des,str) + sleep(0.1) # Delay next step by 100 milliseconds + n = bytesavailable(file_des) # Get number of bytes in input buffer + s = read(file_des, n) # Read n bytes from SerialPort + iolit = IOBuffer(s) + num = read(iolit, Int16) + # num = reinterpret(Int16, s) + # println(sizeof(num)) + # println(num[1]) + # @printf("value = %d", Int(num)) + # close(iolit) + + # typeof(s) + # k = parse(Int,s) # Convert String to integer + return num # Return the integer +end + +function DCMotorSetup(file_des::SerialPorts.SerialPort, driver_type::Int64, motor_no::Int64, pin1::Int64, pin2::Int64) + println("Initializing motor") + if (driver_type == 1) # adafruit + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 2) # L298 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 3) # L293 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"0" + end + write(file_des,code_sent) + sleep(0.1) # sleep for a tenth of a second + s = readavailable(file_des) # read all available bytes from input buffer + if s == "OK" + println("Motor Setup Successful") + else + println("Motor Setup unsuccessful") + end +end # end function + +function DCMotorRun(file_des::SerialPorts.SerialPort, motor_no::Int64, speed::Int64) + sgn = sign(speed) # Checking sign of speed to set direction + if sgn >= 0 + direction = "1" + else + direction = "0" + end + speed = abs(speed) # Dropping the sign + if speed > 255 speed = 255 end # Make sure speed is not beyond limit + code_sent = "M"*string(motor_no)*direction*string(Char(speed)) + write(file_des,code_sent) +end # end function + +function DCMotorRelease(file_des::SerialPorts.SerialPort, motor_no::Int64) + code_sent = "M"*string(motor_no)*"1"*string(Char(0)) + write(file_des,code_sent) # Stops the motor first + sleep(0.1) # Delay of 0.1 second + code_sent = "M"*string(motor_no)*"r" + write(file_des,code_sent) # Releases the motor +end + +function ServoAttach(file_des::SerialPorts.SerialPort, servo_no::Int64) + println("Initializing servo") + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function ServoMove(file_des::SerialPorts.SerialPort, servo_no::Int64, val::Int64) + if val < 0 val = 0 end + if val >180 val = 180 end + pin = "Sw"*string(servo_no)*string(Char(val)) + write(file_des,pin) +end + +function ServoDetach(file_des::SerialPorts.SerialPort, servo_no::Int64) + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function MPUReadin(file_des::SerialPorts.SerialPort) + cmd = "F" + write(file_des,cmd) + analog_times = [] + sleep(0.03) + s = readavailable(file_des) + sarr = split(s,"/") + for i in 1:length(sarr) + push!(analog_times,parse(Int,sarr[i])) + end + return analog_times +end + +export connectBoard,openSerial,closeSerial,Write,Read,ReadAvailable,nbAvailable,listSerialPorts,pinMode,digiWrite,digiRead,analogWrite,analogRead,DCMotorSetup,DCMotorRun,DCMotorRelease,ServoAttach,ServoMove,ServoDetach,MPUReadin + +end # module diff --git a/user-code/ldr/julia/ldr-led.jl b/user-code/ldr/julia/ldr-led.jl index cdf5dc7..d2871b5 100644 --- a/user-code/ldr/julia/ldr-led.jl +++ b/user-code/ldr/julia/ldr-led.jl @@ -1,12 +1,12 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -pinMode(ser,9,"OUTPUT") +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.pinMode(ser,9,"OUTPUT") for i = 1:500 - p = analogRead(ser,5) + p = ArduinoTools.analogRead(ser,5) println(p) - if p > 300 digiWrite(ser,9,0) - else digiWrite(ser,9,1) end + if p > 300 ArduinoTools.digiWrite(ser,9,0) + else ArduinoTools.digiWrite(ser,9,1) end end close(ser) diff --git a/user-code/ldr/julia/ldr-read.jl b/user-code/ldr/julia/ldr-read.jl index beffb7a..d8e5683 100644 --- a/user-code/ldr/julia/ldr-read.jl +++ b/user-code/ldr/julia/ldr-read.jl @@ -3,9 +3,9 @@ include("ArduinoTools.jl") i = 0 x = [] y = [] -ser = connectBoard(115200) +ser = ArduinoTools.connectBoard(115200) for i = 1:20 - p = analogRead(ser,5) + p = ArduinoTools.analogRead(ser,5) sleep(0.5) println(p) diff --git a/user-code/ldr/python/Arduino/Arduino.py b/user-code/ldr/python/Arduino/Arduino.py new file mode 100644 index 0000000..eb27562 --- /dev/null +++ b/user-code/ldr/python/Arduino/Arduino.py @@ -0,0 +1,327 @@ + +import sys +import serial +from serial import Serial +from serial.tools.list_ports import comports +from time import sleep + +p1=0 #Initial Position of servo motor +p2=0 #Final Position of servo motor + +a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] +class Initialization: + def __init__(self): + pass + + def locateport(self): + if sys.platform.startswith('win'): + port ='' + ports = list(comports()) + for i in ports: + for j in i: + if 'Arduino' in j: + port = i[0] + elif sys.platform.startswith('linux'): + b=[] + port ='' + ports = list(comports()) + for i in range(len(ports)): + for x in range(7): + portname="/dev/ttyACM"+str(x) + if ports[i][0]==portname: + b.append(ports[i][0]) + port=b[0] + return port + + def open_serial(self,ard_no, PortNo,baudrate): + #global ser + if PortNo =='': + sys.exit("aa..error..! arduino not found") + else: + self.ser = Serial(PortNo,baudrate) + sleep(2) + self.checkfirmware() + + def close_serial(self): + #global ser + self.ser.close() + + def checkfirmware(self): + print ("Check Firm Ware") + #global ser + self.ser.write(bytes([118])) #chr(118) + try: + x=self.ser.read() + #print(x) + #x=self.ser.read() + #print(x) + if x==b'o': + try: + x=self.ser.read() + except: + sys.exit("aa..! error..! it seems correct firmware not loaded") + else: + sys.exit("aa..! error..! it seems correct firmware not loaded") + except: + sys.exit("aa..! error..! it seems correct firmware not loaded") + + +class Arduino(Initialization): + def __init__(self): + print ("Init Arduino") + #self.baudrate=0 + #self.ard_no=1 + #self.PortNo=0 + #self.pin=0 + #self.val=0 + #self.mode=0 + #self.mno=0 + #self.pin1=0 + #self.pin2=0 + #self.servo=0 + + + + def cmd_digital_out(self,ard_no,pin,val): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="D"+"a"+a[pin]+"1" + self.ser.write(cmd.encode('utf-8')) + cmd="" + cmd="D"+"w"+a[pin]+str(val) + self.ser.write(cmd.encode('utf-8')) + + def cmd_digital_in(self,ard_no,pin): + b=[] + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="D"+"a"+a[pin]+"0" + self.ser.write(cmd.encode('utf-8')) + cmd="" + cmd="D"+"r"+a[pin] + self.ser.write(cmd.encode('utf-8')) + a=self.ser.read() + return(a) + + def cmd_analog_in(self,ard_no,pin): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="A"+a[pin] + self.ser.write(cmd.encode('utf-8')) + analog_times=[]; + b1=ord(self.ser.read(1)) + b2=ord(self.ser.read(1)) + a=b1+b2*256 + #a=ser.read() + return(a) + #return(int((1023-0)*int(ord(a))/(255-0))) + + + def cmd_analog_out(self,ard_no, pin, val): + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd = "W" + a[pin] + chr(val) + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_setup(self,ard_no,mode,mno,pin1,pin2): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="C"+a[mno]+a[pin1]+a[pin2]+a[mode] + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_run(self,ard_no,mno,val): + cmd="" + if(val <0): + dirc=0 + else: + dirc=1 + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="M"+a[mno]+a[dirc]+chr(abs(val)) + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_release(self,ard_no,mno): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="M"+a[mno]+"r" + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_attach(self,ard_no,servo): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"a"+a[servo] + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_detach(self,ard_no,servo): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"d"+a[servo] + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_move(self,ard_no,servo,angle): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"w"+a[servo]+chr(angle) + self.ser.write(cmd.encode('utf-8')) + + + + +#For PISO shift register + def cmd_shift_in(self,dataPin,clockPin,ledPin,clockLed): + value=[0 for _ in range(0,8)] + #print value + value2=[value for _ in range(0,8)] + #print value2 + for i in range(0,8): + so= self.cmd_digital_in(1,dataPin) #Reads serial out of IC + print (so) + if so=='1': + self.cmd_digital_out(1,ledPin,1) + sleep(0.1) + else: + self.cmd_digital_out(1,ledPin,0) + sleep(0.1) + value2[i][i]=int(so) + #performs value=value|value2[i] + for j in range(0,8): + if value[j]==1 or value2[i][j]==1: + value[j]=1 + else: + value[j]=0 + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockLed,1) + sleep(0.5) + self.cmd_digital_out(1,clockPin,0) + self.cmd_digital_out(1,clockLed,0) #clockLED: Led indicating clock pulses + sleep(0.4) + #after every clock pulse, 1 right shift occurs for every bit + #thus after 8 clock pulses, the entire parallel input is shifted out, + #and obtained at the dataPin, one bit per clock pulse + #Thus we get the bit by bit serial output of the Parallel Load + print (value) + + + + +#For PISO shift register +#shift in for n bits + def cmd_shift_in_n(self,dataPin,clockPin,ledPin,clockLed,numBits): + n=numBits #no. of bits + value=[0 for _ in range(0,n)] #a list of n elements, all 0s, to store the n bits of the inputs together + value2=[value for _ in range(0,n)] #a list of lists, analogous to nxn array of all 0s + for i in range(0,n): #n iterations since n bit input is given + so=self.cmd_digital_in(1,dataPin) + if so=='1': + self.cmd_digital_out(1,ledPin,1) + sleep(0.1) + else: + self.cmd_digital_out(1,ledPin,0) + sleep(0.1) + value2[i][i]=int(so) + #performs value=value|value2[i] + for j in range(0,n): + if value[j]==1 or value2[i][j]==1: + value[j]=1 + else: + value[j]=0 + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockLed,1) + sleep(0.5) + self.cmd_digital_out(1,clockPin,0) + self.cmd_digital_out(1,clockLed,0) #clockLED: Led indicating clock pulses + sleep(0.4) + print (value) + + + + + +#For SIPO shift register + def cmd_shift_out(self,dataPin,clockPin,bitOrder,val): + val2=0 + mat=[] + if bitOrder=='MSBFIRST': + #to create identity matrix + for i in range(0,8): + matsub=[0 for _ in range(0,8)] + matsub[i]=1 + mat.append(matsub) + else: + #to create horizontally flipped identity matrix + for i in range(0,8): + matsub=[0 for _ in range(0,8)] + matsub[7-i]=1 + mat.append(matsub) + for i in range(0,8): + #performs & operation on corresponding elements of list + for x,y in zip(val,mat[i]): + if x==1 and y==1: + val2=1 + break + else: + val2=0 + self.cmd_digital_out(1,dataPin,val2) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + + + +#For SIPO shift register + def cmd_shift_out_(self,dataPin,clockPin,inPin): + print ("Give serial input: ") + sleep(0.25) + self.cmd_digital_out(1,dataPin,self.cmd_digital_in(1,inPin)) #if inPin is HIGH, + #i.e. if input is given, write HIGH on Serial In Pin of IC + print("Serial input stored: ") + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) #One clock pulse + sleep(0.15) + + + + + +#For SIPO shift register +#shift out for n bits + def cmd_shift_out_n(self,dataPin,clockPin,bitOrder,val,numBits): + n=int(numBits) #number of bits + if (n%8)==0: + p=n + else: + p=(8*(n/8))+8 + val1=[0 for _ in range(0,n)] #output matrix. + #If all elements of the matrix are 0, + #output pinstate will be 0 (i.e LOW). + #If 1 or more elements of the matrix is 1, + #output pinstate will be 1 (i.e HIGH) + val2=0 + mat=[] + if bitOrder=='MSBFIRST': + for i in range(0,n): + matsub=[0 for _ in range(0,n)] + matsub[i]=1 + mat.append(matsub) + else: + for i in range(0,n): + matsub=[0 for _ in range(0,n)] + matsub[(n-1)-i]=1 + mat.append(matsub) + for j in range(0,(p-n)): #do nothing for the first (p-n) clock pulses + self.cmd_digital_out(1,dataPin,0) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + for i in range(0,n): #shift for last n clock pulses + #to perform val & mat[i] + for x,y in zip(val,mat[i]): + if x==1 and y==1: + val2=1 + break + else: + val2=0 + print (val2,) + self.cmd_digital_out(1,dataPin,val2) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + + + + diff --git a/user-code/ldr/python/Arduino/__init__.py b/user-code/ldr/python/Arduino/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/user-code/ldr/python/Arduino/__init__.py diff --git a/user-code/ldr/python/Arduino/__pycache__/Arduino.cpython-38.pyc b/user-code/ldr/python/Arduino/__pycache__/Arduino.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..22bf567 --- /dev/null +++ b/user-code/ldr/python/Arduino/__pycache__/Arduino.cpython-38.pyc diff --git a/user-code/ldr/python/Arduino/__pycache__/__init__.cpython-38.pyc b/user-code/ldr/python/Arduino/__pycache__/__init__.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..95917da --- /dev/null +++ b/user-code/ldr/python/Arduino/__pycache__/__init__.cpython-38.pyc diff --git a/user-code/led/OpenModelica/led-blue-delay.mo b/user-code/led/OpenModelica/led-blue-delay.mo index 16ba14e..1427216 100644 --- a/user-code/led/OpenModelica/led-blue-delay.mo +++ b/user-code/led/OpenModelica/led-blue-delay.mo @@ -7,7 +7,7 @@ model led_blue_delay "Turn on Blue LED for a period of 2 seconds" Integer c_ok(fixed = false); algorithm when initial() then - ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + ok := sComm.open_serial(1, 2, 115200) "At port 0 with baudrate of 115200"; sComm.delay(2000); if ok <> 0 then strm.print("Check the serial port and try again"); @@ -21,4 +21,4 @@ algorithm c_ok := sComm.close_serial(1) "To close the connection safely"; end when; annotation(experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); -end led_blue_delay;
\ No newline at end of file +end led_blue_delay; diff --git a/user-code/led/OpenModelica/led-blue-red.mo b/user-code/led/OpenModelica/led-blue-red.mo index 9fc1b79..1962af1 100644 --- a/user-code/led/OpenModelica/led-blue-red.mo +++ b/user-code/led/OpenModelica/led-blue-red.mo @@ -7,7 +7,7 @@ model led_blue_red "Turn on Red & Blue LED" Integer c_ok(fixed = false); algorithm when initial() then - ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + ok := sComm.open_serial(1, 2, 115200) "At port 0 with baudrate of 115200"; if ok <> 0 then strm.print("Check the serial port and try again"); else @@ -23,4 +23,4 @@ algorithm c_ok := sComm.close_serial(1) "To close the connection safely"; end when; annotation(experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); -end led_blue_red;
\ No newline at end of file +end led_blue_red; diff --git a/user-code/led/OpenModelica/led-blue.mo b/user-code/led/OpenModelica/led-blue.mo index cc87cf2..28f3e14 100644 --- a/user-code/led/OpenModelica/led-blue.mo +++ b/user-code/led/OpenModelica/led-blue.mo @@ -7,7 +7,7 @@ model led_blue "Turn on Blue LED" Integer c_ok(fixed = false); algorithm when initial() then - ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + ok := sComm.open_serial(1, 2, 115200) "At port 0 with baudrate of 115200"; sComm.delay(2000); if ok <> 0 then strm.print("Check the serial port and try again"); @@ -18,4 +18,4 @@ algorithm c_ok := sComm.close_serial(1) "To close the connection safely"; end when; annotation(experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); -end led_blue;
\ No newline at end of file +end led_blue; diff --git a/user-code/led/OpenModelica/led-green-blink.mo b/user-code/led/OpenModelica/led-green-blink.mo index 7622b35..0ad7257 100644 --- a/user-code/led/OpenModelica/led-green-blink.mo +++ b/user-code/led/OpenModelica/led-green-blink.mo @@ -7,7 +7,7 @@ model led_green_blink "This will turn on and turn off the green LED for every se Integer c_ok(fixed = false); algorithm when initial() then - ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200"; + ok := sComm.open_serial(1, 2, 115200) "At port 0 with baudrate of 115200"; sComm.delay(1000); if ok <> 0 then strm.print("Check the serial port and try again"); @@ -23,4 +23,4 @@ algorithm c_ok := sComm.close_serial(1) "To close the connection safely"; end when; annotation(experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 10)); -end led_green_blink;
\ No newline at end of file +end led_green_blink; diff --git a/user-code/led/OpenModelica/test_firmware.mo b/user-code/led/OpenModelica/test_firmware.mo deleted file mode 100644 index 569b4d7..0000000 --- a/user-code/led/OpenModelica/test_firmware.mo +++ /dev/null @@ -1,12 +0,0 @@ -model testfirmware "test serial communication with Arduino"
-import sComm=Arduino.SerialCommunication.Functions;
-Integer h(fixed=false);
-Integer w(fixed=false);
-Integer r(fixed=false);
-Integer c(fixed=false);
-algorithm
- h := sComm.open_serial(1,2,9600);
- w := sComm.write_serial(1, "v", 1);
- r := sComm.read_serial(1,2);
- c := sComm.close_serial(1);
-end testfirmware;
diff --git a/user-code/led/arduino-old/led-blink/led-blink.ino b/user-code/led/arduino-old/led-blink/led-blink.ino deleted file mode 100644 index de2934b..0000000 --- a/user-code/led/arduino-old/led-blink/led-blink.ino +++ /dev/null @@ -1,13 +0,0 @@ -int i=0; -void setup() { - pinMode(10, OUTPUT); - for(i=0;i<5;i++) - { - digitalWrite(10, HIGH); // turn the LED on (HIGH is the voltage level) - delay(1000); // wait for a second - digitalWrite(10, LOW); // turn the LED off by making the voltage LOW - delay(1000); // wait for a second - } -} -void loop() { -} diff --git a/user-code/led/arduino-old/led-blue-delay/led-blue-delay.ino b/user-code/led/arduino-old/led-blue-delay/led-blue-delay.ino deleted file mode 100644 index fd2d4f5..0000000 --- a/user-code/led/arduino-old/led-blue-delay/led-blue-delay.ino +++ /dev/null @@ -1,8 +0,0 @@ -void setup() { -pinMode(9,OUTPUT); -digitalWrite(9,HIGH); -delay(2000); -digitalWrite(9,LOW); -} -void loop() { -} diff --git a/user-code/led/arduino-old/led-blue-red/led-blue-red.ino b/user-code/led/arduino-old/led-blue-red/led-blue-red.ino deleted file mode 100644 index cbb467b..0000000 --- a/user-code/led/arduino-old/led-blue-red/led-blue-red.ino +++ /dev/null @@ -1,12 +0,0 @@ -void setup() { -pinMode(9,OUTPUT); -pinMode(11,OUTPUT); -digitalWrite(9,HIGH); -digitalWrite(11,HIGH); -delay(5000); -digitalWrite(9,LOW); -delay(3000); -digitalWrite(11,LOW); -} -void loop() { -} diff --git a/user-code/led/arduino-old/led-blue/led-blue.ino b/user-code/led/arduino-old/led-blue/led-blue.ino deleted file mode 100644 index b2bf833..0000000 --- a/user-code/led/arduino-old/led-blue/led-blue.ino +++ /dev/null @@ -1,6 +0,0 @@ -void setup() { -pinMode(9,OUTPUT); -digitalWrite(9,HIGH); -} -void loop() { -} diff --git a/user-code/led/arduino-old/led_on/led_on.ino b/user-code/led/arduino-old/led_on/led_on.ino deleted file mode 100644 index 09ef13c..0000000 --- a/user-code/led/arduino-old/led_on/led_on.ino +++ /dev/null @@ -1,11 +0,0 @@ - -void setup() { -pinMode(9,OUTPUT); -digitalWrite(9,HIGH); -delay(2000); -digitalWrite(9,LOW); -} - -void loop() { - -} diff --git a/user-code/led/arduino-old/led_sleep/led_sleep.ino b/user-code/led/arduino-old/led_sleep/led_sleep.ino deleted file mode 100644 index f443416..0000000 --- a/user-code/led/arduino-old/led_sleep/led_sleep.ino +++ /dev/null @@ -1,16 +0,0 @@ -const int LED = 13; - -void setup() { - Serial.begin(115200); - pinMode(LED,OUTPUT); //Output mode - - digitalWrite(LED,LOW); //LED OFF - delay(1000); //Delay in milliseconds - digitalWrite(LED,HIGH); //LED ON -delay(1000); //Delay in milliseconds - digitalWrite(LED,LOW); -} - -void loop() { - -}
diff --git a/user-code/led/arduino/led-blink/led-blink.ino~ b/user-code/led/arduino/led-green-blink/led-blink.ino~ index de2934b..de2934b 100644 --- a/user-code/led/arduino/led-blink/led-blink.ino~ +++ b/user-code/led/arduino/led-green-blink/led-blink.ino~ diff --git a/user-code/led/arduino/led-blink/led-blink.ino b/user-code/led/arduino/led-green-blink/led-green-blink.ino index 1b53338..1b53338 100644 --- a/user-code/led/arduino/led-blink/led-blink.ino +++ b/user-code/led/arduino/led-green-blink/led-green-blink.ino diff --git a/user-code/led/arduino/led_on-amravati/led_on-amravati.ino b/user-code/led/arduino/led_on-amravati/led_on-amravati.ino deleted file mode 100644 index 7dcbdc1..0000000 --- a/user-code/led/arduino/led_on-amravati/led_on-amravati.ino +++ /dev/null @@ -1,12 +0,0 @@ - -void setup() { -pinMode(9,OUTPUT); -Serial.begin(115200); -} - -void loop() { -digitalWrite(9,HIGH); -delay(1000); -digitalWrite(9,LOW); -delay(30000); -} diff --git a/user-code/led/arduino/led_on/led_on.ino b/user-code/led/arduino/led_on/led_on.ino deleted file mode 100644 index 98befd9..0000000 --- a/user-code/led/arduino/led_on/led_on.ino +++ /dev/null @@ -1,12 +0,0 @@ - -void setup() { -pinMode(9,OUTPUT); -Serial.begin(115200); -digitalWrite(9,HIGH); -delay(2000); -digitalWrite(9,LOW); -} - -void loop() { - -} diff --git a/user-code/led/arduino/led_sleep/led_sleep.ino b/user-code/led/arduino/led_sleep/led_sleep.ino deleted file mode 100644 index f443416..0000000 --- a/user-code/led/arduino/led_sleep/led_sleep.ino +++ /dev/null @@ -1,16 +0,0 @@ -const int LED = 13; - -void setup() { - Serial.begin(115200); - pinMode(LED,OUTPUT); //Output mode - - digitalWrite(LED,LOW); //LED OFF - delay(1000); //Delay in milliseconds - digitalWrite(LED,HIGH); //LED ON -delay(1000); //Delay in milliseconds - digitalWrite(LED,LOW); -} - -void loop() { - -}
diff --git a/user-code/led/julia/ArduinoTools.jl b/user-code/led/julia/ArduinoTools.jl new file mode 100644 index 0000000..7137294 --- /dev/null +++ b/user-code/led/julia/ArduinoTools.jl @@ -0,0 +1,189 @@ +module ArduinoTools + +using SerialPorts + + +function connectBoard(baudrate::Int64) # Automatically detects SerialPort and opens it + arr = list_serialports() # with given baudrate + port = arr[1] + ser = SerialPort(port,baudrate) # Caution: works in most cases... If doesn't, + sleep(2) # Use the openSerial() function + return ser +end + +# function openSerial(port::ASCIIString, baudrate::Int64) # starts serial communication +# ser = SerialPorts.SerialPort(port,baudrate) +# sleep(2) +# return ser +# end + +function closeSerial(ser::SerialPorts.SerialPort) # closes serial port + SerialPorts.close(ser) +end + +# function Write(ser::SerialPorts.SerialPort, str::ASCIIString) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +# function Write(ser::SerialPorts.SerialPort, str::UTF8String) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +function Read(ser::SerialPorts.SerialPort, bytes::Int64) # reads 'bytes' number of bytes from serial port + SerialPorts.read(ser,bytes) +end + +function ReadAvailable(ser::SerialPorts.SerialPort) # reads all available bytes from serial port + SerialPorts.readavailable(ser) +end + +function nbAvailable(ser::SerialPorts.SerialPort) # returns number of bytes available for reading + SerialPorts.nb_available(ser) +end + +function listSerialPorts() # returns array of serial port names on computer + SerialPorts.list_serialports() +end + +function pinMode(file_des::SerialPorts.SerialPort , pin_no::Int64 , mode::String) + # isascii(mode) && throw("Mode needs to be ascii") #This will throw an error if mode is not ascii + # m = uppercase(mode) # Prevent errors due to case differences + if mode == "INPUT" str = "Da"*string(Char(48+pin_no))*"0" end # Dan0 for INPUT + if mode == "OUTPUT" str = "Da"*string(Char(48+pin_no))*"1" end # Dan1 for OUTPUT + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 0 str = "Dw"*string(Char(48+pin_no))*"1" end # Dwn1 for HIGH + if val == 0 str = "Dw"*string(Char(48+pin_no))*"0" end # Dwn0 for LOW + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "Dr"*string(Char(48+pin_no)) # Drn to read digital pin n + str = ascii(str) # Convert UTF8String to ASCIIString + write(file_des,str) + sleep(0.01) # Delay the next step by 10 milliseconds + c = read(file_des,1) # Read one byte from SerialPort + n = parse(Int,c) # Convert the received string into integer + return n # Return the integer +end + +function analogWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 255 val = 255 end # Make sure val isn't beyond limits + if val < 0 val = 0 end + c = Char(val) # Conversion of val into character + d = string(c) # Converting character to string + s = "W"*string(Char(48+pin_no))*d # Wnm for analog value m on pin n + write(file_des,s) +end + +function analogRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "A"*string(Char(48+pin_no)) #"An" for analog value on pin n + write(file_des,str) + sleep(0.1) # Delay next step by 100 milliseconds + n = bytesavailable(file_des) # Get number of bytes in input buffer + s = read(file_des, n) # Read n bytes from SerialPort + iolit = IOBuffer(s) + num = read(iolit, Int16) + # num = reinterpret(Int16, s) + # println(sizeof(num)) + # println(num[1]) + # @printf("value = %d", Int(num)) + # close(iolit) + + # typeof(s) + # k = parse(Int,s) # Convert String to integer + return num # Return the integer +end + +function DCMotorSetup(file_des::SerialPorts.SerialPort, driver_type::Int64, motor_no::Int64, pin1::Int64, pin2::Int64) + println("Initializing motor") + if (driver_type == 1) # adafruit + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 2) # L298 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 3) # L293 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"0" + end + write(file_des,code_sent) + sleep(0.1) # sleep for a tenth of a second + s = readavailable(file_des) # read all available bytes from input buffer + if s == "OK" + println("Motor Setup Successful") + else + println("Motor Setup unsuccessful") + end +end # end function + +function DCMotorRun(file_des::SerialPorts.SerialPort, motor_no::Int64, speed::Int64) + sgn = sign(speed) # Checking sign of speed to set direction + if sgn >= 0 + direction = "1" + else + direction = "0" + end + speed = abs(speed) # Dropping the sign + if speed > 255 speed = 255 end # Make sure speed is not beyond limit + code_sent = "M"*string(motor_no)*direction*string(Char(speed)) + write(file_des,code_sent) +end # end function + +function DCMotorRelease(file_des::SerialPorts.SerialPort, motor_no::Int64) + code_sent = "M"*string(motor_no)*"1"*string(Char(0)) + write(file_des,code_sent) # Stops the motor first + sleep(0.1) # Delay of 0.1 second + code_sent = "M"*string(motor_no)*"r" + write(file_des,code_sent) # Releases the motor +end + +function ServoAttach(file_des::SerialPorts.SerialPort, servo_no::Int64) + println("Initializing servo") + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function ServoMove(file_des::SerialPorts.SerialPort, servo_no::Int64, val::Int64) + if val < 0 val = 0 end + if val >180 val = 180 end + pin = "Sw"*string(servo_no)*string(Char(val)) + write(file_des,pin) +end + +function ServoDetach(file_des::SerialPorts.SerialPort, servo_no::Int64) + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function MPUReadin(file_des::SerialPorts.SerialPort) + cmd = "F" + write(file_des,cmd) + analog_times = [] + sleep(0.03) + s = readavailable(file_des) + sarr = split(s,"/") + for i in 1:length(sarr) + push!(analog_times,parse(Int,sarr[i])) + end + return analog_times +end + +export connectBoard,openSerial,closeSerial,Write,Read,ReadAvailable,nbAvailable,listSerialPorts,pinMode,digiWrite,digiRead,analogWrite,analogRead,DCMotorSetup,DCMotorRun,DCMotorRelease,ServoAttach,ServoMove,ServoDetach,MPUReadin + +end # module diff --git a/user-code/led/julia/led-blue-delay.jl b/user-code/led/julia/led-blue-delay.jl index 4aab3cd..07904a6 100644 --- a/user-code/led/julia/led-blue-delay.jl +++ b/user-code/led/julia/led-blue-delay.jl @@ -1,9 +1,9 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -pinMode(ser,9,"OUTPUT") -digiWrite(ser,9,1) +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.pinMode(ser,9,"OUTPUT") +ArduinoTools.digiWrite(ser,9,1) sleep(2) -digiWrite(ser,9,0) +ArduinoTools.digiWrite(ser,9,0) close(ser) diff --git a/user-code/led/julia/led-blue-red.jl b/user-code/led/julia/led-blue-red.jl index a4a9ece..9d40a1c 100644 --- a/user-code/led/julia/led-blue-red.jl +++ b/user-code/led/julia/led-blue-red.jl @@ -1,13 +1,13 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -pinMode(ser,9,"OUTPUT") -pinMode(ser,11,"OUTPUT") -digiWrite(ser,9,1) -digiWrite(ser,11,1) +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.pinMode(ser,9,"OUTPUT") +ArduinoTools.pinMode(ser,11,"OUTPUT") +ArduinoTools.digiWrite(ser,9,1) +ArduinoTools.digiWrite(ser,11,1) sleep(5) -digiWrite(ser,9,0) +ArduinoTools.digiWrite(ser,9,0) sleep(3) -digiWrite(ser,11,0) +ArduinoTools.digiWrite(ser,11,0) close(ser) diff --git a/user-code/led/julia/led-blue.jl b/user-code/led/julia/led-blue.jl index 4a50882..97af22f 100644 --- a/user-code/led/julia/led-blue.jl +++ b/user-code/led/julia/led-blue.jl @@ -1,7 +1,7 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -pinMode(ser,9,"OUTPUT") -digiWrite(ser,9,1) +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.pinMode(ser,9,"OUTPUT") +ArduinoTools.digiWrite(ser,9,1) close(ser) diff --git a/user-code/led/julia/led-green-blink.jl b/user-code/led/julia/led-green-blink.jl index 57e8851..8c72d1c 100644 --- a/user-code/led/julia/led-green-blink.jl +++ b/user-code/led/julia/led-green-blink.jl @@ -1,12 +1,12 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -pinMode(ser,10,"OUTPUT") +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.pinMode(ser,10,"OUTPUT") for i = 1:5 - digiWrite(ser,10,1) + ArduinoTools.digiWrite(ser,10,1) sleep(1) - digiWrite(ser,10,0) + ArduinoTools.digiWrite(ser,10,0) sleep(1) end close(ser) diff --git a/user-code/led/julia/test_firmware.jl b/user-code/led/julia/test_firmware.jl deleted file mode 100644 index b6178aa..0000000 --- a/user-code/led/julia/test_firmware.jl +++ /dev/null @@ -1,12 +0,0 @@ -using SerialPorts
-using ArduinoTools
-
-h = connectBoard(115200)
-
-for i = 1:3
- write(h,"v")
- s = read(h,2)
- println(s)
-end
-
-close(h)
diff --git a/user-code/led/led.tex b/user-code/led/led.tex index bf7ab6e..02c35e4 100644 --- a/user-code/led/led.tex +++ b/user-code/led/led.tex @@ -250,9 +250,9 @@ shield is not used. \begin{ardcode}
\acaption{Blinking the green LED}{Blinking the green LED. Available
- at \LocLEDardbrief{led-blink/led-blink.ino}.}
+ at \LocLEDardbrief{led-green-blink/led-green-blink.ino}.}
\label{ard:led-blink}
- \lstinputlisting{\LocLEDardcode/led-blink/led-blink.ino}
+ \lstinputlisting{\LocLEDardcode/led-green-blink/led-green-blink.ino}
\end{ardcode}
@@ -598,10 +598,7 @@ The reader should go through the instructions given in \secref{sec:sci-start} before getting started.
\begin{enumerate}
\item In the first experiment, we will light up the blue LED on the
- shield. The code for this is given in Python-code-4.1.
- \comment{Because this code number is hard coded, it gives wrong
- numbers - please use variables}
- It begins with a command of the form
+ shield. The code for this is given in \pyref{py:led-blue}. It begins with a command of the form
\item Import os : This module provides a portable way of using operating system dependent functionality.
\item Import sys : This module provides access to some variables used or maintained by the interpreter
and to functions that interact strongly with the interpreter. It is always available.
@@ -689,7 +686,7 @@ It makes the green LED blink five times. \pcaption{Turning on the LED through Python}
{Turning on the LED through Python. Available at
\LocLEDpybrief{led-blue.py}.}
- \label{py:led-blue1}
+ \label{py:led-blue}
\lstinputlisting{\LocLEDpycode/led-blue.py}
\end{pycode}
diff --git a/user-code/led/python/4.2LED.py b/user-code/led/python/4.2LED.py deleted file mode 100644 index 8129411..0000000 --- a/user-code/led/python/4.2LED.py +++ /dev/null @@ -1,37 +0,0 @@ -import os -import sys -cwd=os.getcwd() -(setpath,Examples)=os.path.split(cwd) -#print setpath -sys.path.append(setpath) - -from Arduino.Arduino import Arduino -from time import sleep - -class LED_ON_OFF: - def __init__(self,baudrate): - self.baudrate=baudrate - self.setup() - self.run() - self.exit() - - def setup(self): - self.obj_arduino = Arduino() - self.port = self.obj_arduino.locateport() - self.obj_arduino.open_serial(1, self.port,self.baudrate) - - def run(self): - self.blue=9 - self.obj_arduino.cmd_digital_out(1,self.blue,1) - sleep(2) - self.obj_arduino.cmd_digital_out(1,self.blue,0) - sleep(2) - - def exit(self): - self.obj_arduino.close_serial() - -def main(): - obj_led=LED_ON_OFF(115200) - -if __name__== '__main__': - main() diff --git a/user-code/led/python/Arduino/__pycache__/Arduino.cpython-38.pyc b/user-code/led/python/Arduino/__pycache__/Arduino.cpython-38.pyc Binary files differindex 03744c3..edc2b73 100644 --- a/user-code/led/python/Arduino/__pycache__/Arduino.cpython-38.pyc +++ b/user-code/led/python/Arduino/__pycache__/Arduino.cpython-38.pyc diff --git a/user-code/led/scilab/led-blink.sce b/user-code/led/scilab/led-blink.sce deleted file mode 100644 index d9220a1..0000000 --- a/user-code/led/scilab/led-blink.sce +++ /dev/null @@ -1,15 +0,0 @@ -// Connect to Arduino at port 0 with baudrate of 115200
-ok = open_serial(1,0,115200)
-// This will turn on and turn off the user LED for every second for 10 times
-tic();
-for cnt = 1:10
- cmd_digital_out(1,13,0)
- sleep(500)
- cmd_digital_out(1,13,1)
- sleep(500)
-end
-t = toc();
-disp(t);
-
-// To close the connection safely
-p=close_serial(1)
diff --git a/user-code/led/scilab/led-blink.zcos b/user-code/led/scilab/led-blink.zcos Binary files differdeleted file mode 100644 index 3de6bc1..0000000 --- a/user-code/led/scilab/led-blink.zcos +++ /dev/null diff --git a/user-code/led/scilab/led-blue.sce b/user-code/led/scilab/led-blue.sce index 122d685..c870041 100644 --- a/user-code/led/scilab/led-blue.sce +++ b/user-code/led/scilab/led-blue.sce @@ -1,4 +1,4 @@ -ok = open_serial(1,0,115200); // At port 2 with baudrate of 115200
-if ok~=0, error('Check the serial port and try again');
+ok = open_serial(1,2,115200); // At port 2 with baudrate of 115200
+if ok~=0, error('Check the serial port and try again'); end
cmd_digital_out(1,9,1) // This will turn the blue LED
close_serial(1) // To close the connection safely
diff --git a/user-code/led/scilab/led-green-blink.sce b/user-code/led/scilab/led-green-blink.sce index 55c59a5..c7a24f8 100644 --- a/user-code/led/scilab/led-green-blink.sce +++ b/user-code/led/scilab/led-green-blink.sce @@ -1,4 +1,4 @@ -ok= open_serial(1,0,115200); // At port 2 with baudrate of 115200 +ok= open_serial(1,2,115200); // At port 2 with baudrate of 115200 if ok ~= 0 error('Check the serial port and try again'); end for i=1:5 // Running for loop, 5 times cmd_digital_out(1,10,1); // This turns on the green Led diff --git a/user-code/led/scilab/led2.zcos b/user-code/led/scilab/led2.zcos Binary files differdeleted file mode 100644 index d619b8a..0000000 --- a/user-code/led/scilab/led2.zcos +++ /dev/null diff --git a/user-code/led/scilab/manual.docx b/user-code/led/scilab/manual.docx Binary files differdeleted file mode 100644 index 59c44a8..0000000 --- a/user-code/led/scilab/manual.docx +++ /dev/null diff --git a/user-code/pot/OpenModelica/pot-threshold.mo b/user-code/pot/OpenModelica/pot-threshold.mo index 477d750..a930d21 100644 --- a/user-code/pot/OpenModelica/pot-threshold.mo +++ b/user-code/pot/OpenModelica/pot-threshold.mo @@ -8,7 +8,7 @@ model pot_threshold Integer c_ok(fixed = false);
algorithm
when initial() then
- ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200";
+ ok := sComm.open_serial(1, 2, 115200) "At port 0 with baudrate of 115200";
sComm.delay(2000);
if ok <> 0 then
strm.print("Unable to open serial port, please check");
@@ -39,4 +39,4 @@ algorithm //Threshold 1
//Threshold 2
annotation(experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 1));
-end pot_threshold;
\ No newline at end of file +end pot_threshold;
diff --git a/user-code/pot/OpenModelica/pot-threshold.sce b/user-code/pot/OpenModelica/pot-threshold.sce deleted file mode 100644 index 477d750..0000000 --- a/user-code/pot/OpenModelica/pot-threshold.sce +++ /dev/null @@ -1,42 +0,0 @@ -model pot_threshold
- extends Modelica.Icons.Example;
- import sComm = Arduino.SerialCommunication.Functions;
- import strm = Modelica.Utilities.Streams;
- Integer ok(fixed = false);
- Integer analog_in(fixed = false);
- Integer digital_out(fixed = false);
- Integer c_ok(fixed = false);
-algorithm
- when initial() then
- ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200";
- sComm.delay(2000);
- if ok <> 0 then
- strm.print("Unable to open serial port, please check");
- else
- for i in 1:100 loop
- analog_in := sComm.cmd_analog_in(1, 2) "read analog pin 2";
- strm.print("Potentiometer Readings:" + String(analog_in));
- if analog_in >= 0 and analog_in < 320 then
- digital_out := sComm.cmd_digital_out(1, 11, 1) "Turn ON LED";
- sComm.delay(1000);
- digital_out := sComm.cmd_digital_out(1, 11, 0) "Turn OFF LED";
- elseif analog_in >= 320 and analog_in <= 900 then
- digital_out := sComm.cmd_digital_out(1, 10, 1) "Turn ON LED";
- sComm.delay(1000);
- digital_out := sComm.cmd_digital_out(1, 10, 0) "Turn OFF LED";
- elseif analog_in > 900 and analog_in <= 1023 then
- digital_out := sComm.cmd_digital_out(1, 9, 1) "Turn ON LED";
- sComm.delay(1000);
- digital_out := sComm.cmd_digital_out(1, 9, 0) "Turn OFF LED";
- end if;
- end for;
- end if;
- end when;
- when terminal() then
- c_ok := sComm.close_serial(1) "To close the connection safely";
- end when;
- //Run for 100 iterations
- //Threshold 1
- //Threshold 2
- annotation(experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 1));
-end pot_threshold;
\ No newline at end of file diff --git a/user-code/pot/julia/ArduinoTools.jl b/user-code/pot/julia/ArduinoTools.jl new file mode 100644 index 0000000..7137294 --- /dev/null +++ b/user-code/pot/julia/ArduinoTools.jl @@ -0,0 +1,189 @@ +module ArduinoTools + +using SerialPorts + + +function connectBoard(baudrate::Int64) # Automatically detects SerialPort and opens it + arr = list_serialports() # with given baudrate + port = arr[1] + ser = SerialPort(port,baudrate) # Caution: works in most cases... If doesn't, + sleep(2) # Use the openSerial() function + return ser +end + +# function openSerial(port::ASCIIString, baudrate::Int64) # starts serial communication +# ser = SerialPorts.SerialPort(port,baudrate) +# sleep(2) +# return ser +# end + +function closeSerial(ser::SerialPorts.SerialPort) # closes serial port + SerialPorts.close(ser) +end + +# function Write(ser::SerialPorts.SerialPort, str::ASCIIString) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +# function Write(ser::SerialPorts.SerialPort, str::UTF8String) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +function Read(ser::SerialPorts.SerialPort, bytes::Int64) # reads 'bytes' number of bytes from serial port + SerialPorts.read(ser,bytes) +end + +function ReadAvailable(ser::SerialPorts.SerialPort) # reads all available bytes from serial port + SerialPorts.readavailable(ser) +end + +function nbAvailable(ser::SerialPorts.SerialPort) # returns number of bytes available for reading + SerialPorts.nb_available(ser) +end + +function listSerialPorts() # returns array of serial port names on computer + SerialPorts.list_serialports() +end + +function pinMode(file_des::SerialPorts.SerialPort , pin_no::Int64 , mode::String) + # isascii(mode) && throw("Mode needs to be ascii") #This will throw an error if mode is not ascii + # m = uppercase(mode) # Prevent errors due to case differences + if mode == "INPUT" str = "Da"*string(Char(48+pin_no))*"0" end # Dan0 for INPUT + if mode == "OUTPUT" str = "Da"*string(Char(48+pin_no))*"1" end # Dan1 for OUTPUT + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 0 str = "Dw"*string(Char(48+pin_no))*"1" end # Dwn1 for HIGH + if val == 0 str = "Dw"*string(Char(48+pin_no))*"0" end # Dwn0 for LOW + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "Dr"*string(Char(48+pin_no)) # Drn to read digital pin n + str = ascii(str) # Convert UTF8String to ASCIIString + write(file_des,str) + sleep(0.01) # Delay the next step by 10 milliseconds + c = read(file_des,1) # Read one byte from SerialPort + n = parse(Int,c) # Convert the received string into integer + return n # Return the integer +end + +function analogWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 255 val = 255 end # Make sure val isn't beyond limits + if val < 0 val = 0 end + c = Char(val) # Conversion of val into character + d = string(c) # Converting character to string + s = "W"*string(Char(48+pin_no))*d # Wnm for analog value m on pin n + write(file_des,s) +end + +function analogRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "A"*string(Char(48+pin_no)) #"An" for analog value on pin n + write(file_des,str) + sleep(0.1) # Delay next step by 100 milliseconds + n = bytesavailable(file_des) # Get number of bytes in input buffer + s = read(file_des, n) # Read n bytes from SerialPort + iolit = IOBuffer(s) + num = read(iolit, Int16) + # num = reinterpret(Int16, s) + # println(sizeof(num)) + # println(num[1]) + # @printf("value = %d", Int(num)) + # close(iolit) + + # typeof(s) + # k = parse(Int,s) # Convert String to integer + return num # Return the integer +end + +function DCMotorSetup(file_des::SerialPorts.SerialPort, driver_type::Int64, motor_no::Int64, pin1::Int64, pin2::Int64) + println("Initializing motor") + if (driver_type == 1) # adafruit + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 2) # L298 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 3) # L293 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"0" + end + write(file_des,code_sent) + sleep(0.1) # sleep for a tenth of a second + s = readavailable(file_des) # read all available bytes from input buffer + if s == "OK" + println("Motor Setup Successful") + else + println("Motor Setup unsuccessful") + end +end # end function + +function DCMotorRun(file_des::SerialPorts.SerialPort, motor_no::Int64, speed::Int64) + sgn = sign(speed) # Checking sign of speed to set direction + if sgn >= 0 + direction = "1" + else + direction = "0" + end + speed = abs(speed) # Dropping the sign + if speed > 255 speed = 255 end # Make sure speed is not beyond limit + code_sent = "M"*string(motor_no)*direction*string(Char(speed)) + write(file_des,code_sent) +end # end function + +function DCMotorRelease(file_des::SerialPorts.SerialPort, motor_no::Int64) + code_sent = "M"*string(motor_no)*"1"*string(Char(0)) + write(file_des,code_sent) # Stops the motor first + sleep(0.1) # Delay of 0.1 second + code_sent = "M"*string(motor_no)*"r" + write(file_des,code_sent) # Releases the motor +end + +function ServoAttach(file_des::SerialPorts.SerialPort, servo_no::Int64) + println("Initializing servo") + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function ServoMove(file_des::SerialPorts.SerialPort, servo_no::Int64, val::Int64) + if val < 0 val = 0 end + if val >180 val = 180 end + pin = "Sw"*string(servo_no)*string(Char(val)) + write(file_des,pin) +end + +function ServoDetach(file_des::SerialPorts.SerialPort, servo_no::Int64) + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function MPUReadin(file_des::SerialPorts.SerialPort) + cmd = "F" + write(file_des,cmd) + analog_times = [] + sleep(0.03) + s = readavailable(file_des) + sarr = split(s,"/") + for i in 1:length(sarr) + push!(analog_times,parse(Int,sarr[i])) + end + return analog_times +end + +export connectBoard,openSerial,closeSerial,Write,Read,ReadAvailable,nbAvailable,listSerialPorts,pinMode,digiWrite,digiRead,analogWrite,analogRead,DCMotorSetup,DCMotorRun,DCMotorRelease,ServoAttach,ServoMove,ServoDetach,MPUReadin + +end # module diff --git a/user-code/pot/julia/pot-threshold.jl b/user-code/pot/julia/pot-threshold.jl index c369dbc..77ca972 100644 --- a/user-code/pot/julia/pot-threshold.jl +++ b/user-code/pot/julia/pot-threshold.jl @@ -1,24 +1,24 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -pinMode(ser,9,"OUTPUT") -pinMode(ser,10,"OUTPUT") -pinMode(ser,11,"OUTPUT") +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.pinMode(ser,9,"OUTPUT") +ArduinoTools.pinMode(ser,10,"OUTPUT") +ArduinoTools.pinMode(ser,11,"OUTPUT") for i = 1:10 - p = analogRead(ser,2) + p = ArduinoTools.analogRead(ser,2) if p>=0 && p<320 - digiWrite(ser,11,1) + ArduinoTools.digiWrite(ser,11,1) sleep(1) - digiWrite(ser,11,0) + ArduinoTools.digiWrite(ser,11,0) elseif p>=320 && p<=900 - digiWrite(ser,10,1) + ArduinoTools.digiWrite(ser,10,1) sleep(1) - digiWrite(ser,10,0) + ArduinoTools.digiWrite(ser,10,0) elseif p>900 && p<=1023 - digiWrite(ser,9,1) + ArduinoTools.digiWrite(ser,9,1) sleep(1) - digiWrite(ser,9,0) + ArduinoTools.digiWrite(ser,9,0) end end close(ser) diff --git a/user-code/pot/python/Arduino/Arduino.py b/user-code/pot/python/Arduino/Arduino.py new file mode 100644 index 0000000..b28f43c --- /dev/null +++ b/user-code/pot/python/Arduino/Arduino.py @@ -0,0 +1,327 @@ + +import sys +import serial +from serial import Serial +from serial.tools.list_ports import comports +from time import sleep + +p1=0 #Initial Position of servo motor +p2=0 #Final Position of servo motor + +a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] +class Initialization: + def __init__(self): + pass + + def locateport(self): + if sys.platform.startswith('win'): + port ='' + ports = list(comports()) + for i in ports: + for j in i: + if 'Arduino' in j: + port = i[0] + elif sys.platform.startswith('linux'): + b=[] + port ='' + ports = list(comports()) + for i in range(len(ports)): + for x in range(7): + portname="/dev/ttyACM"+str(x) + if ports[i][0]==portname: + b.append(ports[i][0]) + port=b[0] + return port + + def open_serial(self,ard_no, PortNo,baudrate): + #global ser + if PortNo =='': + sys.exit("aa..error..! arduino not found") + else: + self.ser = Serial(PortNo,baudrate) + sleep(2) + self.checkfirmware() + + def close_serial(self): + #global ser + self.ser.close() + + def checkfirmware(self): + print ("Check Firm Ware") + #global ser + self.ser.write(bytes([118])) #chr(118) + try: + x=self.ser.read() + #print(x) + #x=self.ser.read() + #print(x) + if x==b'o': + try: + x=self.ser.read() + except: + sys.exit("aa..! error..! it seems correct firmware not loaded") + else: + sys.exit("aa..! error..! it seems correct firmware not loaded") + except: + sys.exit("aa..! error..! it seems correct firmware not loaded") + + +class Arduino(Initialization): + def __init__(self): + print ("Init Arduino") + #self.baudrate=0 + #self.ard_no=1 + #self.PortNo=0 + #self.pin=0 + #self.val=0 + #self.mode=0 + #self.mno=0 + #self.pin1=0 + #self.pin2=0 + #self.servo=0 + + + + def cmd_digital_out(self,ard_no,pin,val): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="D"+"a"+a[pin]+"1" + self.ser.write(cmd.encode('utf-8')) + cmd="" + cmd="D"+"w"+a[pin]+str(val) + self.ser.write(cmd.encode('utf-8')) + + def cmd_digital_in(self,ard_no,pin): + b=[] + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="D"+"a"+a[pin]+"0" + self.ser.write(cmd.encode('utf-8')) + cmd="" + cmd="D"+"r"+a[pin] + self.ser.write(cmd.encode('utf-8')) + a=self.ser.read() + return(a.decode('UTF-8')) + + def cmd_analog_in(self,ard_no,pin): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="A"+a[pin] + self.ser.write(cmd.encode('utf-8')) + analog_times=[] + b1=ord(self.ser.read(1)) + b2=ord(self.ser.read(1)) + a=b1+b2*256 + #a=ser.read() + return(a) + #return(int((1023-0)*int(ord(a))/(255-0))) + + + def cmd_analog_out(self,ard_no, pin, val): + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd = "W" + a[pin] + chr(val) + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_setup(self,ard_no,mode,mno,pin1,pin2): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="C"+a[mno]+a[pin1]+a[pin2]+a[mode] + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_run(self,ard_no,mno,val): + cmd="" + if(val <0): + dirc=0 + else: + dirc=1 + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="M"+a[mno]+a[dirc]+chr(abs(val)) + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_release(self,ard_no,mno): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="M"+a[mno]+"r" + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_attach(self,ard_no,servo): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"a"+a[servo] + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_detach(self,ard_no,servo): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"d"+a[servo] + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_move(self,ard_no,servo,angle): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"w"+a[servo]+chr(angle) + self.ser.write(cmd.encode('utf-8')) + + + + +#For PISO shift register + def cmd_shift_in(self,dataPin,clockPin,ledPin,clockLed): + value=[0 for _ in range(0,8)] + #print value + value2=[value for _ in range(0,8)] + #print value2 + for i in range(0,8): + so= self.cmd_digital_in(1,dataPin) #Reads serial out of IC + print (so) + if so=='1': + self.cmd_digital_out(1,ledPin,1) + sleep(0.1) + else: + self.cmd_digital_out(1,ledPin,0) + sleep(0.1) + value2[i][i]=int(so) + #performs value=value|value2[i] + for j in range(0,8): + if value[j]==1 or value2[i][j]==1: + value[j]=1 + else: + value[j]=0 + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockLed,1) + sleep(0.5) + self.cmd_digital_out(1,clockPin,0) + self.cmd_digital_out(1,clockLed,0) #clockLED: Led indicating clock pulses + sleep(0.4) + #after every clock pulse, 1 right shift occurs for every bit + #thus after 8 clock pulses, the entire parallel input is shifted out, + #and obtained at the dataPin, one bit per clock pulse + #Thus we get the bit by bit serial output of the Parallel Load + print (value) + + + + +#For PISO shift register +#shift in for n bits + def cmd_shift_in_n(self,dataPin,clockPin,ledPin,clockLed,numBits): + n=numBits #no. of bits + value=[0 for _ in range(0,n)] #a list of n elements, all 0s, to store the n bits of the inputs together + value2=[value for _ in range(0,n)] #a list of lists, analogous to nxn array of all 0s + for i in range(0,n): #n iterations since n bit input is given + so=self.cmd_digital_in(1,dataPin) + if so=='1': + self.cmd_digital_out(1,ledPin,1) + sleep(0.1) + else: + self.cmd_digital_out(1,ledPin,0) + sleep(0.1) + value2[i][i]=int(so) + #performs value=value|value2[i] + for j in range(0,n): + if value[j]==1 or value2[i][j]==1: + value[j]=1 + else: + value[j]=0 + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockLed,1) + sleep(0.5) + self.cmd_digital_out(1,clockPin,0) + self.cmd_digital_out(1,clockLed,0) #clockLED: Led indicating clock pulses + sleep(0.4) + print (value) + + + + + +#For SIPO shift register + def cmd_shift_out(self,dataPin,clockPin,bitOrder,val): + val2=0 + mat=[] + if bitOrder=='MSBFIRST': + #to create identity matrix + for i in range(0,8): + matsub=[0 for _ in range(0,8)] + matsub[i]=1 + mat.append(matsub) + else: + #to create horizontally flipped identity matrix + for i in range(0,8): + matsub=[0 for _ in range(0,8)] + matsub[7-i]=1 + mat.append(matsub) + for i in range(0,8): + #performs & operation on corresponding elements of list + for x,y in zip(val,mat[i]): + if x==1 and y==1: + val2=1 + break + else: + val2=0 + self.cmd_digital_out(1,dataPin,val2) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + + + +#For SIPO shift register + def cmd_shift_out_(self,dataPin,clockPin,inPin): + print ("Give serial input: ") + sleep(0.25) + self.cmd_digital_out(1,dataPin,self.cmd_digital_in(1,inPin)) #if inPin is HIGH, + #i.e. if input is given, write HIGH on Serial In Pin of IC + print("Serial input stored: ") + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) #One clock pulse + sleep(0.15) + + + + + +#For SIPO shift register +#shift out for n bits + def cmd_shift_out_n(self,dataPin,clockPin,bitOrder,val,numBits): + n=int(numBits) #number of bits + if (n%8)==0: + p=n + else: + p=(8*(n/8))+8 + val1=[0 for _ in range(0,n)] #output matrix. + #If all elements of the matrix are 0, + #output pinstate will be 0 (i.e LOW). + #If 1 or more elements of the matrix is 1, + #output pinstate will be 1 (i.e HIGH) + val2=0 + mat=[] + if bitOrder=='MSBFIRST': + for i in range(0,n): + matsub=[0 for _ in range(0,n)] + matsub[i]=1 + mat.append(matsub) + else: + for i in range(0,n): + matsub=[0 for _ in range(0,n)] + matsub[(n-1)-i]=1 + mat.append(matsub) + for j in range(0,(p-n)): #do nothing for the first (p-n) clock pulses + self.cmd_digital_out(1,dataPin,0) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + for i in range(0,n): #shift for last n clock pulses + #to perform val & mat[i] + for x,y in zip(val,mat[i]): + if x==1 and y==1: + val2=1 + break + else: + val2=0 + print (val2,) + self.cmd_digital_out(1,dataPin,val2) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + + + + diff --git a/user-code/pot/python/Arduino/__init__.py b/user-code/pot/python/Arduino/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/user-code/pot/python/Arduino/__init__.py diff --git a/user-code/pot/python/Arduino/__pycache__/Arduino.cpython-38.pyc b/user-code/pot/python/Arduino/__pycache__/Arduino.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..dafdab7 --- /dev/null +++ b/user-code/pot/python/Arduino/__pycache__/Arduino.cpython-38.pyc diff --git a/user-code/pot/python/Arduino/__pycache__/__init__.cpython-38.pyc b/user-code/pot/python/Arduino/__pycache__/__init__.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..ccbb74a --- /dev/null +++ b/user-code/pot/python/Arduino/__pycache__/__init__.cpython-38.pyc diff --git a/user-code/push/OpenModelica/led-push-button.mo b/user-code/push/OpenModelica/led-push-button.mo index b649a37..cc18478 100644 --- a/user-code/push/OpenModelica/led-push-button.mo +++ b/user-code/push/OpenModelica/led-push-button.mo @@ -8,16 +8,18 @@ model led_push_button "Conrolling LED with PushButton" Integer c_ok(fixed = false);
algorithm
when initial() then
- ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200";
+ ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200";
end when;
if ok <> 0 then
strm.print("Unable to open serial port, please check");
else
digital_in := sComm.cmd_digital_in(1, 12) "Read from digital pin 12";
if digital_in == 0 then
+ strm.print("LOW");
digital_out := sComm.cmd_digital_out(1, 9, 0) "This will turn OFF the blue LED";
sComm.delay(200);
else
+ strm.print("HIGH");
digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn ON the blue LED";
sComm.delay(200);
end if;
@@ -29,4 +31,4 @@ algorithm c_ok := sComm.close_serial(1) "To close the connection safely";
end when;
annotation(experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-6, Interval = 0.01));
-end led_push_button;
\ No newline at end of file +end led_push_button;
diff --git a/user-code/push/OpenModelica/push-button-status.mo b/user-code/push/OpenModelica/push-button-status.mo index 82e8552..22f6b74 100644 --- a/user-code/push/OpenModelica/push-button-status.mo +++ b/user-code/push/OpenModelica/push-button-status.mo @@ -8,18 +8,16 @@ model push_button_status "Checking Status of PushButton" Integer c_ok(fixed = false);
algorithm
when initial() then
- ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200";
+ ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200";
end when;
if ok <> 0 then
strm.print("Unable to open serial port, please check");
else
digital_in := sComm.cmd_digital_in(1, 12);
if digital_in == 0 then
- digital_out := sComm.cmd_digital_out(1, 9, 0) "This will turn OFF the blue LED";
strm.print("LOW");
sComm.delay(200);
else
- digital_out := sComm.cmd_digital_out(1, 9, 1) "This will turn ON the blue LED";
strm.print("HIGH");
sComm.delay(200);
end if;
@@ -31,4 +29,4 @@ algorithm end when;
//sComm.cmd_arduino_meter(digital_in);
annotation(experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-6, Interval = 0.01));
-end push_button_status;
\ No newline at end of file +end push_button_status;
diff --git a/user-code/push/julia/ArduinoTools.jl b/user-code/push/julia/ArduinoTools.jl new file mode 100644 index 0000000..7137294 --- /dev/null +++ b/user-code/push/julia/ArduinoTools.jl @@ -0,0 +1,189 @@ +module ArduinoTools + +using SerialPorts + + +function connectBoard(baudrate::Int64) # Automatically detects SerialPort and opens it + arr = list_serialports() # with given baudrate + port = arr[1] + ser = SerialPort(port,baudrate) # Caution: works in most cases... If doesn't, + sleep(2) # Use the openSerial() function + return ser +end + +# function openSerial(port::ASCIIString, baudrate::Int64) # starts serial communication +# ser = SerialPorts.SerialPort(port,baudrate) +# sleep(2) +# return ser +# end + +function closeSerial(ser::SerialPorts.SerialPort) # closes serial port + SerialPorts.close(ser) +end + +# function Write(ser::SerialPorts.SerialPort, str::ASCIIString) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +# function Write(ser::SerialPorts.SerialPort, str::UTF8String) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +function Read(ser::SerialPorts.SerialPort, bytes::Int64) # reads 'bytes' number of bytes from serial port + SerialPorts.read(ser,bytes) +end + +function ReadAvailable(ser::SerialPorts.SerialPort) # reads all available bytes from serial port + SerialPorts.readavailable(ser) +end + +function nbAvailable(ser::SerialPorts.SerialPort) # returns number of bytes available for reading + SerialPorts.nb_available(ser) +end + +function listSerialPorts() # returns array of serial port names on computer + SerialPorts.list_serialports() +end + +function pinMode(file_des::SerialPorts.SerialPort , pin_no::Int64 , mode::String) + # isascii(mode) && throw("Mode needs to be ascii") #This will throw an error if mode is not ascii + # m = uppercase(mode) # Prevent errors due to case differences + if mode == "INPUT" str = "Da"*string(Char(48+pin_no))*"0" end # Dan0 for INPUT + if mode == "OUTPUT" str = "Da"*string(Char(48+pin_no))*"1" end # Dan1 for OUTPUT + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 0 str = "Dw"*string(Char(48+pin_no))*"1" end # Dwn1 for HIGH + if val == 0 str = "Dw"*string(Char(48+pin_no))*"0" end # Dwn0 for LOW + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "Dr"*string(Char(48+pin_no)) # Drn to read digital pin n + str = ascii(str) # Convert UTF8String to ASCIIString + write(file_des,str) + sleep(0.01) # Delay the next step by 10 milliseconds + c = read(file_des,1) # Read one byte from SerialPort + n = parse(Int,c) # Convert the received string into integer + return n # Return the integer +end + +function analogWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 255 val = 255 end # Make sure val isn't beyond limits + if val < 0 val = 0 end + c = Char(val) # Conversion of val into character + d = string(c) # Converting character to string + s = "W"*string(Char(48+pin_no))*d # Wnm for analog value m on pin n + write(file_des,s) +end + +function analogRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "A"*string(Char(48+pin_no)) #"An" for analog value on pin n + write(file_des,str) + sleep(0.1) # Delay next step by 100 milliseconds + n = bytesavailable(file_des) # Get number of bytes in input buffer + s = read(file_des, n) # Read n bytes from SerialPort + iolit = IOBuffer(s) + num = read(iolit, Int16) + # num = reinterpret(Int16, s) + # println(sizeof(num)) + # println(num[1]) + # @printf("value = %d", Int(num)) + # close(iolit) + + # typeof(s) + # k = parse(Int,s) # Convert String to integer + return num # Return the integer +end + +function DCMotorSetup(file_des::SerialPorts.SerialPort, driver_type::Int64, motor_no::Int64, pin1::Int64, pin2::Int64) + println("Initializing motor") + if (driver_type == 1) # adafruit + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 2) # L298 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 3) # L293 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"0" + end + write(file_des,code_sent) + sleep(0.1) # sleep for a tenth of a second + s = readavailable(file_des) # read all available bytes from input buffer + if s == "OK" + println("Motor Setup Successful") + else + println("Motor Setup unsuccessful") + end +end # end function + +function DCMotorRun(file_des::SerialPorts.SerialPort, motor_no::Int64, speed::Int64) + sgn = sign(speed) # Checking sign of speed to set direction + if sgn >= 0 + direction = "1" + else + direction = "0" + end + speed = abs(speed) # Dropping the sign + if speed > 255 speed = 255 end # Make sure speed is not beyond limit + code_sent = "M"*string(motor_no)*direction*string(Char(speed)) + write(file_des,code_sent) +end # end function + +function DCMotorRelease(file_des::SerialPorts.SerialPort, motor_no::Int64) + code_sent = "M"*string(motor_no)*"1"*string(Char(0)) + write(file_des,code_sent) # Stops the motor first + sleep(0.1) # Delay of 0.1 second + code_sent = "M"*string(motor_no)*"r" + write(file_des,code_sent) # Releases the motor +end + +function ServoAttach(file_des::SerialPorts.SerialPort, servo_no::Int64) + println("Initializing servo") + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function ServoMove(file_des::SerialPorts.SerialPort, servo_no::Int64, val::Int64) + if val < 0 val = 0 end + if val >180 val = 180 end + pin = "Sw"*string(servo_no)*string(Char(val)) + write(file_des,pin) +end + +function ServoDetach(file_des::SerialPorts.SerialPort, servo_no::Int64) + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function MPUReadin(file_des::SerialPorts.SerialPort) + cmd = "F" + write(file_des,cmd) + analog_times = [] + sleep(0.03) + s = readavailable(file_des) + sarr = split(s,"/") + for i in 1:length(sarr) + push!(analog_times,parse(Int,sarr[i])) + end + return analog_times +end + +export connectBoard,openSerial,closeSerial,Write,Read,ReadAvailable,nbAvailable,listSerialPorts,pinMode,digiWrite,digiRead,analogWrite,analogRead,DCMotorSetup,DCMotorRun,DCMotorRelease,ServoAttach,ServoMove,ServoDetach,MPUReadin + +end # module diff --git a/user-code/push/julia/led-push-button.jl b/user-code/push/julia/led-push-button.jl index 1bc2b40..568c223 100644 --- a/user-code/push/julia/led-push-button.jl +++ b/user-code/push/julia/led-push-button.jl @@ -1,15 +1,15 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -pinMode(ser,9,"OUTPUT") -pinMode(ser,12,"INPUT") +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.pinMode(ser,9,"OUTPUT") +ArduinoTools.pinMode(ser,12,"INPUT") for i = 1:200 - p = digiRead(ser,12) + p = ArduinoTools.digiRead(ser,12) if p == 0 - digiWrite(ser,9,0) + ArduinoTools.digiWrite(ser,9,0) else - digiWrite(ser,9,1) + ArduinoTools.digiWrite(ser,9,1) end end close(ser) diff --git a/user-code/push/julia/push-button-status.jl b/user-code/push/julia/push-button-status.jl index a748af1..6dcc1d9 100644 --- a/user-code/push/julia/push-button-status.jl +++ b/user-code/push/julia/push-button-status.jl @@ -1,10 +1,10 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -pinMode(ser,12,"INPUT") +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.pinMode(ser,12,"INPUT") for i = 1:100 - p = digiRead(ser,12) + p = ArduinoTools.digiRead(ser,12) println(p) end close(ser) diff --git a/user-code/servo/julia/ArduinoTools.jl b/user-code/servo/julia/ArduinoTools.jl new file mode 100644 index 0000000..7137294 --- /dev/null +++ b/user-code/servo/julia/ArduinoTools.jl @@ -0,0 +1,189 @@ +module ArduinoTools + +using SerialPorts + + +function connectBoard(baudrate::Int64) # Automatically detects SerialPort and opens it + arr = list_serialports() # with given baudrate + port = arr[1] + ser = SerialPort(port,baudrate) # Caution: works in most cases... If doesn't, + sleep(2) # Use the openSerial() function + return ser +end + +# function openSerial(port::ASCIIString, baudrate::Int64) # starts serial communication +# ser = SerialPorts.SerialPort(port,baudrate) +# sleep(2) +# return ser +# end + +function closeSerial(ser::SerialPorts.SerialPort) # closes serial port + SerialPorts.close(ser) +end + +# function Write(ser::SerialPorts.SerialPort, str::ASCIIString) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +# function Write(ser::SerialPorts.SerialPort, str::UTF8String) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +function Read(ser::SerialPorts.SerialPort, bytes::Int64) # reads 'bytes' number of bytes from serial port + SerialPorts.read(ser,bytes) +end + +function ReadAvailable(ser::SerialPorts.SerialPort) # reads all available bytes from serial port + SerialPorts.readavailable(ser) +end + +function nbAvailable(ser::SerialPorts.SerialPort) # returns number of bytes available for reading + SerialPorts.nb_available(ser) +end + +function listSerialPorts() # returns array of serial port names on computer + SerialPorts.list_serialports() +end + +function pinMode(file_des::SerialPorts.SerialPort , pin_no::Int64 , mode::String) + # isascii(mode) && throw("Mode needs to be ascii") #This will throw an error if mode is not ascii + # m = uppercase(mode) # Prevent errors due to case differences + if mode == "INPUT" str = "Da"*string(Char(48+pin_no))*"0" end # Dan0 for INPUT + if mode == "OUTPUT" str = "Da"*string(Char(48+pin_no))*"1" end # Dan1 for OUTPUT + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 0 str = "Dw"*string(Char(48+pin_no))*"1" end # Dwn1 for HIGH + if val == 0 str = "Dw"*string(Char(48+pin_no))*"0" end # Dwn0 for LOW + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "Dr"*string(Char(48+pin_no)) # Drn to read digital pin n + str = ascii(str) # Convert UTF8String to ASCIIString + write(file_des,str) + sleep(0.01) # Delay the next step by 10 milliseconds + c = read(file_des,1) # Read one byte from SerialPort + n = parse(Int,c) # Convert the received string into integer + return n # Return the integer +end + +function analogWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 255 val = 255 end # Make sure val isn't beyond limits + if val < 0 val = 0 end + c = Char(val) # Conversion of val into character + d = string(c) # Converting character to string + s = "W"*string(Char(48+pin_no))*d # Wnm for analog value m on pin n + write(file_des,s) +end + +function analogRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "A"*string(Char(48+pin_no)) #"An" for analog value on pin n + write(file_des,str) + sleep(0.1) # Delay next step by 100 milliseconds + n = bytesavailable(file_des) # Get number of bytes in input buffer + s = read(file_des, n) # Read n bytes from SerialPort + iolit = IOBuffer(s) + num = read(iolit, Int16) + # num = reinterpret(Int16, s) + # println(sizeof(num)) + # println(num[1]) + # @printf("value = %d", Int(num)) + # close(iolit) + + # typeof(s) + # k = parse(Int,s) # Convert String to integer + return num # Return the integer +end + +function DCMotorSetup(file_des::SerialPorts.SerialPort, driver_type::Int64, motor_no::Int64, pin1::Int64, pin2::Int64) + println("Initializing motor") + if (driver_type == 1) # adafruit + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 2) # L298 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 3) # L293 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"0" + end + write(file_des,code_sent) + sleep(0.1) # sleep for a tenth of a second + s = readavailable(file_des) # read all available bytes from input buffer + if s == "OK" + println("Motor Setup Successful") + else + println("Motor Setup unsuccessful") + end +end # end function + +function DCMotorRun(file_des::SerialPorts.SerialPort, motor_no::Int64, speed::Int64) + sgn = sign(speed) # Checking sign of speed to set direction + if sgn >= 0 + direction = "1" + else + direction = "0" + end + speed = abs(speed) # Dropping the sign + if speed > 255 speed = 255 end # Make sure speed is not beyond limit + code_sent = "M"*string(motor_no)*direction*string(Char(speed)) + write(file_des,code_sent) +end # end function + +function DCMotorRelease(file_des::SerialPorts.SerialPort, motor_no::Int64) + code_sent = "M"*string(motor_no)*"1"*string(Char(0)) + write(file_des,code_sent) # Stops the motor first + sleep(0.1) # Delay of 0.1 second + code_sent = "M"*string(motor_no)*"r" + write(file_des,code_sent) # Releases the motor +end + +function ServoAttach(file_des::SerialPorts.SerialPort, servo_no::Int64) + println("Initializing servo") + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function ServoMove(file_des::SerialPorts.SerialPort, servo_no::Int64, val::Int64) + if val < 0 val = 0 end + if val >180 val = 180 end + pin = "Sw"*string(servo_no)*string(Char(val)) + write(file_des,pin) +end + +function ServoDetach(file_des::SerialPorts.SerialPort, servo_no::Int64) + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function MPUReadin(file_des::SerialPorts.SerialPort) + cmd = "F" + write(file_des,cmd) + analog_times = [] + sleep(0.03) + s = readavailable(file_des) + sarr = split(s,"/") + for i in 1:length(sarr) + push!(analog_times,parse(Int,sarr[i])) + end + return analog_times +end + +export connectBoard,openSerial,closeSerial,Write,Read,ReadAvailable,nbAvailable,listSerialPorts,pinMode,digiWrite,digiRead,analogWrite,analogRead,DCMotorSetup,DCMotorRun,DCMotorRelease,ServoAttach,ServoMove,ServoDetach,MPUReadin + +end # module diff --git a/user-code/servo/julia/servo-init.jl b/user-code/servo/julia/servo-init.jl index cbb5608..60fae1c 100644 --- a/user-code/servo/julia/servo-init.jl +++ b/user-code/servo/julia/servo-init.jl @@ -1,8 +1,8 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -ServoAttach(ser,1) -ServoMove(ser,1,30) +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.ServoAttach(ser,1) +ArduinoTools.ServoMove(ser,1,30) sleep(1) close(ser) diff --git a/user-code/servo/julia/servo-loop.jl b/user-code/servo/julia/servo-loop.jl index 5d90c70..2bacfa7 100644 --- a/user-code/servo/julia/servo-loop.jl +++ b/user-code/servo/julia/servo-loop.jl @@ -1,13 +1,13 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -ServoAttach(ser,1) +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.ServoAttach(ser,1) sleep(1) angle = 20 for i = 1:9 - ServoMove(ser,1,angle*i) + ArduinoTools.ServoMove(ser,1,angle*i) sleep(1) end -ServoDetach(ser,1) +ArduinoTools.ServoDetach(ser,1) close(ser) diff --git a/user-code/servo/julia/servo-pot.jl b/user-code/servo/julia/servo-pot.jl index 590c582..523b03a 100644 --- a/user-code/servo/julia/servo-pot.jl +++ b/user-code/servo/julia/servo-pot.jl @@ -1,14 +1,14 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -ServoAttach(ser,1) +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.ServoAttach(ser,1) for i = 1:500 - p = analogRead(ser,2) + p = ArduinoTools.analogRead(ser,2) p = p*(180/1023) q = round(Int,floor(p)) - ServoMove(ser,1,q) + ArduinoTools.ServoMove(ser,1,q) sleep(0.5) end -ServoDetach(ser,1) +ArduinoTools.ServoDetach(ser,1) close(ser) diff --git a/user-code/servo/julia/servo-reverse.jl b/user-code/servo/julia/servo-reverse.jl index d07f816..36d9ab6 100644 --- a/user-code/servo/julia/servo-reverse.jl +++ b/user-code/servo/julia/servo-reverse.jl @@ -1,10 +1,10 @@ using SerialPorts include("ArduinoTools.jl") -ser = connectBoard(115200) -ServoAttach(ser,1) -ServoMove(ser,1,90) +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.ServoAttach(ser,1) +ArduinoTools.ServoMove(ser,1,90) sleep(1) -ServoMove(ser,1,45) +ArduinoTools.ServoMove(ser,1,45) sleep(1) close(ser) diff --git a/user-code/sw-env/sw-env.tex b/user-code/sw-env/sw-env.tex index 1ea05da..a61a2f9 100644 --- a/user-code/sw-env/sw-env.tex +++ b/user-code/sw-env/sw-env.tex @@ -10,26 +10,26 @@ \newcommand{\LocSWardbrief}[1]{{\tt \seqsplit{
Origin/user-code/sw-env/arduino/#1}}, see \fnrefp{fn:file-loc}}
-\newcommand{\LocSWchkcode}{\Origin/tools}
+\newcommand{\LocSWchkcode}{\Origin/tools/scilab}
\newcommand{\LocSWchkbrief}[1]{{\tt \seqsplit{
- Origin/tools/#1}}, see \fnrefp{fn:file-loc}}
+ Origin/tools/scilab/#1}}, see \fnrefp{fn:file-loc}}
\newcommand{\LocSWfirmcode}{\Origin/tools/arduino-firmware}
\newcommand{\LocSWfirmbrief}[1]{{\tt \seqsplit{
Origin/tools/arduino-firmware/#1}}, see \fnrefp{fn:file-loc}}
-\newcommand{\LocFIMpycode}{\Origin/user-code/led/python} %added for python
+\newcommand{\LocFIMpycode}{\Origin/tools/python} %added for python
\newcommand{\LocFIMpybrief}[1]{{\tt \seqsplit{%
- Origin/user-code/led/python/#1}}, see \fnrefp{fn:file-loc}} % added for python
+ Origin/tools/python/#1}}, see \fnrefp{fn:file-loc}} % added for python
-\newcommand{\LocFIMjuliacode}{\Origin/user-code/led/julia} %added for julia
+\newcommand{\LocFIMjuliacode}{\Origin/tools/julia} %added for julia
\newcommand{\LocFIMjuliabrief}[1]{{\tt \seqsplit{%
- Origin/user-code/led/julia/#1}}, see \fnrefp{fn:file-loc}} % added for julia
+ Origin/tools/julia/#1}}, see \fnrefp{fn:file-loc}} % added for julia
%%%%%%OpenModelica Starts
-\newcommand{\LocFIMOpenModelicacode}{\Origin/user-code/led/OpenModelica} %added for OpenModelica
+\newcommand{\LocFIMOpenModelicacode}{\Origin/tools/openmodelica} %added for OpenModelica
\newcommand{\LocFIMOpenModelicabrief}[1]{{\tt \seqsplit{%
- Origin/user-code/led/OpenModelica/#1}}, see \fnrefp{fn:file-loc}} % added for OpenModelica
+ Origin/tools/openmodelica/#1}}, see \fnrefp{fn:file-loc}} % added for OpenModelica
%%%%%OpenModelica Ends
@@ -45,8 +45,8 @@ different purposes as per the requirement. For example, \item To run \arduino\ stand-alone, without waiting for any commands
from other software or hardware, for the specified time or until
power off
- \item To decode the commands sent by other software, such as OpenModelica,
- Julia, Python, \scilab, etc., through a serial port, and
+ \item To decode the commands sent by other software, such as Scilab, Python,
+ Julia, OpenModelica, etc., through a serial port, and
execute the given instructions %\item Combination of the above two
\end{itemize}
Next, we shall discuss Scilab and Xcos, which are open-source software
@@ -471,7 +471,7 @@ Arduino. All such add-on functionalities are added to \scilab\ using toolboxes. Just like we have different installation binaries of
\scilab\ for Windows and Linux, we have different toolboxes types for
Windows and Linux. The \scilab\ Arduino toolbox can be found inside
-the {\tt Origin/tools/windows} or {\tt Origin/tools/linux} directory,
+the {\tt Origin/tools/scilab/windows} or {\tt Origin/tools/scilab/linux} directory,
see \fnrefp{fn:file-loc}. Use the one depending upon
which operating system you are using. The \scilab\ codes for various
experiments mentioned throughout this book can be found in {\tt
@@ -496,7 +496,7 @@ Let us now see how to load the Scilab Arduino toolbox. \label{scilab-cd}
\end{figure}
\item Then, one has to browse to the toolbox folder
- {\tt Origin/tools/windows} or {\tt Origin/tools/linux}, as the case
+ {\tt Origin/tools/scilab/windows} or {\tt Origin/tools/scilab/linux}, as the case
may be, and click on, {\tt
Open}, as shown in \figref{scilab-browse}.
\begin{figure}
@@ -530,7 +530,7 @@ Let us now see how to load the Scilab Arduino toolbox. the workspace for any reason, you will have to execute this command
once again\footnote{Be careful
not to execute the {\tt clear} command. This will clear the loaded
- toolbox and you will have to execute the loader.sce file again.}
+ toolbox and you will have to execute the loader.sce file again.}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{\LocSWfig/loader.png}
@@ -620,7 +620,7 @@ Now let us test the functioning of the toolbox. \item Read into the Arduino IDE, the firmware \ardref{ard:firmware}.
\item Using the {\tt Upload} option of the Arduino IDE, load this
firmware on to the \arduino\ board.
- \item Inside the {\tt Origin/tools} directory, locate a file {\tt
+ \item Inside the {\tt Origin/tools/scilab} directory, locate a file {\tt
test\_firmware.sce}. This file will be used to test whether the
firmware is properly installed. This is an important step, as the
connection between the computer and Arduino breaks down sometimes.
@@ -630,7 +630,7 @@ Now let us test the functioning of the toolbox. the error. This test has to be done in case of difficulties.
\item In the \scilab\ console, type {\tt editor} and press the enter
key. This will launch the editor. Click on ``File'' menu and choose
- ``Open''. Browse to the directory {\tt Origin/tools} and choose the
+ ``Open''. Browse to the directory {\tt Origin/tools/scilab} and choose the
file {\tt test\_firmware.sce}. It will open
\sciref{sci:test-firmware}.
%The \scilab\ editor with this file open is as shown in \figref{test-code}.
@@ -649,7 +649,7 @@ Now let us test the functioning of the toolbox. {\LocSWchkcode/test_firmware.sce}
to
\begin{lstlisting}[style=nonumbers]
- h=open_serial(1,0,115200)
+ h = open_serial(1,0,115200);
\end{lstlisting}
\item To execute this code, on the menu bar, click on the {\tt
@@ -1079,13 +1079,13 @@ below: \subsection{Python Arduino toolbox}
Python, by default, does not have the capability to connect to Arduino.
All such add-on functionalities are added to Python using packages.
-The Python Arduino toolbox can be found inside the {\tt Origin/tools/windows} directory,
+The Python Arduino toolbox can be found inside the {\tt Origin/tools/python} directory,
see \fnrefp{fn:file-loc}. This toolbox is compatible for both of the operating systems: Windows and Linux.
The Python scripts (or codes) for various experiments mentioned throughout this book can be found in
{\tt Origin/user-code} directory. The {\tt user-code} directory will have many sub-directories as per the experiments.
In this book, we have created a package named "Arduino" in Python 3. This package is available at
-{\tt Origin/tools/windows}. This package makes use of the functions available in pyserial \cite{pySerial} to
+{\tt Origin/tools/python}. This package makes use of the functions available in pyserial \cite{pySerial} to
establish serial communication with Arduino. In this package, we have added functions required to run
various experiments on \arduino. Using this basic set of functions, the user can define other functions to operate
upon the Arduino. Please note that the "Arduino" package and the Arduino firmware given
@@ -1343,13 +1343,13 @@ is present in the list of packages being shown. To exit the interactive session, \subsection{Julia Arduino toolbox}
Julia, by default, does not have the capability to connect to Arduino.
All such add-on functionalities are added to Julia using toolboxes.
-The Julia-Arduino toolbox can be found inside the {\tt Origin/tools/windows} directory,
+The Julia-Arduino toolbox can be found inside the {\tt Origin/tools/julia} directory,
see \fnrefp{fn:file-loc}. This toolbox is compatible for both of the operating systems: Windows and Linux.
The Julia source files (or codes) for various experiments mentioned throughout this book can be found in
{\tt Origin/user-code} directory. The {\tt user-code} directory will have many sub-directories as per the experiments.
In this book, we have created a module named "ArduinoTools" in Julia. This module is available at
-{\tt Origin/tools/windows}. This module makes use of the functions available in the SerialPorts package to
+{\tt Origin/tools/julia}. This module makes use of the functions available in the SerialPorts package to
establish serial communication with Arduino. In this module, we have added functions required to run
various experiments on \arduino. Using this basic set of functions, the user can define other functions to operate
upon the Arduino. Please note that the module "ArduinoTools" and the Arduino firmware given
@@ -1566,9 +1566,8 @@ we would not have received this message. \subsection{OpenModelica Arduino toolbox}\label{load-om-toolbox}
OpenModelica, by default, does not have the capability to connect to Arduino.
-All such add-on functionalities are added to OpenModelica using toolboxes.
-The OpenModelica-Arduino toolbox can be found inside
-the {\tt Origin/tools/windows} or {\tt Origin/tools/linux} directory,
+All such add-on functionalities are added to OpenModelica using toolboxes.
+The OpenModelica Arduino toolbox can be found inside {\tt Origin/tools/\\openmodelica/windows} or {\tt Origin/tools/openmodelica/linux} directory,
see \fnrefp{fn:file-loc}. Use the one depending upon
which operating system you are using. The OpenModelica codes for various
experiments mentioned throughout this book can be found in {\tt Origin/user-code} directory. The {\tt user-code} directory will have
@@ -1584,15 +1583,15 @@ Let us now see how to load the OpenModelica Arduino toolbox. toolbox. To do so, go to the menu bar of OMEdit.
Click on {\tt File} and then click on
the {\tt Open Model/Library File(s)} option as shown in \figref{om-model-open}.
- \item Navigate to {\tt Origin/tools/windows/OpenModelica-Arduino}. select \\ {\tt Arduino.mo} and
- {\tt test\_firmware.mo}, and click Open.
+ \item Navigate to {\tt Origin/tools/openmodelica/windows} or {\tt Origin/tools/\\openmodelica/linux}, as the case maybe.
+ Select {\tt Arduino.mo} and \\{\tt test\_firmware.mo}, and click Open. The toolbox should now be loaded and available for use.
\item \label{itm:library} We will check whether the toolbox has been loaded successfully or not.
In OMEdit, under Libraries Browser, look for three new libraries: Arduino,
Modelica\_Synchronous, Modelica\_DeviceDrivers, and one model test\_firmware.mo.
If you are able to view these files, it means that OpenModelica-Arduino toolbox has been loaded successfully.
Please note that each time you launch OMEdit, you need to load this toolbox for
performing the experiments.
- \item The test\_firmware.mo in the step \ref{itm:library} is the same file which has been mentioned in \secref{om-firmware}.
+ \item The {\tt test\_firmware.mo} in the step \ref{itm:library} is the same file which has been mentioned in \secref{om-firmware}.
While following \secref{om-firmware}, the readers are advised to execute (or simulate) this file (or model).
\item \label{itm:locate} Now, we will locate the models for running the experiments in the upcoming chapters.
Under Libraries Browser, click on the arrow before Arduino to see the
@@ -1607,7 +1606,7 @@ Let us now see how to load the OpenModelica Arduino toolbox. are advised to locate the corresponding model by following the steps
numbered \ref{itm:locate} and \ref{itm:simulate} and simulate it.
\end{enumerate}
-The toolbox is now loaded and available for use.
+
\begin{figure}
diff --git a/user-code/thermistor-old/arduino/therm-buzzer/therm-buzzer.ino b/user-code/thermistor-old/arduino/therm-buzzer/therm-buzzer.ino deleted file mode 100644 index 831b670..0000000 --- a/user-code/thermistor-old/arduino/therm-buzzer/therm-buzzer.ino +++ /dev/null @@ -1,28 +0,0 @@ -int value; -int i; - -void setup() -{ - pinMode(3,OUTPUT); - Serial.begin(115200); - - for(i=1;i<100;i++) - { - value=analogRead(A4); //read value from thermistor - Serial.println(value); //display - - if(value>550) - { - digitalWrite(3,HIGH); // Turn ON buzzer - } - else - { - digitalWrite(3,LOW); // Turn OFF buzzer - } - delay(500); - } -} - -void loop() -{ -}
diff --git a/user-code/thermistor-old/arduino/therm-read/therm-read.ino b/user-code/thermistor-old/arduino/therm-read/therm-read.ino deleted file mode 100644 index 44405c1..0000000 --- a/user-code/thermistor-old/arduino/therm-read/therm-read.ino +++ /dev/null @@ -1,18 +0,0 @@ -int value; -int i; - -void setup() -{ - Serial.begin(115200); - for(i=1;i<=40;i++) - { - value=analogRead(A4); //read value from thermistor - Serial.println(value); //display - delay(500); - } - -} - -void loop() -{ -}
diff --git a/user-code/thermistor-old/figures/BUZZER Diagram.jpg b/user-code/thermistor-old/figures/BUZZER Diagram.jpg Binary files differdeleted file mode 100644 index 22650ca..0000000 --- a/user-code/thermistor-old/figures/BUZZER Diagram.jpg +++ /dev/null diff --git a/user-code/thermistor-old/figures/NTC-bead.jpg b/user-code/thermistor-old/figures/NTC-bead.jpg Binary files differdeleted file mode 100644 index c7c8b1a..0000000 --- a/user-code/thermistor-old/figures/NTC-bead.jpg +++ /dev/null diff --git a/user-code/thermistor-old/figures/THERMISTOR-Diagram.jpg b/user-code/thermistor-old/figures/THERMISTOR-Diagram.jpg Binary files differdeleted file mode 100644 index 83cdace..0000000 --- a/user-code/thermistor-old/figures/THERMISTOR-Diagram.jpg +++ /dev/null diff --git a/user-code/thermistor-old/figures/therm-buzzer-xcos.png b/user-code/thermistor-old/figures/therm-buzzer-xcos.png Binary files differdeleted file mode 100644 index ac24a74..0000000 --- a/user-code/thermistor-old/figures/therm-buzzer-xcos.png +++ /dev/null diff --git a/user-code/thermistor-old/figures/therm-buzzer.png b/user-code/thermistor-old/figures/therm-buzzer.png Binary files differdeleted file mode 100644 index 9cec909..0000000 --- a/user-code/thermistor-old/figures/therm-buzzer.png +++ /dev/null diff --git a/user-code/thermistor-old/figures/therm-read-xcos.png b/user-code/thermistor-old/figures/therm-read-xcos.png Binary files differdeleted file mode 100644 index b0f931c..0000000 --- a/user-code/thermistor-old/figures/therm-read-xcos.png +++ /dev/null diff --git a/user-code/thermistor-old/figures/therm-read.png b/user-code/thermistor-old/figures/therm-read.png Binary files differdeleted file mode 100644 index 5ebdb26..0000000 --- a/user-code/thermistor-old/figures/therm-read.png +++ /dev/null diff --git a/user-code/thermistor-old/figures/therm-sym.png b/user-code/thermistor-old/figures/therm-sym.png Binary files differdeleted file mode 100644 index 0be21aa..0000000 --- a/user-code/thermistor-old/figures/therm-sym.png +++ /dev/null diff --git a/user-code/thermistor-old/scilab/therm-buzzer-xcos.zcos b/user-code/thermistor-old/scilab/therm-buzzer-xcos.zcos Binary files differdeleted file mode 100644 index 2b8d5b3..0000000 --- a/user-code/thermistor-old/scilab/therm-buzzer-xcos.zcos +++ /dev/null diff --git a/user-code/thermistor-old/scilab/therm-buzzer.sce b/user-code/thermistor-old/scilab/therm-buzzer.sce deleted file mode 100644 index 31fac70..0000000 --- a/user-code/thermistor-old/scilab/therm-buzzer.sce +++ /dev/null @@ -1,13 +0,0 @@ -ok=open_serial(1,2,115200); // port 2, baudrate 115200
-if ok~=0 then error('Unable to open serial port, please check'); end
-for i=1:500 //Run for 500 iterations
- p=cmd_analog_in(1,4) // read analog pin 4 (thermistor)
- disp(p);
- if(p>550) // Setting Threshold value of 550
- cmd_digital_out(1,3,1) // Turn ON BUZZER
- else
- cmd_digital_out(1,3,0) // Turn OFF BUZZER
- end
- sleep(500);
-end
-close_serial(1)
diff --git a/user-code/thermistor-old/scilab/therm-read-xcos.zcos b/user-code/thermistor-old/scilab/therm-read-xcos.zcos Binary files differdeleted file mode 100644 index c853ae8..0000000 --- a/user-code/thermistor-old/scilab/therm-read-xcos.zcos +++ /dev/null diff --git a/user-code/thermistor-old/scilab/therm-read.sce b/user-code/thermistor-old/scilab/therm-read.sce deleted file mode 100644 index 9b124d3..0000000 --- a/user-code/thermistor-old/scilab/therm-read.sce +++ /dev/null @@ -1,9 +0,0 @@ -
-ok=open_serial(1,2,115200); // Port 2 with baudrate 115200
-if ok~=0 then error('Unable to open serial port. Please check') end
-for i=1:20 // Run for 20 iterations
- p=cmd_analog_in(1,4); // read analog pin 4 (thermistor)
- disp(p);
- sleep(500) // Delay of 500 milliseconds
-end
-c = close_serial(1) // close serial connection
diff --git a/user-code/thermistor-old/thermistor.tex b/user-code/thermistor-old/thermistor.tex deleted file mode 100644 index 432971b..0000000 --- a/user-code/thermistor-old/thermistor.tex +++ /dev/null @@ -1,226 +0,0 @@ -\chapter {Interfacing a Thermistor}
-\thispagestyle{empty}
-\label{thermistor}
-
-\newcommand{\LocTHERMfig}{\Origin/user-code/thermistor/figures}
-\newcommand{\LocTHERMscicode}{\Origin/user-code/thermistor/scilab}
-\newcommand{\LocTHERMscibrief}{Origin/user-code/thermistor/scilab}
-\newcommand{\LocTHERMardcode}{\Origin/user-code/thermistor/arduino}
-\newcommand{\LocTHERMardbrief}{Origin/user-code/thermistor/arduino}
-
-A thermistor is basically a temperature dependent/sensitive resistor. It falls under the category of semiconductor sensors. Depending on the temperature in the vicinity of the thermistor, its resistance changes. Thermistors are available in two types, NTC and PTC. NTC stands for Negative Temperature Coefficient and PTC means Positive Temperature Coefficient. In NTC thermistors the resistance decreases with increase in temperature and vice versa. Whereas, for PTC the resistance increases with an increase in temperature and vice versa. The temperature ranges over $-55^{\circ}$celsius to $+125^{\circ}$celsius
-
-Thermistors are available in shapes of bead, rod, flakes and discs. Due to their compact size and low cost, they have a wide application where rough temperature sensing is required. They however suffer from noise and need noise compensation. In this chapter we shall interface a thermistor with the \arduino\ board.
-
-\section{Preliminaries}
-A typical thermistor and its symbolic repersentation are shown in \ref{fig:therm} and \ref{fig:thermsym} respectively. The thermistor is available on the shield provided with the kit. It is a bead type thermistor. The thermistor is connected to the analog pin 4 of the \arduino\ board.
-
-The connections for this experiment are shown in \ref{fig:therm-conn}. However, the user doesn't need to connect any wire or component explicitly.
-
-
-\begin{figure}
-\centering
-\subfloat[Pictorial representation of a thermistor]{
-\includegraphics[width=\smfig]{\LocTHERMfig/NTC-bead.jpg}
-\label{fig:therm}} \hfill
-\subfloat[Symbolic representation of a thermistor]{
-\includegraphics[width=\smfig]{\LocTHERMfig/therm-sym.png}
-\label{fig:thermsym}}
-\caption{Thermistor}
-\end{figure}
-
-
-\begin{figure}
-\centering
-\includegraphics[width=\smfig]{\LocTHERMfig/THERMISTOR-Diagram.jpg}
-\caption{Thermistor connection diagram}
-\label{fig:therm-conn}
-\end{figure}
-
-\section{Reading thermistor from Arduino IDE}
-In this section we will learn how to read values from the thermistor connected at pin 4 of the \arduino\ board. We shall also see how to drive a buzzer depending upon the thermistor values.
-
-\begin{enumerate}
-\item A simple code to read the values from thermistor is given in \ardref{ard:therm-read}. The arduino IDE based command for the analog read functionality is given by.
-\lstinputlisting[firstline=9,lastline=9] {\LocTHERMardcode/therm-read/therm-read.ino}
-where {\tt A4} represents the analog pin 4 to be read. The read value is stored in variable {\tt value} and is displayed using \lstinputlisting[firstline=10,lastline=10] {\LocTHERMardcode/therm-read/therm-read.ino}
-The command on next line
-
-\lstinputlisting[firstline=11,lastline=11] {\LocTHERMardcode/therm-read/therm-read.ino}
- is used to put a delay of 500 milliseconds. This is to avoid very fast display of the read values. The entire reading and display operation is carried out 40 times.
-
-The values can be observed over the serial monitor. The numbers displayed range from 0 to 1023. The thermistor used has a resistance of 10k at room temperature. It is connected in a voltage divider form using another fixed 10k resistor. A voltage of 5 volts is applied accross the series combination of the thermistor and the fixed 10k resistor. Voltage accross the fixed resistor is sensed and is given to the ADC. Hence at room temperature, both the resistors offer 10k resistance resulting in dividing the 5V equally. Therefore, at room temperature you may get the output of ADC around 500. If a heating or cooling source is available, one can observe the increase or desrease in the ADC output. Although the thermistor is of NTC type, the ADC output increases with increase in temperature. This is because the voltage accross the fixed resistor is sensed.
-
-\item In this experiment, we will turn On and Off the buzzer depending on the temperature sensed by the thermistor. The program for this is available at \ardref{ard:therm-buzzer}. We shall use the ADC output to carry this out. The buzzer is connected on pin 3 which is a digital output pin. The ADC output value is displayed on the serial monitor. At the same time it is compared with value 550. Temperature of the thermistor is raised using body temperature by just holding it for a while. As soon as the ADC output exceeds 550, the buzzer is given a digital high signal, turning it On. A delay of half a second is introduced before the next value is read. This loop is executed 100 times.
-\end{enumerate}
-
-\begin{exercise}
-Carry out the following exercise:
-\begin{enumerate}
-\item Put the thermistor in the vicinity of an Ice bowl. Take care not to wet the shield while doing so. Note down the ADC output value for 0$^{\circ}$celsius.
-\end{enumerate}
-\end{exercise}
-
-\section {Reading thermistor from scilab scripts}
-In this section we will explain a few scilab scripts to read values from thermistor. The {\tt cmd\_analog\_in} command will be used to read from thermistor connected to an analog input pin. The experiments will be carried out using scilab.
-
-\begin{enumerate}
-\item \sciref{sci:therm-read} is used to read values from thermistor. First the serial port is opened using the command {\tt open\_serial} and passing the correct port number to it. The command {\tt cmd\_analog\_in} is used to read from the analog pin. The pin number is passed to this command as an argument. The read value is stored in some variable. The value is then displayed on the scilab console. A sleep of 500 millisecond is executed using the {\tt sleep} command and then the reading process is repeated 20 times by putting it in a {\tt for} loop. After the loop is finished the serial port is closed using the {\tt close\_serial} command.
-
-
-\item In this experiment we will use scilab script to turn on and off a buzzer using the thermistor values. The changes in the thermistor resistance is sensed as a voltage change between 0 to 5V. The ADC maps the thermistor voltage readings in to values ranging from 0 to 1023. This means 0 for 0 volts and 1023 for 5 volts. At room temperature the thermistor offers 10K resistance. The circuit arrangement makes the output voltage half of 5 volts i.e. around 2.5 volts. Hence the output is around 500. In this experiment we compare the ADC ouput value with 550 and as soon as the value exceeds 550 the buzzer is turned on. See \sciref{sci:therm-buzzer} for the complete code. We use {\tt if} loop to achieve this functionality. Command {\tt cmd\_digital\_out} is used to turn on and off the buzzer. Correct port number on which the buzzer is connected is passed to this command as an argument. The entire process is repeated 500 times.
-
-
-\begin{exercise}
-Carry out the exercise below:
-Convert the ADC output readings to degree celsius. There are two ways to do so.
-\begin{enumerate}
-\item In the first method,
-\begin{align}
-\frac{1}{T}=A+B*ln(R)+C*(ln(R))^3
-\label{therm-abc}
-\end{align}
-equation \ref{therm-abc} can be used if the value of A, B, C and R are known. The temperature T is in kelvin and thermistor resistance R is in ohms. The values of A, B and C can be found out by measuring thermistor resistance against three known values of temperatures. Once a set of three values of T and R are known it will result in three equations with three uknowns. The values of A, B, C can be found out by solving the three equations simultaneously. Once the values of A, B, C are known, the same equation can be used to directly convert resistance to kelvin. It can be then converted to celsius. This method is preffered when the temperature coefficient of thermistor is not known or is known very approximately. This method is bit cumbersome but can give accurate temperature conversion.
-
-\item In the second method,
-\begin{align}
-\frac{1}{T}=\frac{1}{T_0}+\frac{1}{\beta}*ln\left(\frac{R}{R_0}\right)
-\label{therm-beta}
-\end{align}
-equation \ref{therm-beta} can be used if the value of $\beta$ i.e. the Tempreature Coefficient of Resistance of the thermistor used is known. $R$ is the resistance of thermistor at temperature $T$ in kelvin. $R_0$ is the resistance of thermistor at room temperature $T_0$ in kelvin.
-\end{enumerate}
-\end{exercise}
-
-\end{enumerate}
-
-
-\section{Reading thermistor from Xcos}
-In this section we will carry out the same experiments discussed in the previous sections but through Xcos. One should go through \secref{sec:xcos-start} before continuing.
-
-\begin{enumerate}
-\item The xcos diagram for performing the simple thermistor read operation is as shown in \figref{fig:therm-read}. The location of the xcos file is mentioned in the caption of the figure.
-\begin{figure}
- \centering
- \includegraphics[width=\smfig]{\LocTHERMfig/therm-read-xcos.png}
- \caption[Xcos diagram to read thermistor values]{Xcos diagram to read thermistor values.
- This is what one sees when
- {\tt \LocTHERMscibrief/therm-read-xcos.zcos} is invoked.}
- \label{fig:therm-read}
- \end{figure}
-The parameters of the blocks can be changed by right clicking on the block and choosing {\tt Block Parameters}. One can also double click on the block. The values for each block is tabulated in \tabref{tab:therm-read}. All other parameters are to
- be left unchanged.
-
-\begin{table}
- \centering
- \caption{Xcos parameters to read thermistor}
- \label{tab:therm-read}
- \begin{tabular}{llc} \hline
- Name of the block & Parameter name & Value \\ \hline
- ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
- & Serial com port number & {\tt your port number} \\ \hline
- TIME\_SAMPLE & Duration of acquisition(s) & 100 \\
- & Sampling period(s) & 0.1 \\ \hline
- ANALOG\_READ\_SB & Analog Pin & 4 \\
- & Arduino card number & 1 \\ \hline
- CSCOPE & Ymin & 200 \\
- & Ymax & 600 \\
- & Refresh period & 100 \\ \hline
- CLOCK\_c & Period & 0.1 \\
- & Initialisation Time & 0 \\ \hline
- \end{tabular}
- \end{table}
-\begin{figure}
- \centering
- \includegraphics[width=\smfig]{\LocTHERMfig/therm-read.png}
- \caption[Output of Xcos diagram to read thermistor values]{Output of Xcos diagram to read thermistor values.
- This is what one sees when
- {\tt \LocTHERMscibrief/therm-read-xcos.zcos} is executed.}
- \label{fig:therm-read-output}
- \end{figure}
-The thermistor readings can be varied by bringing a heating or cooling source in the vicinity of it. The graph as shown in \figref{fig:therm-read-output} will show the variations in the ADC output that is displayed.
-
-\item In the second experiment, we will switch On and Off a buzzer depending on the thermistor readings (ADC output). The xcos diagram for this experiment is as shown in \figref{fig:therm-buzzer}.
- \begin{figure}
- \centering
- \includegraphics[width=\smfig]{\LocTHERMfig/therm-buzzer-xcos.png}
-% \includegraphics[width=\smfig]{\LocLDRfig/ldr-led-xcos.PNG}
- \caption[Xcos diagram to read the value of thermistor, which is used to turn the buzzer on or off] {Xcos diagram to read the value of the thermistor, which is used to turn the buzzer on or off. This is what one sees when {\tt \LocTHERMscibrief/therm-buzzer-xcos.zcos} is invoked.}
- \label{fig:therm-buzzer}
- \end{figure}
-The parameters of the blocks can be changed by right clicking on the block and choosing {\tt Block Parameters}. One can also double click on the block. The values for each block is tabulated in \tabref{tab:therm-read}. All other parameters are to
- be left unchanged.
-
-\begin{table}
- \centering
- \caption{Xcos parameters to read thermistor and switch the buzzer}
- \label{tab:ldr-led}
- \begin{tabular}{llc} \hline
- Name of the block & Parameter name & Value \\ \hline
- ARDUINO\_SETUP & Identifier of Arduino Card & 1 \\
- & Serial com port number & {\tt your port number} \\ \hline
- TIME\_SAMPLE & Duration of acquisition(s) & 100 \\
- & Sampling period(s) & 0.1 \\ \hline
- ANALOG\_READ\_SB & Analog pin & 4 \\
- & Arduino card number & 1 \\ \hline
- CMSCOPE & Ymin & 0 300 \\
- & Ymax & 1 600 \\
- & Refresh period & 100 100 \\ \hline
- CLOCK\_c & Period & 0.1 \\
- & Initialisation time & 0 \\ \hline
- SWITCH2\_m & Datatype & 1 \\
- & threshold & 550 \\
- & pass first input if field & 0 \\
- & use zero crossing & 1 \\ \hline
- DIGITAL\_WRITE\_SB & Digital pin & 3 \\
- & Arduino card number & 1 \\ \hline
- \end{tabular}
- \end{table}
-The graph as shown in \figref{fig:therm-buzzer-output} will show the variations in the ADC output that is displayed and the corresponding switching of buzzer whenever the limits are crossed.
-\begin{figure}
- \centering
- \includegraphics[width=\smfig]{\LocTHERMfig/therm-buzzer.png}
- \caption[Output of Xcos diagram to switch buzzer through thermistor values]{Output of Xcos diagram to switch buzzer through thermistor values. This is what one sees when {\tt \LocTHERMscibrief/therm-buzzer-xcos.zcos} is executed.}
- \label{fig:therm-buzzer-output}
- \end{figure}
-\end{enumerate}
-
-\section{Arduino Code}
-\label{sec:therm-arduino-code}
-\addtocontents{ard}{\protect\addvspace{\codclr}}
-
-\begin{ardcode}
-\acaption{Read and display the thermistor values}
-{Read and display the thermistor values. Available at
- \LocTHERMardbrief/therm-read/therm-read.ino}
-\label{ard:therm-read}
-\lstinputlisting{\LocTHERMardcode/therm-read/therm-read.ino}
-\end{ardcode}
-
-\begin{ardcode}
-\acaption{Turning the buzzer on and off using thermistor values}
-{Turning the buzzer on and off using the thermistor values read by ADC. Available at
- \LocTHERMardbrief/therm-buzzer/therm-buzzer.ino.}
-\label{ard:therm-buzzer}
-\lstinputlisting{\LocTHERMardcode/therm-buzzer/therm-buzzer.ino}
-\end{ardcode}
-
-
-\section{Scilab Code}
-\label{sec:therm-scilab-code}
-\addtocontents{cod}{\protect\addvspace{\codclr}}
-
-\begin{scicode}
-\ccaption{Read and display the thermistor values}
-{Read and display the thermistor values. Available at
- \LocTHERMscibrief/therm-read.sce}
-\label{sci:therm-read}
-\lstinputlisting{\LocTHERMscicode/therm-read.sce}
-\end{scicode}
-
-\begin{scicode}
-\ccaption{Turning the buzzer on and off using thermistor values}
-{Turning the buzzer on and off using the thermistor values read by ADC. Available at
- \LocTHERMscibrief/therm-buzzer.sce.}
-\label{sci:therm-buzzer}
-\lstinputlisting{\LocTHERMscicode/therm-buzzer.sce}
-\end{scicode}
diff --git a/user-code/thermistor/OpenModelica/therm-buzzer.mo b/user-code/thermistor/OpenModelica/therm-buzzer.mo index c752fc3..52a9e5d 100644 --- a/user-code/thermistor/OpenModelica/therm-buzzer.mo +++ b/user-code/thermistor/OpenModelica/therm-buzzer.mo @@ -8,7 +8,7 @@ model therm_buzzer "Sound buzzer depending on thermistor readings" Integer c_ok(fixed = false);
algorithm
when initial() then
- ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200";
+ ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200";
sComm.delay(2000);
if ok <> 0 then
strm.print("Unable to open serial port, please check");
@@ -30,4 +30,4 @@ algorithm c_ok := sComm.close_serial(1) "To close the connection safely";
end when;
annotation(experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 0.02));
-end therm_buzzer;
\ No newline at end of file +end therm_buzzer;
diff --git a/user-code/thermistor/OpenModelica/therm-read.mo b/user-code/thermistor/OpenModelica/therm-read.mo index 0cc0492..1e4ba75 100644 --- a/user-code/thermistor/OpenModelica/therm-read.mo +++ b/user-code/thermistor/OpenModelica/therm-read.mo @@ -7,7 +7,7 @@ model therm_read "Thermistor Readings" Integer c_ok(fixed = false);
algorithm
when initial() then
- ok := sComm.open_serial(1, 0, 115200) "At port 0 with baudrate of 115200";
+ ok := sComm.open_serial(1, 2, 115200) "At port 2 with baudrate of 115200";
sComm.delay(2000);
if ok <> 0 then
strm.print("Unable to open serial port, please check");
@@ -24,4 +24,4 @@ algorithm end when;
//Run for 20 iterations
annotation(experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-6, Interval = 0.5));
-end therm_read;
\ No newline at end of file +end therm_read;
diff --git a/user-code/thermistor/julia/ArduinoTools.jl b/user-code/thermistor/julia/ArduinoTools.jl new file mode 100644 index 0000000..7137294 --- /dev/null +++ b/user-code/thermistor/julia/ArduinoTools.jl @@ -0,0 +1,189 @@ +module ArduinoTools + +using SerialPorts + + +function connectBoard(baudrate::Int64) # Automatically detects SerialPort and opens it + arr = list_serialports() # with given baudrate + port = arr[1] + ser = SerialPort(port,baudrate) # Caution: works in most cases... If doesn't, + sleep(2) # Use the openSerial() function + return ser +end + +# function openSerial(port::ASCIIString, baudrate::Int64) # starts serial communication +# ser = SerialPorts.SerialPort(port,baudrate) +# sleep(2) +# return ser +# end + +function closeSerial(ser::SerialPorts.SerialPort) # closes serial port + SerialPorts.close(ser) +end + +# function Write(ser::SerialPorts.SerialPort, str::ASCIIString) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +# function Write(ser::SerialPorts.SerialPort, str::UTF8String) # writes a string to connected serial device +# SerialPorts.write(ser,str) +# end + +function Read(ser::SerialPorts.SerialPort, bytes::Int64) # reads 'bytes' number of bytes from serial port + SerialPorts.read(ser,bytes) +end + +function ReadAvailable(ser::SerialPorts.SerialPort) # reads all available bytes from serial port + SerialPorts.readavailable(ser) +end + +function nbAvailable(ser::SerialPorts.SerialPort) # returns number of bytes available for reading + SerialPorts.nb_available(ser) +end + +function listSerialPorts() # returns array of serial port names on computer + SerialPorts.list_serialports() +end + +function pinMode(file_des::SerialPorts.SerialPort , pin_no::Int64 , mode::String) + # isascii(mode) && throw("Mode needs to be ascii") #This will throw an error if mode is not ascii + # m = uppercase(mode) # Prevent errors due to case differences + if mode == "INPUT" str = "Da"*string(Char(48+pin_no))*"0" end # Dan0 for INPUT + if mode == "OUTPUT" str = "Da"*string(Char(48+pin_no))*"1" end # Dan1 for OUTPUT + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 0 str = "Dw"*string(Char(48+pin_no))*"1" end # Dwn1 for HIGH + if val == 0 str = "Dw"*string(Char(48+pin_no))*"0" end # Dwn0 for LOW + str = ascii(str) # Converts UTF8String to ASCIIString + write(file_des,str) +end + +function digiRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "Dr"*string(Char(48+pin_no)) # Drn to read digital pin n + str = ascii(str) # Convert UTF8String to ASCIIString + write(file_des,str) + sleep(0.01) # Delay the next step by 10 milliseconds + c = read(file_des,1) # Read one byte from SerialPort + n = parse(Int,c) # Convert the received string into integer + return n # Return the integer +end + +function analogWrite(file_des::SerialPorts.SerialPort , pin_no::Int64 , val::Int64) + if val > 255 val = 255 end # Make sure val isn't beyond limits + if val < 0 val = 0 end + c = Char(val) # Conversion of val into character + d = string(c) # Converting character to string + s = "W"*string(Char(48+pin_no))*d # Wnm for analog value m on pin n + write(file_des,s) +end + +function analogRead(file_des::SerialPorts.SerialPort , pin_no::Int64) + str = "A"*string(Char(48+pin_no)) #"An" for analog value on pin n + write(file_des,str) + sleep(0.1) # Delay next step by 100 milliseconds + n = bytesavailable(file_des) # Get number of bytes in input buffer + s = read(file_des, n) # Read n bytes from SerialPort + iolit = IOBuffer(s) + num = read(iolit, Int16) + # num = reinterpret(Int16, s) + # println(sizeof(num)) + # println(num[1]) + # @printf("value = %d", Int(num)) + # close(iolit) + + # typeof(s) + # k = parse(Int,s) # Convert String to integer + return num # Return the integer +end + +function DCMotorSetup(file_des::SerialPorts.SerialPort, driver_type::Int64, motor_no::Int64, pin1::Int64, pin2::Int64) + println("Initializing motor") + if (driver_type == 1) # adafruit + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 2) # L298 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"1" + elseif (driver_type == 3) # L293 + code_sent = "C"*string(motor_no)*string(Char(48+pin1))*string(Char(48+pin2))*"0" + end + write(file_des,code_sent) + sleep(0.1) # sleep for a tenth of a second + s = readavailable(file_des) # read all available bytes from input buffer + if s == "OK" + println("Motor Setup Successful") + else + println("Motor Setup unsuccessful") + end +end # end function + +function DCMotorRun(file_des::SerialPorts.SerialPort, motor_no::Int64, speed::Int64) + sgn = sign(speed) # Checking sign of speed to set direction + if sgn >= 0 + direction = "1" + else + direction = "0" + end + speed = abs(speed) # Dropping the sign + if speed > 255 speed = 255 end # Make sure speed is not beyond limit + code_sent = "M"*string(motor_no)*direction*string(Char(speed)) + write(file_des,code_sent) +end # end function + +function DCMotorRelease(file_des::SerialPorts.SerialPort, motor_no::Int64) + code_sent = "M"*string(motor_no)*"1"*string(Char(0)) + write(file_des,code_sent) # Stops the motor first + sleep(0.1) # Delay of 0.1 second + code_sent = "M"*string(motor_no)*"r" + write(file_des,code_sent) # Releases the motor +end + +function ServoAttach(file_des::SerialPorts.SerialPort, servo_no::Int64) + println("Initializing servo") + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function ServoMove(file_des::SerialPorts.SerialPort, servo_no::Int64, val::Int64) + if val < 0 val = 0 end + if val >180 val = 180 end + pin = "Sw"*string(servo_no)*string(Char(val)) + write(file_des,pin) +end + +function ServoDetach(file_des::SerialPorts.SerialPort, servo_no::Int64) + if servo_no == 1 + pin = "Sa1" + write(file_des,pin) + elseif servo_no == 2 + pin = "Sa2" + write(file_des,pin) + else + println("Error") + end +end + +function MPUReadin(file_des::SerialPorts.SerialPort) + cmd = "F" + write(file_des,cmd) + analog_times = [] + sleep(0.03) + s = readavailable(file_des) + sarr = split(s,"/") + for i in 1:length(sarr) + push!(analog_times,parse(Int,sarr[i])) + end + return analog_times +end + +export connectBoard,openSerial,closeSerial,Write,Read,ReadAvailable,nbAvailable,listSerialPorts,pinMode,digiWrite,digiRead,analogWrite,analogRead,DCMotorSetup,DCMotorRun,DCMotorRelease,ServoAttach,ServoMove,ServoDetach,MPUReadin + +end # module diff --git a/user-code/thermistor/julia/therm-buzzer.jl b/user-code/thermistor/julia/therm-buzzer.jl index 4381698..053f858 100644 --- a/user-code/thermistor/julia/therm-buzzer.jl +++ b/user-code/thermistor/julia/therm-buzzer.jl @@ -1,15 +1,15 @@ using SerialPorts -using ArduinoTools +include("ArduinoTools.jl") -ser = connectBoard(115200) -pinMode(ser,3,"OUTPUT") +ser = ArduinoTools.connectBoard(115200) +ArduinoTools.pinMode(ser,3,"OUTPUT") for i = 1:50 - p = analogRead(ser,4) + p = ArduinoTools.analogRead(ser,4) println(p) if p > 550 - digiWrite(ser,3,1) + ArduinoTools.digiWrite(ser,3,1) else - digiWrite(ser,3,0) + ArduinoTools.digiWrite(ser,3,0) end end close(ser) diff --git a/user-code/thermistor/julia/therm-read.jl b/user-code/thermistor/julia/therm-read.jl index 19c95ff..be76cf6 100644 --- a/user-code/thermistor/julia/therm-read.jl +++ b/user-code/thermistor/julia/therm-read.jl @@ -1,10 +1,10 @@ using SerialPorts -using ArduinoTools +include("ArduinoTools.jl") -ser = connectBoard(115200) +ser = ArduinoTools.connectBoard(115200) for i = 1:20 - p = analogRead(ser,4) + p = ArduinoTools.analogRead(ser,4) println(p) sleep(0.5) end diff --git a/user-code/thermistor/python/Arduino/Arduino.py b/user-code/thermistor/python/Arduino/Arduino.py new file mode 100644 index 0000000..b28f43c --- /dev/null +++ b/user-code/thermistor/python/Arduino/Arduino.py @@ -0,0 +1,327 @@ + +import sys +import serial +from serial import Serial +from serial.tools.list_ports import comports +from time import sleep + +p1=0 #Initial Position of servo motor +p2=0 #Final Position of servo motor + +a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] +class Initialization: + def __init__(self): + pass + + def locateport(self): + if sys.platform.startswith('win'): + port ='' + ports = list(comports()) + for i in ports: + for j in i: + if 'Arduino' in j: + port = i[0] + elif sys.platform.startswith('linux'): + b=[] + port ='' + ports = list(comports()) + for i in range(len(ports)): + for x in range(7): + portname="/dev/ttyACM"+str(x) + if ports[i][0]==portname: + b.append(ports[i][0]) + port=b[0] + return port + + def open_serial(self,ard_no, PortNo,baudrate): + #global ser + if PortNo =='': + sys.exit("aa..error..! arduino not found") + else: + self.ser = Serial(PortNo,baudrate) + sleep(2) + self.checkfirmware() + + def close_serial(self): + #global ser + self.ser.close() + + def checkfirmware(self): + print ("Check Firm Ware") + #global ser + self.ser.write(bytes([118])) #chr(118) + try: + x=self.ser.read() + #print(x) + #x=self.ser.read() + #print(x) + if x==b'o': + try: + x=self.ser.read() + except: + sys.exit("aa..! error..! it seems correct firmware not loaded") + else: + sys.exit("aa..! error..! it seems correct firmware not loaded") + except: + sys.exit("aa..! error..! it seems correct firmware not loaded") + + +class Arduino(Initialization): + def __init__(self): + print ("Init Arduino") + #self.baudrate=0 + #self.ard_no=1 + #self.PortNo=0 + #self.pin=0 + #self.val=0 + #self.mode=0 + #self.mno=0 + #self.pin1=0 + #self.pin2=0 + #self.servo=0 + + + + def cmd_digital_out(self,ard_no,pin,val): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="D"+"a"+a[pin]+"1" + self.ser.write(cmd.encode('utf-8')) + cmd="" + cmd="D"+"w"+a[pin]+str(val) + self.ser.write(cmd.encode('utf-8')) + + def cmd_digital_in(self,ard_no,pin): + b=[] + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="D"+"a"+a[pin]+"0" + self.ser.write(cmd.encode('utf-8')) + cmd="" + cmd="D"+"r"+a[pin] + self.ser.write(cmd.encode('utf-8')) + a=self.ser.read() + return(a.decode('UTF-8')) + + def cmd_analog_in(self,ard_no,pin): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="A"+a[pin] + self.ser.write(cmd.encode('utf-8')) + analog_times=[] + b1=ord(self.ser.read(1)) + b2=ord(self.ser.read(1)) + a=b1+b2*256 + #a=ser.read() + return(a) + #return(int((1023-0)*int(ord(a))/(255-0))) + + + def cmd_analog_out(self,ard_no, pin, val): + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd = "W" + a[pin] + chr(val) + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_setup(self,ard_no,mode,mno,pin1,pin2): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="C"+a[mno]+a[pin1]+a[pin2]+a[mode] + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_run(self,ard_no,mno,val): + cmd="" + if(val <0): + dirc=0 + else: + dirc=1 + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="M"+a[mno]+a[dirc]+chr(abs(val)) + self.ser.write(cmd.encode('utf-8')) + + def cmd_dcmotor_release(self,ard_no,mno): + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="M"+a[mno]+"r" + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_attach(self,ard_no,servo): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"a"+a[servo] + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_detach(self,ard_no,servo): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"d"+a[servo] + self.ser.write(cmd.encode('utf-8')) + + def cmd_servo_move(self,ard_no,servo,angle): #1->pin=9 #2->pin=10 + cmd="" + a=["0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","A","B","C","D"] + cmd="S"+"w"+a[servo]+chr(angle) + self.ser.write(cmd.encode('utf-8')) + + + + +#For PISO shift register + def cmd_shift_in(self,dataPin,clockPin,ledPin,clockLed): + value=[0 for _ in range(0,8)] + #print value + value2=[value for _ in range(0,8)] + #print value2 + for i in range(0,8): + so= self.cmd_digital_in(1,dataPin) #Reads serial out of IC + print (so) + if so=='1': + self.cmd_digital_out(1,ledPin,1) + sleep(0.1) + else: + self.cmd_digital_out(1,ledPin,0) + sleep(0.1) + value2[i][i]=int(so) + #performs value=value|value2[i] + for j in range(0,8): + if value[j]==1 or value2[i][j]==1: + value[j]=1 + else: + value[j]=0 + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockLed,1) + sleep(0.5) + self.cmd_digital_out(1,clockPin,0) + self.cmd_digital_out(1,clockLed,0) #clockLED: Led indicating clock pulses + sleep(0.4) + #after every clock pulse, 1 right shift occurs for every bit + #thus after 8 clock pulses, the entire parallel input is shifted out, + #and obtained at the dataPin, one bit per clock pulse + #Thus we get the bit by bit serial output of the Parallel Load + print (value) + + + + +#For PISO shift register +#shift in for n bits + def cmd_shift_in_n(self,dataPin,clockPin,ledPin,clockLed,numBits): + n=numBits #no. of bits + value=[0 for _ in range(0,n)] #a list of n elements, all 0s, to store the n bits of the inputs together + value2=[value for _ in range(0,n)] #a list of lists, analogous to nxn array of all 0s + for i in range(0,n): #n iterations since n bit input is given + so=self.cmd_digital_in(1,dataPin) + if so=='1': + self.cmd_digital_out(1,ledPin,1) + sleep(0.1) + else: + self.cmd_digital_out(1,ledPin,0) + sleep(0.1) + value2[i][i]=int(so) + #performs value=value|value2[i] + for j in range(0,n): + if value[j]==1 or value2[i][j]==1: + value[j]=1 + else: + value[j]=0 + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockLed,1) + sleep(0.5) + self.cmd_digital_out(1,clockPin,0) + self.cmd_digital_out(1,clockLed,0) #clockLED: Led indicating clock pulses + sleep(0.4) + print (value) + + + + + +#For SIPO shift register + def cmd_shift_out(self,dataPin,clockPin,bitOrder,val): + val2=0 + mat=[] + if bitOrder=='MSBFIRST': + #to create identity matrix + for i in range(0,8): + matsub=[0 for _ in range(0,8)] + matsub[i]=1 + mat.append(matsub) + else: + #to create horizontally flipped identity matrix + for i in range(0,8): + matsub=[0 for _ in range(0,8)] + matsub[7-i]=1 + mat.append(matsub) + for i in range(0,8): + #performs & operation on corresponding elements of list + for x,y in zip(val,mat[i]): + if x==1 and y==1: + val2=1 + break + else: + val2=0 + self.cmd_digital_out(1,dataPin,val2) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + + + +#For SIPO shift register + def cmd_shift_out_(self,dataPin,clockPin,inPin): + print ("Give serial input: ") + sleep(0.25) + self.cmd_digital_out(1,dataPin,self.cmd_digital_in(1,inPin)) #if inPin is HIGH, + #i.e. if input is given, write HIGH on Serial In Pin of IC + print("Serial input stored: ") + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) #One clock pulse + sleep(0.15) + + + + + +#For SIPO shift register +#shift out for n bits + def cmd_shift_out_n(self,dataPin,clockPin,bitOrder,val,numBits): + n=int(numBits) #number of bits + if (n%8)==0: + p=n + else: + p=(8*(n/8))+8 + val1=[0 for _ in range(0,n)] #output matrix. + #If all elements of the matrix are 0, + #output pinstate will be 0 (i.e LOW). + #If 1 or more elements of the matrix is 1, + #output pinstate will be 1 (i.e HIGH) + val2=0 + mat=[] + if bitOrder=='MSBFIRST': + for i in range(0,n): + matsub=[0 for _ in range(0,n)] + matsub[i]=1 + mat.append(matsub) + else: + for i in range(0,n): + matsub=[0 for _ in range(0,n)] + matsub[(n-1)-i]=1 + mat.append(matsub) + for j in range(0,(p-n)): #do nothing for the first (p-n) clock pulses + self.cmd_digital_out(1,dataPin,0) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + for i in range(0,n): #shift for last n clock pulses + #to perform val & mat[i] + for x,y in zip(val,mat[i]): + if x==1 and y==1: + val2=1 + break + else: + val2=0 + print (val2,) + self.cmd_digital_out(1,dataPin,val2) + self.cmd_digital_out(1,clockPin,1) + self.cmd_digital_out(1,clockPin,0) + + + + diff --git a/user-code/thermistor/python/Arduino/__init__.py b/user-code/thermistor/python/Arduino/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/user-code/thermistor/python/Arduino/__init__.py diff --git a/user-code/thermistor/python/Arduino/__pycache__/Arduino.cpython-38.pyc b/user-code/thermistor/python/Arduino/__pycache__/Arduino.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..dafdab7 --- /dev/null +++ b/user-code/thermistor/python/Arduino/__pycache__/Arduino.cpython-38.pyc diff --git a/user-code/thermistor/python/Arduino/__pycache__/__init__.cpython-38.pyc b/user-code/thermistor/python/Arduino/__pycache__/__init__.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..ccbb74a --- /dev/null +++ b/user-code/thermistor/python/Arduino/__pycache__/__init__.cpython-38.pyc |