Difference between revisions of "Arduino/C4/Arduino-Programming-with-Julia/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with " {| border="1" |- || '''VISUAL CUE''' || '''NARRATION''' |- || '''Slide 1:''' || Welcome to the Spoken tutorial on '''Arduino Programming with Julia.''' |- || '''Slide 2:'''...")
 
 
Line 13: Line 13:
 
'''Learning Objectives'''
 
'''Learning Objectives'''
 
|| In this tutorial, we will learn about
 
|| In this tutorial, we will learn about
*'''Arduino Julia''' toolbox
+
*'''Arduino Julia toolbox'''
 
*Interfacing '''Arduino''' with''' Julia'''
 
*Interfacing '''Arduino''' with''' Julia'''
 
|-
 
|-
Line 21: Line 21:
 
|| To record this tutorial, I’m using
 
|| To record this tutorial, I’m using
 
*'''Ubuntu Linux '''OS version 18.04  
 
*'''Ubuntu Linux '''OS version 18.04  
*Arduino Shield and
+
*'''Arduino Shield''' and
*Arduino Uno Board
+
*'''Arduino UNO Board'''
 
|-
 
|-
 
|| '''Slide 4:'''
 
|| '''Slide 4:'''
 
'''Prerequisites'''
 
'''Prerequisites'''
 
||
 
||
To follow this tutorial, you should go through the below '''Arduino Spoken tutorial.
+
To follow this tutorial, you should go through the below '''Arduino spoken tutorial.'''
  
'''*'''Getting ready for Arduino Floss.'''
+
*'''Getting ready for Arduino Floss.'''
 
|-
 
|-
 
|| '''Slide 5:'''
 
|| '''Slide 5:'''
Line 35: Line 35:
 
'''Getting ready for Arduino Floss'''
 
'''Getting ready for Arduino Floss'''
 
|| In the above tutorial, you will learn
 
|| In the above tutorial, you will learn
*How to download the e-book and code files required for the experiments.
+
*How to download the '''e-book''' and code files required for the experiments.
*How to upload and compile '''Arduino''' programs in '''Arduino IDE.'''
+
*How to upload and '''compile Arduino programs''' in '''Arduino IDE.'''
 
*About '''FLOSS Firmware'''
 
*About '''FLOSS Firmware'''
 
|-
 
|-
|| '''Point to the book in the desktop'''
+
|| '''Point to the book in the Desktop'''
 
'''and open the book'''
 
'''and open the book'''
|| I have downloaded '''Microcontroller Programming with Arduino and Julia '''e-book on my desktop.
+
|| I have downloaded '''Microcontroller Programming with Arduino and Julia e-book''' on my '''Desktop.'''
 
|-
 
|-
 
|| Show the relevant pages in the book.
 
|| Show the relevant pages in the book.
Line 48: Line 48:
 
||  
 
||  
 
*Refer to chapter 3 in the book.
 
*Refer to chapter 3 in the book.
*Follow the steps and do the installation of '''Arduino IDE '''and''' Julia '''depending upon your OS.
+
*Follow the steps and do the '''installation''' of '''Arduino IDE '''and''' Julia '''depending upon your '''OS'''.
*Installation steps are given for '''Windows''' and '''Linux OS.'''
+
*'''Installation''' steps are given for '''Windows''' and '''Linux OS.'''
*The experiments that are covered in the book are tested in '''Ubuntu Linux 18.04 '''and '''Windows 10 OS.'''
+
*The experiments that are covered in the '''book''' are tested in '''Ubuntu Linux 18.04 '''and '''Windows 10 OS.'''
 
|-
 
|-
 
||  
 
||  
 
Arduino shield_USB.jpg
 
Arduino shield_USB.jpg
|| Connect the '''Arduino uno board''' with '''Arduino shield''' to the '''USB''' port of the computer
+
|| Connect the '''Arduino UNO board''' with '''Arduino shield''' to the '''USB port''' of the computer
 
|-
 
|-
 
|| '''Slide 6:'''
 
|| '''Slide 6:'''
Line 61: Line 61:
 
|| Note the below points:
 
|| Note the below points:
  
1. Launch Arduino IDE
+
1. Launch '''Arduino IDE'''
  
2. Check the port
+
2. Check the '''port'''
 +
 
 +
3. Upload the '''FLOSS firmware'''
  
3. Upload the FLOSS firmware
 
 
*That is, in the '''Arduino IDE''', upload the file available at '''Origin/tools/floss-firmware/floss-firmware.ino'''
 
*That is, in the '''Arduino IDE''', upload the file available at '''Origin/tools/floss-firmware/floss-firmware.ino'''
  
Line 71: Line 72:
 
|-
 
|-
 
|| '''Slide 7:'''
 
|| '''Slide 7:'''
'''About Arduino-Julia''' toolbox
+
'''About Arduino-Julia toolbox'''
 
||  
 
||  
 
* By default''', Julia''' does not have the capability to connect to '''Arduino'''.  
 
* By default''', Julia''' does not have the capability to connect to '''Arduino'''.  
* All such add-on functionalities are added to '''Julia''' using the toolbox.
+
* All such '''add-on functionalities''' are added to '''Julia''' using the '''toolbox'''.
* These functions are required to run various experiments on the Arduino''' Uno board.'''
+
* These '''functions''' are required to '''run''' various experiments on the '''Arduino Uno board.'''
* It also establishes a serial communication with '''Arduino'''.
+
* It also establishes a '''serial communication''' with '''Arduino'''.
 
|-
 
|-
 
||  
 
||  
|| The '''Arduino Julia '''toolbox can be found inside the''' directory'''
+
|| The '''Arduino Julia toolbox''' can be found inside the''' directory'''
  
 
'''Origin/tools/julia/ArduinoTools.jl'''
 
'''Origin/tools/julia/ArduinoTools.jl'''
 
|-
 
|-
 
||  
 
||  
|| Open the terminal by pressing '''Ctrl+Alt+T''' keys.
+
|| Open the '''terminal''' by pressing '''Ctrl+Alt+T''' keys.
  
I have already installed '''Arduino IDE''' and '''Julia1.6.0''' in my '''Linux''' system as specified in the book.
+
I have already '''installed Arduino IDE''' and '''Julia1.6.0''' in my '''Linux system''' as specified in the '''book'''.
 
|-
 
|-
 
|| Cd Desktop/'''Origin/tools/julia'''
 
|| Cd Desktop/'''Origin/tools/julia'''
  
 
> julia '''test_firmware.jl'''  
 
> julia '''test_firmware.jl'''  
|| In the terminal, go to the directory where the Julia toolbox is available.
+
|| In the '''terminal''', go to the directory where the '''Julia toolbox''' is available.
  
Next, we have to load the '''Arduino-Julia '''toolbox.
+
Next, we have to load the '''Arduino-Julia toolbox'''.
  
Type the command as shown to execute the firmware.
+
Type the '''command''' as shown to execute the '''firmware'''.
  
We can see three "ok" messages.
+
We can see three '''"ok"''' messages.
  
This shows that the''' FLOSS-firmware''' and '''Arduino''' '''Julia toolbox''' are working properly.
+
This shows that the''' FLOSS-firmware''' and '''Arduino Julia toolbox''' are working properly.
 
|-
 
|-
 
|| Show chapter 7
 
|| Show chapter 7
 
7.4.2
 
7.4.2
|| Next let us run the '''Julia''' program in chapter 7. That is, '''Interfacing a Potentiometer.'''
+
|| Next let us '''run''' the '''Julia program''' in chapter 7. That is, '''Interfacing a Potentiometer.'''
  
This program will turn on '''LEDs''' depending on the '''potentiometer''' threshold .
+
This '''program''' will turn '''ON LEDs''' depending on the '''potentiometer''' threshold.
 
|-
 
|-
 
||  
 
||  
  
 
>cd orgin/user-code/pot/julia
 
>cd orgin/user-code/pot/julia
|| Switch back to the terminal.
+
|| Switch back to the '''terminal'''.
  
Let us go to the folder where the''' pot-threshold.jl '''program is saved.
+
Let us go to the folder where the''' pot-threshold.jl program''' is saved.
 
|-
 
|-
 
|| > julia pot-threshold.jl
 
|| > julia pot-threshold.jl
|| Type the command as shown to execute the program.
+
|| Type the '''command''' as shown to execute the '''program'''.
 
|-
 
|-
 
|| '''Video: (required)'''
 
|| '''Video: (required)'''
|| Rotate the knob of the potentiometer in the shield.
+
|| Rotate the knob of the '''potentiometer''' in the '''shield'''.
  
Observe the change in the color of the RGB LED.
+
Observe the change in the color of the '''RGB LED.'''
  
The corresponding threshold values are displayed on the terminal.
+
The corresponding threshold values are displayed on the '''terminal'''.
 
|-
 
|-
 
||  
 
||  
|| Do the other '''Julia''' experiments as specified in the book.
+
|| Do the other '''Julia''' experiments as specified in the '''book'''.
 
|-
 
|-
 
|| '''slide 8:'''
 
|| '''slide 8:'''
Line 131: Line 132:
 
'''Points to remember:'''
 
'''Points to remember:'''
 
|| '''Points to remember:'''
 
|| '''Points to remember:'''
* Whenever you plug the '''Arduino Uno board''' into the computer, check for the port.
+
* Whenever you plug the '''Arduino UNO board''' into the computer, check for the '''port'''.
* Then execute the commands required for read-write permission.
+
* Then '''execute''' the '''commands''' required for '''read-write permission.'''
* Don’t upload any '''Arduino''' program after uploading the '''FLOSS''' firmware to '''Arduino Uno board.'''
+
* Don’t upload any '''Arduino program''' after uploading the '''FLOSS firmware''' to '''Arduino UNO board.'''
* This would overwrite the '''FLOSS '''firmware.
+
* This would overwrite the '''FLOSS firmware'''.
*Check if the '''Arduino Julia '''toolbox is properly running or not.
+
*Check if the '''Arduino Julia toolbox''' is properly '''running''' or not.
 
|-
 
|-
 
||  
 
||  
Line 147: Line 148:
 
|| In this tutorial, we learnt about
 
|| In this tutorial, we learnt about
  
*'''Arduino Julia''' toolbox
+
*'''Arduino Julia toolbox'''
 
*Interfacing '''Arduino''' with''' Julia'''
 
*Interfacing '''Arduino''' with''' Julia'''
 
|-
 
|-

Latest revision as of 13:24, 16 September 2021


VISUAL CUE NARRATION
Slide 1: Welcome to the Spoken tutorial on Arduino Programming with Julia.
Slide 2:

Learning Objectives

In this tutorial, we will learn about
  • Arduino Julia toolbox
  • Interfacing Arduino with Julia
Slide 3:

System requirements

To record this tutorial, I’m using
  • Ubuntu Linux OS version 18.04
  • Arduino Shield and
  • Arduino UNO Board
Slide 4:

Prerequisites

To follow this tutorial, you should go through the below Arduino spoken tutorial.

  • Getting ready for Arduino Floss.
Slide 5:

Getting ready for Arduino Floss

In the above tutorial, you will learn
  • How to download the e-book and code files required for the experiments.
  • How to upload and compile Arduino programs in Arduino IDE.
  • About FLOSS Firmware
Point to the book in the Desktop

and open the book

I have downloaded Microcontroller Programming with Arduino and Julia e-book on my Desktop.
Show the relevant pages in the book.

Chapter 3 : Page 18, 25

  • Refer to chapter 3 in the book.
  • Follow the steps and do the installation of Arduino IDE and Julia depending upon your OS.
  • Installation steps are given for Windows and Linux OS.
  • The experiments that are covered in the book are tested in Ubuntu Linux 18.04 and Windows 10 OS.

Arduino shield_USB.jpg

Connect the Arduino UNO board with Arduino shield to the USB port of the computer
Slide 6:

Points to be noted:

Note the below points:

1. Launch Arduino IDE

2. Check the port

3. Upload the FLOSS firmware

  • That is, in the Arduino IDE, upload the file available at Origin/tools/floss-firmware/floss-firmware.ino

As discussed in the earlier tutorial the above steps have to be done before proceeding further.

Slide 7:

About Arduino-Julia toolbox

  • By default, Julia does not have the capability to connect to Arduino.
  • All such add-on functionalities are added to Julia using the toolbox.
  • These functions are required to run various experiments on the Arduino Uno board.
  • It also establishes a serial communication with Arduino.
The Arduino Julia toolbox can be found inside the directory

Origin/tools/julia/ArduinoTools.jl

Open the terminal by pressing Ctrl+Alt+T keys.

I have already installed Arduino IDE and Julia1.6.0 in my Linux system as specified in the book.

Cd Desktop/Origin/tools/julia

> julia test_firmware.jl

In the terminal, go to the directory where the Julia toolbox is available.

Next, we have to load the Arduino-Julia toolbox.

Type the command as shown to execute the firmware.

We can see three "ok" messages.

This shows that the FLOSS-firmware and Arduino Julia toolbox are working properly.

Show chapter 7

7.4.2

Next let us run the Julia program in chapter 7. That is, Interfacing a Potentiometer.

This program will turn ON LEDs depending on the potentiometer threshold.

>cd orgin/user-code/pot/julia

Switch back to the terminal.

Let us go to the folder where the pot-threshold.jl program is saved.

> julia pot-threshold.jl Type the command as shown to execute the program.
Video: (required) Rotate the knob of the potentiometer in the shield.

Observe the change in the color of the RGB LED.

The corresponding threshold values are displayed on the terminal.

Do the other Julia experiments as specified in the book.
slide 8:

Points to remember:

Points to remember:
  • Whenever you plug the Arduino UNO board into the computer, check for the port.
  • Then execute the commands required for read-write permission.
  • Don’t upload any Arduino program after uploading the FLOSS firmware to Arduino UNO board.
  • This would overwrite the FLOSS firmware.
  • Check if the Arduino Julia toolbox is properly running or not.
With this we come to the end of this tutorial. Let us summarize.

Slide 9:

Summary

In this tutorial, we learnt about
  • Arduino Julia toolbox
  • Interfacing Arduino with Julia
Slide 10:

(About Spoken Tutorial Project)

The video at the following link, summarizes the Spoken Tutorial project.

Please download and watch it.

Slide 11:

(About Spoken Tutorial Project)

The Spoken Tutorial Project Team conducts workshops and gives certificates.

For more details, please write to us.

Slide 12:

Forum questions:

Please post your timed queries on this forum.
Slide 13: Acknowledgement Spoken Tutorial project is funded by the Ministry of Education (MoE), Govt. of India.
This is Nirmala venkat from Spoken Tutorial Project, IIT Bombay signing off.

Thanks for joining.

Contributors and Content Editors

Nancyvarkey, Nirmala Venkat