Difference between revisions of "ElectroBlocks/C2/Temperature-Indicator/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with "{| border="1" |- || '''Visual Cue''' || '''Narration''' |- |- style="border:1pt solid #000000;padding:0.176cm;" || '''Slide 1:''' '''Title Slide''' || Welcome to the '''Spoke...")
 
 
Line 4: Line 4:
 
|| '''Narration'''
 
|| '''Narration'''
 
|-
 
|-
|- style="border:1pt solid #000000;padding:0.176cm;"
+
 
 
|| '''Slide 1:'''
 
|| '''Slide 1:'''
  
 
'''Title Slide'''
 
'''Title Slide'''
 
|| Welcome to the '''Spoken Tutorial''' on '''Temperature indicator''' using '''Electroblocks'''.
 
|| Welcome to the '''Spoken Tutorial''' on '''Temperature indicator''' using '''Electroblocks'''.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| '''Slide 2:'''
 
|| '''Slide 2:'''
  
Line 15: Line 15:
  
 
|| In this tutorial, we will learn how to
 
|| In this tutorial, we will learn how to
* <div style="margin-left:1.27cm;margin-right:0cm;">Build a set of blocks for '''Temperature Indicator'''</div>
+
* Build a set of blocks for '''Temperature Indicator'''
* <div style="margin-left:1.27cm;margin-right:0cm;">Check the output of the experiment using the simulator</div>
+
* Check the output of the experiment using the simulator
  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| '''Slide 3:'''
 
|| '''Slide 3:'''
  
 
'''System requirement'''
 
'''System requirement'''
* <div style="margin-left:1.27cm;margin-right:0cm;">'''Ubuntu Linux OS version 22.04 '''</div>
+
* '''Ubuntu Linux OS version 22.04 '''
* <div style="margin-left:1.27cm;margin-right:0cm;">'''Google Chrome browser'''</div>
+
* '''Google Chrome browser'''
* <div style="margin-left:1.27cm;margin-right:0cm;">A working internet connection to use Electroblocks</div>
+
* A working internet connection to use Electroblocks
  
 
|| To record this tutorial, I am using the following setup.
 
|| To record this tutorial, I am using the following setup.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Type  
 
|| Type  
  
 
'''https://electroblocks.org/'''
 
'''https://electroblocks.org/'''
 
|| Let us open the''' ElectroBlocks''' website using '''Chrome''' browser.
 
|| Let us open the''' ElectroBlocks''' website using '''Chrome''' browser.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Only narration
 
|| Only narration
 
|| Let us open a new blank project.
 
|| Let us open a new blank project.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
|| '''Slide:5'''
+
|| '''Slide 4'''
  
Required section
+
Required Sections
* <div style="margin-left:1.27cm;margin-right:0cm;">Logic</div>
+
* Logic
* <div style="margin-left:1.27cm;margin-right:0cm;">Thermister</div>
+
* Thermister
* <div style="margin-left:1.27cm;margin-right:0cm;">LED </div>
+
* LED  
* <div style="margin-left:1.27cm;margin-right:0cm;">Math</div>
+
* Math
 
|| We will need the following sections for this experiment.
 
|| We will need the following sections for this experiment.
  
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
||  
 
||  
 
|| Switch back to the '''Electroblocks''' interface.
 
|| Switch back to the '''Electroblocks''' interface.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| '''Show Circuit Diagram.png'''
 
|| '''Show Circuit Diagram.png'''
  
Line 58: Line 58:
  
 
Let us build this circuit using''' ElectroBlocks'''.
 
Let us build this circuit using''' ElectroBlocks'''.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| '''Keep the loop block in the middle area (compulsory)'''
 
|| '''Keep the loop block in the middle area (compulsory)'''
  
Line 67: Line 67:
  
 
Drag the '''if then else''' block and place it inside the '''loop''' block.
 
Drag the '''if then else''' block and place it inside the '''loop''' block.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Only narration.
 
|| Only narration.
 
Click on the '''Logic''' option available on the left hand side of the screen.
 
Click on the '''Logic''' option available on the left hand side of the screen.
Line 75: Line 75:
  
 
Select and place this block in the '''if''' section of the '''if then else''' block.
 
Select and place this block in the '''if''' section of the '''if then else''' block.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Narration
 
|| Narration
  
 
Click on the '''Sensors''' section
 
Click on the '''Sensors''' section
|| Now we will add a thermistor''' '''block.
+
|| Now we will add a '''Thermistor '''block.
  
 
Click on the '''Sensors''' section and Click on the '''Thermistor'''.
 
Click on the '''Sensors''' section and Click on the '''Thermistor'''.
Line 86: Line 86:
  
 
By default, this button will be connected to '''analog pin A0''' of Arduino.
 
By default, this button will be connected to '''analog pin A0''' of Arduino.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| '''Point to '''Temp in C 23 value.
 
|| '''Point to '''Temp in C 23 value.
  
Line 93: Line 93:
  
 
Note that, in the simulation window, the temperature changes to 25 '''°'''C as well.
 
Note that, in the simulation window, the temperature changes to 25 '''°'''C as well.
 +
 
Check the '''Copy All''' checkbox.
 
Check the '''Copy All''' checkbox.
  
 
This setting will set the temperature of the thermistor to 25 degrees for all the 3 loops.
 
This setting will set the temperature of the thermistor to 25 degrees for all the 3 loops.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Only narration  
 
|| Only narration  
  
Line 111: Line 112:
  
 
Let us set the condition for the temperature reading for the thermistor.
 
Let us set the condition for the temperature reading for the thermistor.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Click on the dropdown option in the comparison block
 
|| Click on the dropdown option in the comparison block
  
Line 118: Line 119:
  
 
Select the condition to''' greater than equal to '''as shown'''.'''
 
Select the condition to''' greater than equal to '''as shown'''.'''
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Click on the '''Math''' option
 
|| Click on the '''Math''' option
  
Line 127: Line 128:
  
 
Click on the number block and change the number to 20.
 
Click on the number block and change the number to 20.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Click on the LED option.  
 
|| Click on the LED option.  
  
Line 136: Line 137:
  
 
The LED is connected to '''pin 2''' of the Arduino.
 
The LED is connected to '''pin 2''' of the Arduino.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Click on Time section
 
|| Click on Time section
  
Line 156: Line 157:
 
We have set the blocks for '''LED''' to turn ON for 2 seconds if the temperature value is above 20 '''°C'''
 
We have set the blocks for '''LED''' to turn ON for 2 seconds if the temperature value is above 20 '''°C'''
  
<div style="color:#ff0000;"></div>
+
 
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Only narration.
 
|| Only narration.
  
Line 172: Line 173:
  
 
Now we have completed the block setup for this experiment.
 
Now we have completed the block setup for this experiment.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Click on the '''Code''' icon to view the auto-generated Arduino code for the experiment.
 
|| Click on the '''Code''' icon to view the auto-generated Arduino code for the experiment.
  
Line 179: Line 180:
  
 
The code includes self-explanatory''' comments''' for better understanding.
 
The code includes self-explanatory''' comments''' for better understanding.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
||  
 
||  
 
|| Let’s check the working of the temperature indicator using the simulator.
 
|| Let’s check the working of the temperature indicator using the simulator.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Click on '''Home''' page and click on the '''Play''' button  
 
|| Click on '''Home''' page and click on the '''Play''' button  
 
|| Click on the '''Home''' icon and press the '''Play button''' to start the simulation.
 
|| Click on the '''Home''' icon and press the '''Play button''' to start the simulation.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Point to simulation window
 
|| Point to simulation window
  
Line 203: Line 204:
  
 
Notice, the LED remains OFF.
 
Notice, the LED remains OFF.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Narration only
 
|| Narration only
 
|| The '''XML '''file of this experiment is provided in the code files for your reference.
 
|| The '''XML '''file of this experiment is provided in the code files for your reference.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Slide 6:
 
|| Slide 6:
  
Line 212: Line 213:
  
 
In this tutorial, we learnt how to:
 
In this tutorial, we learnt how to:
* <div style="margin-left:1.27cm;margin-right:0cm;">Build a set of blocks for '''Temperature Indicator'''</div>
+
* Build a set of blocks for '''Temperature Indicator'''
* <div style="margin-left:1.27cm;margin-right:0cm;">Check the output of experiment using the simulator</div>
+
* Check the output of experiment using the simulator
  
 
|| This brings us to the end of this tutorial. Let us summarise.
 
|| This brings us to the end of this tutorial. Let us summarise.
|- style="border:1pt solid #000000;padding:0.176cm;"
+
|-  
 
|| Slide 7:
 
|| Slide 7:
  
 
'''Assignment''':
 
'''Assignment''':
# <div style="margin-left:1.27cm;margin-right:0cm;">Connect a LED to pin 5</div>
+
# Connect a LED to pin 5
# <div style="margin-left:1.27cm;margin-right:0cm;">Turn ON the LED when the temperature is below 25°C</div>
+
# Turn ON the LED when the temperature is below 25°C
  
 
|| As an assignment, please do the following  
 
|| As an assignment, please do the following  
|- style="border:1pt solid #000000;padding-top:0cm;padding-bottom:0cm;padding-left:0.206cm;padding-right:0.191cm;"
+
|-
 
|| '''Slide '''8''':'''
 
|| '''Slide '''8''':'''
  
Line 231: Line 232:
 
|-
 
|-
 
|}
 
