Difference between revisions of "Arduino/C2/Seven-Segment-Display/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with "{| Border = 1 | '''Time''' |'''Narration''' |- | 00:01 | Welcome to the''' Spoken Tutorial''' on''' Seven Segment Display.''' |- | 00:06 | In this tutorial, we will learn to...")
 
 
(2 intermediate revisions by 2 users not shown)
Line 10: Line 10:
 
| 00:06
 
| 00:06
 
| In this tutorial, we will learn to:
 
| In this tutorial, we will learn to:
 +
connect a''' Seven Segment Display''' to''' Arduino board''' and
  
Connect a''' Seven Segment Display''' to''' Arduino''' board and
+
write a program to display digits from 0 to 4 on the '''Seven Segment Display.'''
Write a program to display digits from 0 to 4 on the '''Seven Segment Display.'''
+
  
 
|-
 
|-
 
| 00:24
 
| 00:24
| To follow this tutorial, you should have basic knowledge of:
+
| To follow this tutorial, you should have basic knowledge of electronics and  '''C''' or''' C++''' programming language.
 
+
'''Electronics '''and  '''C''' or''' C++''' programming language
+
  
 
|-
 
|-
Line 24: Line 22:
 
| To record this tutorial, I am using:
 
| To record this tutorial, I am using:
  
'''Arduino UNO Board'''
+
'''Arduino UNO Board''',
'''Ubuntu Linux '''operating system '''14.04''' and
+
 
'''Arduino IDE'''
+
'''Ubuntu Linux operating system 14.04''' and
 +
 
 +
'''Arduino IDE'''.
  
 
|-
 
|-
 
| 00:52
 
| 00:52
 
| We will also require some external devices such as:
 
| We will also require some external devices such as:
'''Seven-Segment Display'''
+
'''Seven-Segment Display''',
'''220 ohm Resistor'''
+
'''220 ohm Resistor''',
 
'''Breadboard '''and
 
'''Breadboard '''and
'''Jumper Wires'''
+
'''Jumper Wires'''.
  
 
|-
 
|-
Line 44: Line 44:
 
|There are two types of displays:
 
|There are two types of displays:
  
'''common anode''' and  
+
'''common anode''' and '''common cathode'''
'''common cathode'''
+
 
'''seven segment display.'''
 
'''seven segment display.'''
  
Line 58: Line 57:
 
|-
 
|-
 
| 01:49
 
| 01:49
| The common '''anode seven-segment display''' is the exact opposite.
+
| The '''common anode seven-segment display''' is the exact opposite.
  
 
|-
 
|-
 
| 01:55
 
| 01:55
|Here '''pins a, b, c, d, e, f, g '''and '''dot''' must be connected to '''GND''' and the two '''COM pins''' must be connected to '''+5V'''.
+
|Here, '''pins a, b, c, d, e, f, g '''and '''dot''' must be connected to '''GND''' and the two '''COM pins''' must be connected to '''+5V'''.
  
 
|-
 
|-
 
| 02:12
 
| 02:12
| Now let us see the connection circuit details.
+
| Now, let us see the connection circuit details.
  
 
|-
 
|-
Line 74: Line 73:
 
|-
 
|-
 
| 02:24
 
| 02:24
| '''Pins a, b, c, d, e, f '''and '''g '''of the '''seven-segment display''' are connected to''' pins 2, 3, 4, 5, 6, 8 '''and''' 9''' of '''Arduino''',respectively.  
+
| '''Pins a, b, c, d, e, f '''and '''g '''of the '''seven-segment display''' are connected to''' pins 2, 3, 4, 5, 6, 8 '''and''' 9''' of '''Arduino''' respectively.  
  
 
|-
 
|-
Line 92: Line 91:
 
|-
 
|-
 
| 03:08
 
| 03:08
| This is the live setup of the connection, as shown in the circuit diagram.
+
| This is the live setup of the connection as shown in the circuit diagram.
  
 
|-
 
|-
 
| 03:15
 
| 03:15
| Now we will write a program in the '''Arduino IDE.''' So let’s switch to the '''Arduino IDE'''.
+
| Now we will write a program in the '''Arduino IDE.''' So, let’s switch to the '''Arduino IDE'''.
  
 
|-
 
|-
Line 104: Line 103:
 
|-
 
|-
 
|03:31
 
|03:31
|Type the code shown here.
+
|Type the '''code''' shown here.
  
 
|-
 
|-
Line 116: Line 115:
 
|-
 
|-
 
|03:47
 
|03:47
|This code is available in the code file link of this tutorial for your convenience.You can download and use it.
+
|This code is available in the '''code file''' link of this tutorial for your convenience. You can download and use it.
  
 
|-
 
|-
 
| 03:57
 
| 03:57
| In the '''void setup function''', we will use the''' function pinMode '''to configure the '''pin''' to '''output''' mode.
+
| In the '''void setup''' function, we will use the function '''pinMode '''to configure the '''pin''' to '''output''' mode.
  
 
|-
 
|-
 
|04:07
 
|04:07
 
| Now we will write the code for '''void loop.'''
 
| Now we will write the code for '''void loop.'''
'''Void loop function''' will blink the '''LED''' of the '''seven segment display.'''
+
'''Void loop '''function will blink the '''LED''' of the '''seven segment display.'''
  
 
|-
 
|-
Line 149: Line 148:
 
|-
 
|-
 
| 04:46
 
| 04:46
|The '''LEDs''' of '''segment 'g' '''should be low and all other '''LED segments''' should be high.
+
|The '''LEDs''' of segment 'g' should be low and all other '''LED segments''' should be high.
  
 
|-
 
|-
Line 162: Line 161:
 
|-
 
|-
 
| 05:14
 
| 05:14
| Change the code in the '''void loop function, '''as shown here.
+
| Change the code in the '''void loop''' function, as shown here.
 
I have written the code to display the digits '''0,1,2,3 '''and '''4.'''
 
I have written the code to display the digits '''0,1,2,3 '''and '''4.'''
  
Line 181: Line 180:
 
|In this tutorial, we learnt to
 
|In this tutorial, we learnt to
  
Connect a''' Seven-segment Display''' to''' Arduino board''' and
+
connect a''' Seven-segment Display''' to''' Arduino board''' and
Write a program to display digits from 0 to 4 on a '''seven-segment display.'''
+
write a program to display digits from 0 to 4 on a '''seven-segment display.'''
  
 
|-
 
|-
Line 190: Line 189:
 
Change the same program to display the digits 5,6,7,8 and 9.
 
Change the same program to display the digits 5,6,7,8 and 9.
  
Compile and upload the program and
+
Compile and upload the program and observe the digits displayed in the '''seven segment display.'''
 
+
Observe the digits displayed in the '''seven segment display.'''
+
  
 
|-
 
|-
 
|06:27
 
|06:27
| The video at the following link summarizes the Spoken Tutorial project.
+
| The video at the following link summarizes the '''Spoken Tutorial''' project.
 
Please download and watch it.
 
Please download and watch it.
  
 
|-
 
|-
 
| 06:35
 
| 06:35
|The''' Spoken Tutorial Project''' Team:
+
|The''' Spoken Tutorial Project''' team:
conducts workshops and gives certificates.For more details, please write to us.
+
conducts workshops and gives certificates. For more details, please write to us.
  
 
|-
 
|-
Line 210: Line 207:
 
|-
 
|-
 
| 06:48
 
| 06:48
| Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. More information on this mission is available at this link.
+
| Spoken Tutorial project is funded by '''NMEICT, MHRD''', Government of India. More information on this mission is available at this link.
  
 
|-
 
|-
 
| 07:00
 
| 07:00
| This tutorial has been contributed by Spoken Tutorial Project, '''IIT Bombay'''.Thanks for watching.
+
| This tutorial has been contributed by Spoken Tutorial Project, '''IIT Bombay'''. Thanks for watching.
  
 
|}
 
