Arduino/C4/Arduino-Programming-with-Scilab-and-Xcos/English-timed
From Script | Spoken-Tutorial
TIME | NARRATION |
00:01 | Welcome to the Spoken tutorial on Arduino Programming with Scilab and Xcos. |
00:08 | In this tutorial, we will learn about |
00:12 | Arduino - Scilab toolbox |
00:15 | Interfacing Arduino with Scilab |
00:19 | Interfacing Arduino with Xcos |
00:23 | To record this tutorial, I’m using |
00:28 | Ubuntu Linux OS version 18.04 |
00:32 | Arduino Shield and |
00:34 | Arduino Uno Board |
00:37 | To follow this tutorial, you should go through the below Arduino spoken tutorial. |
00:44 | Getting ready for Arduino FLOSS. |
00:48 | In the above tutorial, you will learn |
00:52 | How to download the e-book and code files required for the experiments. |
00:59 | How to upload and compile Arduino programs in Arduino IDE. |
01:05 | About FLOSS Firmware |
01:08 | If you are not familiar with Scilab, go through the Scilab spoken tutorials on this website. |
01:16 | You will learn about:
Introduction to Scilab |
01:21 | Introduction to Xcos |
01:24 | Scilab and Xcos interface and
Simulation |
01:30 | I have downloaded Microcontroller Programming with Arduino, Scilab and Xcos ebook. |
01:38 | Refer to chapter 3 in the book. |
01:42 | Follow the steps given for the installation of Arduino IDE and Scilab |
01:49 | Installation steps are given for Windows and Linux OS. |
01:55 | Xcos comes pre-installed with Scilab. Hence a separate installation of Xcos is not required. |
02:05 | The experiments that are covered in the book are tested in Ubuntu Linux 18.04 and Windows 10 OS. |
02:15 | Connect the Arduino uno board with Arduino shield to the USB port of the computer |
02:23 | Note the below points:
1. Launch Arduino IDE |
02:29 | 2. Check the port |
02:31 | 3. Upload the FLOSS firmware |
02:34 | 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:49 | As discussed in the earlier tutorial the above steps have to be done before proceeding further. |
02:57 | By default, Scilab does not have the capability to communicate with Arduino. |
03:04 | All such add-on functionalities are added to Scilab using the toolbox. |
03:11 | These functions are required to run various experiments on the Arduino Uno board. |
03:18 | It also establishes a serial communication with Arduino. |
03:24 | We have created different toolboxes for Windows and Linux OS. |
03:30 | The Scilab Arduino toolbox can be found inside the Origin slash tools slash scilab slash windows or Origin slash tools slash scilab slash linux directory. |
03:48 | First we have to load the toolbox depending upon your OS. |
03:54 | I’ll show you how to load the toolbox in Linux. |
03:59 | Open the terminal by pressing Ctrl+Alt+T keys. |
04:05 | I have already installed Arduino IDE and Scilab 5.5.2 in my Linux system as specified in the book. |
04:16 | Go to the folder where Scilab is installed as shown and launch Scilab. |
04:27 | Next we have to change the working directory. |
04:31 | In the File Browser, select the toolbox folder available at Desktop slash Origin slash tools slash scilab slash linux |
04:45 | Click on the OK button. |
04:48 | Now the Scilab working directory becomes the toolbox folder. |
04:54 | In the file browser panel, we can see the builder.sce file gets loaded. |
05:01 | This shows that we are in the right directory. |
05:05 | Type the command exec builder.sce on the Scilab console. |
05:13 | Next, type the command exec loader.sce. This will load the toolbox. |
05:23 | Note: If you clear the workspace for any reason, you will have to execute this command once again. |
05:32 | We have to run the Scilab script to check whether the firmware is properly installed or not. |
05:40 | It is available at: Origin slash tools slash scilab slash test underscore firmware dot sce |
05:49 | In the Scilab console, type editor and press the Enter key. |
05:56 | Click on the “File” menu and choose “Open”. |
06:00 | Browse to the directory Origin slash tools slash scilab. |
06:06 | Choose the file test underscore firmware dot sce. |
06:12 | It will open a Scilab code. |
06:15 | In the menu bar, click on the Execute option, to execute the code. |
06:21 | Then choose File with no echo. |
06:24 | We see the response of this code as "answer is equal to ok". |
06;31 | This confirms the working of the Arduino-Scilab toolbox. |
06:36 | Next let us run the Scilab program in chapter 5. That is, Interfacing a Pushbutton. |
06:44 | This program will read the status of the pushbutton and display it on the GUI. |
06:51 | Open the file available at Origin slash user hyphen code slash push slash scilab slash push hyphen button hyphen status dot sce |
07:05 | Click on the Execute button. |
07:09 | Press the pushbutton in the shield. |
07:13 | The GUI in Scilab shows the status of the pushbutton as 1 when it is pressed. |
07:20 | It shows 0 when it is released. |
07:24 | Likewise practice the experiments in Scilab with other components as specified in the book. |
07:32 | Next we will see how to run the Arduino program in Xcos. |
07:38 | Type Xcos in the editor to launch Xcos. |
07:44 | Next we will run the code to turn the LED on or off, depending on the pushbutton. |
07:52 | The code is available in the Origin slash user hyphen code slash push slash scilab slash led hyphen push hyphen button dot zcos |
08:05 | Click on the File menu and Open the file led hyphen push hyphen button dot zcos as shown. |
08:15 | When the user presses the pushbutton, the LED on digital pin 9 of the shield is switched on. |
08:23 | When the pushbutton is released, the LED is switched off. |
08:29 | Do the otherXcos experiments as specified in the book. |
08:35 | Points to remember:
Whenever you plug the Arduino Uno board into the computer, check for the port. |
08:44 | Then execute the commands required for read-write permission. |
08:49 | Don’t upload any Arduino program after uploading the FLOSS firmware to Arduino Uno board. |
08:57 | This would overwrite the FLOSS firmware. |
09:01 | Check if the Arduino-Scilab toolbox is properly running or not. |
09:07 | You have to load the Arduino Scilab toolbox each time when you launch Scilab. |
09:14 | With this we come to the end of this tutorial. Let us summarize. |
09:20 | In this tutorial, we learnt about
Arduino - Scilab toolbox |
09:27 | Interfacing Arduino with Scilab |
09:31 | Interfacing Arduino with Xcos |
09:35 | The video at the following link,summarizes the Spoken Tutorial project.
Please download and watch it. |
09:44 | The Spoken Tutorial Project Team conducts workshops and gives certificates.
For more details, please write to us. |
09:55 | Please post your timed queries on this forum. |
09:59 | Spoken Tutorial project is funded by the Ministry of Education (MoE), Govt. of India. |
10:06 | This is Nirmala venkat from Spoken Tutorial Project, IIT Bombay signing off.
Thanks for joining. |