Arduino/C4/Arduino-Programming-with-OpenModelica/English-timed

From Script | Spoken-Tutorial
Jump to: navigation, search
TIME NARRATION
00:01 Welcome to the Spoken tutorial on Arduino Programming with OpenModelica.
00:08 In this tutorial, we will learn about Arduino OpenModelica toolbox
00:16 Interfacing Arduino with OpenModelica
00:21 To record this tutorial, I’m using
00:25 Ubuntu Linux OS version 18.04
00:30 Arduino Shield and Arduino Uno Board
00:35 To follow this tutorial, you should go through the below Arduino Spoken tutorial.
00:42 Getting ready for Arduino FLOSS.
00:46 In the above tutorial, you will learn
00:50 How to download the e-book and code files required for the experiments.
00:56 How to upload and compile Arduino programs in Arduino IDE.
01:02 About FLOSS Firmware
01:05 If you are not familiar with OpenModelica, go through the spoken tutorials on this website.
01:13 You will learn about
01:15 Introduction to OpenModelica
01:18 OpenModelica interface
01:21 Various perspectives and Simulation
01:26 I have downloaded the e-book on my Desktop.
01:30 Let us open the book Microcontroller Programming with Arduino and OpenModelica.
01:38 Refer to chapter 3 in the book.
01:42 Follow the steps and do the installation of Arduino IDE and OpenModelica depending upon your OS.
01:51 Installation steps are given for Windows and Linux OS.
01:57 The experiments that are covered in the book are tested in Ubuntu Linux 18.04 and Windows 10 OS.
02:07 Connect the Arduino UNO board with Arduino shield to the USB port of the computer
02:15 Note the below points:
02:18 1. Launch Arduino IDE
02:21 2. Check the port
02:24 3. Upload the Floss firmware

That is, in the Arduino IDE, upload the file available at Origin slash tools slash floss hyphen firmware slash floss hyphen firmware dot ino

02:40 As discussed in the earlier tutorial, the above steps have to be done before proceeding further.
02:48 By default, OpenModelica does not have the capability to connect to Arduino.
02:55 All such add-on functionalities are added to OpenModelica using the toolbox.
03:02 These functions are required to run various experiments on the Arduino UNO board.
03:09 It also establishes a serial communication with Arduino.
03:15 We have different toolboxes for Windows and Linux OS.
03:21 The Arduino-OpenModelica toolbox can be found inside the directory

Origin slash tools slash OpenModelica slash windows or Origin slash tools slash OpenModelica slash linux

03:40 First we have to load the toolbox depending upon your OS.
03:46 I’ll show how to load the toolbox in Linux.
03:51 Open the terminal by pressing Ctrl+Alt+T keys.
03:57 I have installed Arduino IDE and OpenModelica 1.1.7 in my Linux system as specified in the book.
04:08 Go to the folder where OpenModelica is installed as shown and launch the OpenModelica.
04:16 Next, we have to load the Arduino OpenModelica toolbox.
04:22 Click on File and then click on the OpenModel slash Library File(s) option.
04:30 Navigate to Origin slash tools slash openmodelica slash linux.
04:37 Select Arduino.mo and test_firmware.mo and click Open.
04:44 In OMEdit, under the Libraries panel, look for three new libraries.
04:51 They are Arduino, Modelica_Synchronous, Modelica_DeviceDrivers and test_firmware.mo.
05:04 This confirms that the Arduino OpenModelica toolbox has been loaded successfully.
05:12 Next let us run the OpenModelica program in chapter 8. That is, Interfacing a Thermistor.
05:21 This program will read and display the thermistor values.
05:26 Switch back to the OmEdit interface.
05:30 The codes are available inside the Arduino OpenModelica toolbox under the Libraries panel.
05:38 Select Arduino -> SerialCommunication -> Examples -> thermistor -> therm_read.
05:48 Double-click on the file to open.
05:51 Click on the Simulate button on the top right corner.
05:56 Click on the Ok button in the simulation setup window.
06:01 We can see the thermistor value displayed on the screen.
06:06 Rub the thermistor with the fingertips.
06:10 It will transfer heat from the person's finger, thereby raising the temperature of the thermistor.
06:17 Accordingly, we can observe the change in the thermistor values.
06:23 Points to remember:

Whenever you plug the Arduino Uno board into the computer, check for the port.

06:33 Then execute the commands required for read-write permission.
06:39 Don’t upload any Arduino program after uploading the FLOSS firmware to Arduino Uno board.
06:47 This would overwrite the FLOSS firmware.
06:51 Check if the Arduino-OpenModelica toolbox is properly running or not.
06:58 You have to load the Arduino OpenModelica toolbox each time when you launch the OMEdit.
07:06 With this we come to the end of this tutorial. Let us summarize.
07:13 In this tutorial, we learnt about

Arduino-OpenModelica toolbox

07:21 Interfacing Arduino with OpenModelica
07:25 The video at the following link, summarizes the Spoken Tutorial project.

Please download and watch it.

07:34 The Spoken Tutorial Project Team conducts workshops and gives certificates.

For more details, please write to us.

07:45 Please post your timed queries on this forum.
07:49 Spoken Tutorial project is funded by the Ministry of Education (MoE), Govt. of India.
07:56 This is Nirmala Venkat from Spoken Tutorial Project, IIT Bombay signing off.

Thanks for joining.

Contributors and Content Editors

PoojaMoolya