|}
<div style="margin-left:-1.905cm;margin-right:-1.905cm;"></div>
 

Latest revision as of 22:12, 23 November 2025

Visual Cue Narration
Slide 1:

Title Slide

Welcome to the Spoken Tutorial on Temperature indicator using Electroblocks.
Slide 2:

Learning Objectives

In this tutorial, we will learn how to
  • Build a set of blocks for Temperature Indicator
  • Check the output of the experiment using the simulator
Slide 3:

System requirement

  • Ubuntu Linux OS version 22.04
  • Google Chrome browser
  • A working internet connection to use Electroblocks
To record this tutorial, I am using the following setup.
Type

https://electroblocks.org/

Let us open the ElectroBlocks website using Chrome browser.
Only narration Let us open a new blank project.
Slide 4

Required Sections

  • Logic
  • Thermister
  • LED
  • Math
We will need the following sections for this experiment.
Switch back to the Electroblocks interface.
Show Circuit Diagram.png This is the circuit diagram of the Temperature indicator experiment.

Here, when the temperature value is greater than the defined value the LED is turned ON.

Otherwise the LED is turned OFF.

Let us build this circuit using ElectroBlocks.

Keep the loop block in the middle area (compulsory)

Click on the Logic section

Point to if-then-else block

Click on the Logic section.