|}

Latest revision as of 16:00, 23 October 2018

Time Narration
00:01 Welcome to the Spoken Tutorial on Seven Segment Display.
00:06 In this tutorial, we will learn to:

connect a Seven Segment Display to Arduino board and

write a program to display digits from 0 to 4 on the Seven Segment Display.

00:24 To follow this tutorial, you should have basic knowledge of electronics and C or C++ programming language.
00:37 To record this tutorial, I am using:

Arduino UNO Board,

Ubuntu Linux operating system 14.04 and

Arduino IDE.

00:52 We will also require some external devices such as:

Seven-Segment Display, 220 ohm Resistor, Breadboard and Jumper Wires.

01:08 The seven-segment display has seven LEDs arranged in the shape of the digit eight.
01:17 There are two types of displays:

common anode and common cathode seven segment display.

01:27 In the common cathode seven-segment display, pins a, b, c, d, e, f, g and dot must be connected to +5V.
01:43 The two COM pins must be connected to ground (GND).
01:49 The common anode seven-segment display is the exact opposite.
01:55 Here, pins a, b, c, d, e, f, g and dot must be connected to GND and the two COM pins must be connected to +5V.
02:12 Now, let us see the connection circuit details.
02:17 In this experiment, we will be using the common cathode seven-segment display.
02:24 Pins a, b, c, d, e, f and g of the seven-segment display are connected to pins 2, 3, 4, 5, 6, 8 and 9 of Arduino respectively.
02:40 Note that we didn't connect to pin 7.
02:45 The two common (COM) pins are connected to the ground through the resistors.