Drag the if then else block and place it inside the loop block.

Only narration.

Click on the Logic option available on the left hand side of the screen.

Click on the Logic section.

The third block represents the Comparison block.

Select and place this block in the if section of the if then else block.

Narration

Click on the Sensors section

Now we will add a Thermistor block.

Click on the Sensors section and Click on the Thermistor.

Select the Thermistor Setup block and drag it in the working area.

By default, this button will be connected to analog pin A0 of Arduino.

Point to Temp in C 23 value.

Click on the number box and change the value to 25.

We can change the temperature value to 25 by clicking on the temperature in °C box.

Note that, in the simulation window, the temperature changes to 25 °C as well.

Check the Copy All checkbox.

This setting will set the temperature of the thermistor to 25 degrees for all the 3 loops.

Only narration

Click on the Thermistor option.

Place this block in the 1st section of the comparison block.

Let's add a thermistor block to read the temperature.

Click on the Thermistor.

Select the Read temperature block and drag it in the working area.

Now place this block in the first section of the Comparison block.

Let us set the condition for the temperature reading for the thermistor.

Click on the dropdown option in the comparison block

select the condition to greater than equal to

Click on the dropdown option in the comparison block.

Select the condition to greater than equal to as shown.

Click on the Math option

Select the number block.

Click on the Math section.

Select the number block and place this block in the 2nd section of the Comparison block.

Click on the number block and change the number to 20.

Click on the LED option.

Select and drag the Turn on LED.

Click on the Add-ons section and click on LED.

Select the Turn a LED ON block and place this block in the then section of the If then else block.

The LED is connected to pin 2 of the Arduino.

Click on Time section

Select the wait for 0.2 second block

Drag it in the working area.

Place this block below Turn a LED ON

Change the time to 1 second

Point to if then block

Click on the Time section.

Select the wait for 0.2 second block and place this block below the Turn a LED ON block.

Change the time in the wait block to 2 seconds.

We have set the blocks for LED to turn ON for 2 seconds if the temperature value is above 20 °C


Only narration.

Right click on the Turn on LED block and select the Duplicate option.

Drag and place this new block inside the else section of If then else block.

Click on the dropdown arrow and select OFF

Right click on the Turn a LED on block and select the Duplicate option.

Drag and place this block inside the else section of If then else block.

To change the state of the LED, click on the dropdown arrow and select OFF.

Now we have completed the block setup for this experiment.

Click on the Code icon to view the auto-generated Arduino code for the experiment.

Highlight the code on right side

Click on the Code icon to view the automatically generated Arduino code.

The code includes self-explanatory comments for better understanding.

Let’s check the working of the temperature indicator using the simulator.
Click on Home page and click on the Play button Click on the Home icon and press the Play button to start the simulation.
Point to simulation window

In the thermistor setup block, change the temperature value to 15 oC.

play the simulation button to see the output.

We can see the LED turns ON for 2 seconds.

This is because the thermistor temperature is 25°C which is greater than the comparison block .

We will create a situation, where the thermistor reading is below 20oC.

In the thermistor setup block, change the temperature value to 15 oC.

Now, play the simulation again to see the output.

Notice, the LED remains OFF.

Narration only The XML file of this experiment is provided in the code files for your reference.
Slide 6:

Summary

In this tutorial, we learnt how to:

  • Build a set of blocks for Temperature Indicator
  • Check the output of experiment using the simulator
This brings us to the end of this tutorial. Let us summarise.
Slide 7:

Assignment:

  1. Connect a LED to pin 5
  2. Turn ON the LED when the temperature is below 25°C
As an assignment, please do the following
Slide 8:

Thank you

Thank you for joining.

Contributors and Content Editors

Madhurig, Nirmala Venkat