This is shown here in the black color wire.

02:56 The resistor value should be greater than 220 ohms.

Dot is left unconnected because it is not used in this experiment.

03:08 This is the live setup of the connection as shown in the circuit diagram.
03:15 Now we will write a program in the Arduino IDE. So, let’s switch to the Arduino IDE.
03:24 First we will write a program to blink the LEDs in the seven segment display.
03:31 Type the code shown here.
03:34 We have assigned the segment names to the Arduino pins.
03:39 These help us to remember easily which Arduino ports are connected to the display’s segments.
03:47 This code is available in the code file link of this tutorial for your convenience. You can download and use it.
03:57 In the void setup function, we will use the function pinMode to configure the pin to output mode.
04:07 Now we will write the code for void loop.

Void loop function will blink the LED of the seven segment display.

04:18 The code is same as the ones in the earlier tutorials.
04:23 We will now compile and upload the program.
04:27 Now we can see that all the LEDs in the seven segment are glowing.
04:35 Next, we will modify the program to display some digits.
04:41 Say, we want to display the digit zero.
04:46 The LEDs of segment 'g' should be low and all other LED segments should be high.
04:54 To display '1', b and c segments should be high and the other LEDS should be low.

Likewise, we can write the code for all other digits also.

05:10 Let us switch back to the Arduino IDE.
05:14 Change the code in the void loop function, as shown here.

I have written the code to display the digits 0,1,2,3 and 4.

05:31 Let us now compile and upload the program.
05:35 You can see that the digits 0 to 4 are displayed, with a delay of 1 second between them.
05:45 This brings us to the end of this tutorial. Let us summarize.
05:52 In this tutorial, we learnt to

connect a Seven-segment Display to Arduino board and write a program to display digits from 0 to 4 on a seven-segment display.

06:07 Try doing the following assignment.

Change the same program to display the digits 5,6,7,8 and 9.

Compile and upload the program and observe the digits displayed in the seven segment display.

06:27 The video at the following link summarizes the Spoken Tutorial project.

Please download and watch it.

06:35 The Spoken Tutorial Project team:

conducts workshops and gives certificates. For more details, please write to us.

06:44 Please post your timed queries in this forum.
06:48 Spoken Tutorial project is funded by NMEICT, MHRD, Government of India. More information on this mission is available at this link.
07:00 This tutorial has been contributed by Spoken Tutorial Project, IIT Bombay. Thanks for watching.

Contributors and Content Editors

Pratik kamble, Sandhya.np14