Difference between revisions of "ExpEYES/C2/Communicating-to-ExpEYES-using-Python/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with "{| border=1 |'''Time''' |'''Narration''' |- |00:01 | Hello everyone.Welcome to this tutorial on '''Communicating to ExpEYES using Python'''. |- |00:07 | In this tutorial we...")
 
 
(9 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
|-
 
|-
 
|00:01
 
|00:01
| Hello everyone.Welcome to this tutorial on '''Communicating to ExpEYES using Python'''.
+
| Hello everyone. Welcome to this tutorial on '''Communicating to ExpEYES using Python'''.
  
 
|-
 
|-
 
|00:07
 
|00:07
| In this tutorial we will learn:
+
| In this tutorial, we will learn:
  
* Introduction to '''Python'''  
+
Introduction to '''Python'''  
  
* Measure AC voltage using Plot window and '''Python'''  
+
Measure AC voltage using '''Plot window''' and '''Python'''  
  
* Generate a '''Sine wave'''
+
Generate a '''Sine wave'''
  
* Measure external and internal voltages using '''Python'''  
+
Measure external and internal voltages using '''Python'''  
  
 
|-
 
|-
 
|00:22
 
|00:22
|* Measure '''capacitance''' and '''resistance''' using Plot window & '''Python'''
+
| Measure '''capacitance''' and '''resistance''' using Plot window & '''Python'''
 
+
Generate a '''Square wave'''  
* Generate a '''Square wave'''  
+
Show connections and '''circuit diagrams''' for our experiments.
 
+
* Show connections and circuit diagrams for our experiments.
+
  
 
|-
 
|-
 
|00:34
 
|00:34
| Here I am using,
+
| Here, I am using:
  
* '''ExpEYES '''version 3.1.0
+
'''ExpEYES '''version 3.1.0
  
* '''Ubuntu Linux ''' OS version 14.10
+
'''Ubuntu Linux OS''' version 14.10
  
 
|-
 
|-
 
|00:43
 
|00:43
 
| To follow this tutorial, you should be familiar with:
 
| To follow this tutorial, you should be familiar with:
 
+
'''ExpEYES Junior''' interface
'''ExpEYES Junior''' interface.
+
 
+
 
Basic '''Python programming'''.
 
Basic '''Python programming'''.
  
Line 49: Line 45:
 
|-
 
|-
 
|00:56
 
|00:56
|Let's begin with introduction to '''Python'''.
+
|Let's begin with the introduction to '''Python'''.
  
 
|-
 
|-
Line 55: Line 51:
 
| '''Python''' is simple and easy to learn powerful programming language.
 
| '''Python''' is simple and easy to learn powerful programming language.
  
* It is Free and Open Source cross platform high level language.
+
It is Free and '''Open Source''', cross platform high level language.
  
* It has effective approach to '''Object oriented''' program.
+
It has effective approach to '''Object oriented''' program.
  
 
|-
 
|-
Line 69: Line 65:
 
|-
 
|-
 
|01:22
 
|01:22
|To start '''Python interpreter''' type''' python''' and press '''Enter'''.Details regarding default version of  '''Python''' will be displayed on the '''Terminal'''.
+
|To start '''Python interpreter''', type: "python" and press '''Enter'''. Details regarding default version of  '''Python''' will be displayed on the '''Terminal'''.
  
 
|-
 
|-
 
|01:36
 
|01:36
| The displayed three '''angle brackets''' indicate '''Python''' prompt(>>>).Now you are ready to type '''commands'''.
+
| The displayed three '''angle brackets''' indicate '''Python''' prompt(>>>). Now, you are ready to type '''commands'''.
  
 
|-
 
|-
Line 85: Line 81:
 
|-
 
|-
 
|01:54
 
|01:54
|On the top''' Panel''' each '''terminal''' is assigned to a specific '''channel''' number.
+
|On the top''' Panel''', each '''terminal''' is assigned to a specific '''channel''' number.
  
 
|-
 
|-
 
|02:00
 
|02:00
| For example '''channel 1''' is assigned to '''A1''' and '''channel 2''' to '''A2'''.
+
| For example- '''channel 1''' is assigned to '''A1''' and '''channel 2''' to '''A2'''.
  
 
|-
 
|-
Line 101: Line 97:
 
|-
 
|-
 
|02:15
 
|02:15
|To make the connection, we insert wires into the '''terminals''' and tighten the screws.Here '''A2 '''is connected to '''SINE.'''
+
|To make the connection, we insert wires into the '''terminals''' and tighten the screws. Here '''A2 '''is connected to '''SINE.'''
  
 
|-
 
|-
 
|02:22
 
|02:22
|This is the circuit diagram.
+
|This is the '''circuit diagram'''.
  
 
|-
 
|-
Line 117: Line 113:
 
|-
 
|-
 
|02:39
 
|02:39
|On the '''Plot window''', click on '''A2''' to display the voltage of '''A2'''.Voltage of '''A2''' is displayed below.
+
|On the '''Plot window''', click on '''A2''' to display the voltage of '''A2'''. Voltage of '''A2''' is displayed below.
  
 
|-
 
|-
 
| 02:48
 
| 02:48
|Click on A2 and drag to channel CH1. When we drag '''A2''' to '''CH1,''' input data of '''A2 '''is assigned to '''CH1'''.
+
|Click on A2 and drag to channel '''CH1'''. When we drag '''A2''' to '''CH1,''' input data of '''A2 '''is assigned to '''CH1'''.
  
 
|-
 
|-
 
|02:59
 
|02:59
|Move the '''msec/div ''' slider to show the '''Sine wave'''.Click on '''A2 ''' to show change in voltages of '''A2'''.
+
|Move the '''msec/div ''' slider to show the '''Sine''' wave. Click on '''A2''' to show change in voltages of '''A2'''.
  
 
|-
 
|-
Line 137: Line 133:
 
|-
 
|-
 
|03:23
 
|03:23
| Please note to avoid errors on '''Python interpreter:'''
+
| Please note, to avoid errors on '''Python interpreter:'''
  
* Connect the device to the system.  
+
Connect the device to the system.  
  
* Close the '''Plot window'''.
+
Close the '''Plot window'''.
  
 
|-
 
|-
 
|03:31
 
|03:31
|To import '''eyes''' library from '''ExpEYES''',type at the '''prompt''' '''import expeyes.eyesj''' press '''Enter'''.
+
|To import '''eyes''' library from '''ExpEYES''', type at the prompt "import expeyes.eyesj". Press '''Enter'''.
  
 
|-
 
|-
 
|03:40
 
|03:40
| Type '''p=expeyes.eyesj.open() ''' and press '''Enter'''.'''open() function''' returns an object if hardware is found.
+
| Type: '''p=expeyes.eyesj.open() ''' and press '''Enter'''. '''open()''' function returns an object if hardware is found.
  
 
|-
 
|-
Line 157: Line 153:
 
|-
 
|-
 
|03:58
 
|03:58
| To view the voltage of '''A2''', type '''print p.get_voltage within brackets 2 ''' and press '''Enter'''.
+
| To view the voltage of '''A2''', type: "print p.get_voltage" within brackets "2" and press '''Enter'''.
  
 
|-
 
|-
 
|04:08
 
|04:08
|Output shows voltage of '''A2''' Similarly, we can show the various voltages of '''A2'''.
+
|Output shows voltage of '''A2'''. Similarly, we can show the various voltages of '''A2'''.
  
 
|-
 
|-
Line 169: Line 165:
 
|-
 
|-
 
|04:20
 
|04:20
| To generate plots using '''Python interpreter''':
+
| To generate plots using '''Python interpreter''',
Install '''python-matplotlib''' library using '''Synaptic Package Manager'''.
+
install '''python-matplotlib''' library using '''Synaptic Package Manager'''.
  
 
|-
 
|-
Line 183: Line 179:
 
|04:40
 
|04:40
 
|Download and install,
 
|Download and install,
 
+
'''matplotlib''' version '''1.4.3 '''
* '''matplotlib version 1.4.3 '''
+
'''numpy''' version '''1.9''' or above.
 
+
* '''numpy version 1.9''' or above.
+
  
 
|-
 
|-
 
|04:49
 
|04:49
|Copy the installed '''ExpEYES''' files and drivers and paste in '''C drive'''.
+
|Copy the installed '''ExpEYES''' files and '''driver'''s and paste in '''C drive'''.
  
 
|-
 
|-
 
|04:55
 
|04:55
| To generate  '''Sine wave''', at the '''python''' prompt,Type '''import expeyes.eyesj''' and press '''Enter'''.
+
| To generate  '''Sine''' wave- at the '''python''' prompt, type: "import expeyes.eyesj" and press '''Enter'''.
  
 
|-
 
|-
 
|05:05
 
|05:05
|Type''' p=expeyes.eyesj.open() ''' and press '''Enter''' as before.
+
|Type:''' p=expeyes.eyesj.open()''' and press '''Enter''' as before.
  
 
|-
 
|-
 
|05:12
 
|05:12
| Type '''from pylab import '''*(asterisk).'''from pylab import *''' is a program from '''matplotlib library'''.Press '''Enter'''.
+
| Type: '''from pylab import * '''(asterisk). "from pylab import *" is a program from '''matplotlib library'''. Press '''Enter'''.
  
 
|-
 
|-
 
|05:26
 
|05:26
| Type''' ion() ''' .This command sets '''pylab  interactive mode.'''
+
| Type: '''ion()'''. This command sets '''pylab  interactive mode.'''
 
Press '''Enter'''.
 
Press '''Enter'''.
  
 
|-
 
|-
 
|05:35
 
|05:35
| Type''' t,v=p.capture within brackets 2,200,100'''.
+
| Type: "t,v=p.capture" within brackets "2, 200, 100".
“'''t,v''' are '''time''' and '''voltage vectors'''.
+
"t", "v" are '''time''' and '''voltage''' vectors.
  
 
|-
 
|-
 
|05:50
 
|05:50
|2 is '''channel''' number for '''A2''', 200 is the number of data points,100 is a '''time interval''' between subsequent measurements.
+
|2 is '''channel''' number for '''A2''', 200 is the number of data points, 100 is a '''time interval''' between subsequent measurements.
  
 
|-
 
|-
 
|06:02
 
|06:02
|Press '''Enter'''
+
|Press '''Enter'''.
  
 
|-
 
|-
 
|06:04
 
|06:04
| To view the output, type '''plot within brackets t,v''' '''plot within brackets t,v''' generates a '''Sine wave''' on a new window.
+
| To view the output, type: "plot" within brackets "t, v".
 +
'''plot within brackets t,v''' generates a '''Sine wave''' on a new window.
  
 
|-
 
|-
Line 232: Line 227:
 
|-
 
|-
 
|06:18
 
|06:18
|We can generate a '''Sine wave''', using the above commands on '''Windows command prompt,''' as well.
+
|We can generate a '''Sine''' wave using the above commands on '''Windows command prompt''' as well.
  
 
|-
 
|-
Line 244: Line 239:
 
|-
 
|-
 
|06:39
 
|06:39
|This is the circuit diagram.We will show the value of  '''A1''' using '''Python interpreter.'''
+
|This is the circuit diagram. We will show the value of  '''A1''' using '''Python interpreter.'''
  
 
|-
 
|-
 
|06:46
 
|06:46
 
|At the '''python''' prompt:
 
|At the '''python''' prompt:
Type '''import expeyes.eyesj''', press '''Enter'''.
+
Type: "import expeyes.eyesj" and press '''Enter'''.
  
 
|-
 
|-
 
|06:53
 
|06:53
|Type''' p=expeyes.eyesj.open(), ''' and press '''Enter'''.
+
|Type: ''' p=expeyes.eyesj.open(), ''' and press '''Enter'''.
  
 
|-
 
|-
 
|06:59
 
|06:59
|Type '''print p.get_voltage within brackets 1'''  and press'''Enter'''.
+
|Type: '''print p.get_voltage within brackets 1'''  and press'''Enter'''.
  
 
|-
 
|-
 
|07:07
 
|07:07
|Here '''Channel 1''' is assigned to '''A1'''.Voltage of '''A1''' is displayed on the '''terminal'''.
+
|Here, '''Channel 1''' is assigned to '''A1'''. Voltage of '''A1''' is displayed on the '''terminal'''.
  
 
|-
 
|-
 
|07:14
 
|07:14
| let's measure voltage of '''A1''' using '''PVS''' as internal voltage source.
+
| Let's measure voltage of '''A1''' using '''PVS''' as internal voltage source.
  
 
|-
 
|-
 
|07:20
 
|07:20
|In this experiment ''' PVS''' is connected to '''A1'''.  
+
|In this experiment, ''' PVS''' is connected to '''A1'''.  
  
 
|-
 
|-
Line 277: Line 272:
 
|-
 
|-
 
| 07:28
 
| 07:28
| Back to the '''terminal'''.Type '''print p.set_voltage within brackets 3 ''' and press '''Enter'''.
+
| Back to the '''terminal'''. Type: '''print p.set_voltage within brackets 3 ''' and press '''Enter'''.
  
 
|-
 
|-
 
|07:39
 
|07:39
|Here voltage of '''PVS''' will be set to 3 volts.Voltage of '''PVS''' is displayed.
+
|Here, voltage of '''PVS''' will be set to 3 volts. Voltage of '''PVS''' is displayed.
  
 
|-
 
|-
 
|07:47
 
|07:47
|Type print p.get_voltage(1) and press enter voltage of A1 is displayed on the terminal
+
|Type: "print p.get_voltage" within brackets "1" and press '''Enter'''. voltage of '''A1''' is displayed on the terminal.
  
 
|-
 
|-
|07:45
+
|07:59
| Now I will demonstrate '''AC''' and '''DC''' components of a voltage using '''capacitor''' and '''resistor.'''And also 'generate a '''square wave.'''
+
| Now, I will demonstrate '''AC''' and '''DC''' components of a voltage using '''capacitor''' and '''resistor'''. And also, generate a '''square wave.'''
  
 
|-
 
|-
 
|08:11
 
|08:11
| In this experiment  
+
| In this experiment,
*'''A1''' is connected to '''SQR1'''.  
+
'''A1''' is connected to '''SQR1'''.  
 
+
'''SQR1''' is connected to '''A2''' through a '''capacitor'''.
*'''SQR1''' is connected to '''A2''' through a '''capacitor'''.
+
'''A2 '''is connected to '''ground(GND)''' through 200K '''resistor'''.
 
+
*'''A2 '''is connected to '''ground(GND)''' through 200k '''resistor'''.
+
  
 
|-
 
|-
 
|08:25
 
|08:25
|This is the circuit diagram.
+
|This is the '''circuit diagram'''.
  
 
|-
 
|-
 
| 08:27
 
| 08:27
| Let's see the result on the '''Plot window'''
+
| Let's see the result on the '''Plot window'''.
  
 
|-
 
|-
 
|08:31
 
|08:31
| On the '''Plot window''' click on '''Measure C on IN1''' button.
+
| On the '''Plot window''', click on '''Measure C on IN1''' button.
  
 
|-
 
|-
 
|08:36
 
|08:36
|'''Capacitance''' of '''IN1 '''is displayed as '''-0.6pF'''(pico farads).
+
|'''Capacitance''' of '''IN1 '''is displayed as '''-0.6 pF''' (pico farads).
  
 
|-
 
|-
 
|08:42
 
|08:42
|Click on '''Measure R on SEN''' button.'''Resistance '''of '''SEN''' is displayed as''' 560Ω'''(ohms)
+
|Click on '''Measure R on SEN''' button. '''Resistance '''of '''SEN''' is displayed as''' 560 Ω'''(ohms).
  
 
|-
 
|-
Line 336: Line 329:
 
|-
 
|-
 
|09:12
 
|09:12
|Click on '''SQR1''' check box to show the '''Square waves.'''Move the ''' msec/div '''slider to adjust the waves.
+
|Click on '''SQR1''' check box to show the '''Square waves.''' Move the ''' msec/div '''slider to adjust the waves.
  
 
|-
 
|-
 
|09:23
 
|09:23
| Click on '''CH2''', drag to '''FIT'''.Voltage and frequency of '''A2 '''is displayed on the right side.
+
| Click on '''CH2''' and drag to '''FIT'''. Voltage and frequency of '''A2 '''are displayed on the right side.
  
 
|-
 
|-
 
|09:32
 
|09:32
| We will perform the same experiment to:
+
| We will perform the same experiment to measure '''Capacitance, Resistance''' and generate a '''Square wave''' using '''Python interpreter.'''
*Measure '''Capacitance, Resistance '''
+
*and generate a '''Square wave''' using '''Python interpreter.'''
+
  
 
|-
 
|-
 
|09:41
 
|09:41
|At the '''python prompt''':
+
|At the '''python prompt''', type: "import expeyes.eyesj" and press '''Enter'''.
Type '''import expeyes.eyesj''' and press '''Enter'''.
+
  
 
|-
 
|-
 
|09:50
 
|09:50
|Type''' p=expeyes.eyesj.open() ''' and press '''Enter'''.
+
|Type:''' p=expeyes.eyesj.open() ''' and press '''Enter'''.
  
 
|-
 
|-
 
|09:58
 
|09:58
|To display the '''Capacitance ''' value:  
+
|To display the '''Capacitance ''' value, type: '''p.measure_cap()''' and press '''Enter'''.
Type '''p.measure_cap( )''' and press '''Enter'''.
+
  
 
|-
 
|-
 
|10:07
 
|10:07
|'''Capacitance''' value is displayed on the '''terminal'''.
+
|'''Capacitance''' value is displayed on the terminal.
  
 
|-
 
|-
 
|10:11
 
|10:11
| To display the '''Resistance '''value:Type '''p.measure_res() ''' and press '''Enter'''.
+
| To display the '''Resistance '''value, type: '''p.measure_res() ''' and press '''Enter'''.
'''Resistance''' value is displayed on the '''terminal'''.
+
'''Resistance''' value is displayed on the terminal.
  
 
|-
 
|-
 
|10:24
 
|10:24
| To generate a Square wave:Type '''from pylab import *'''(asterisk) and press '''Enter'''.
+
| To generate a Square wave, type: '''from pylab import *'''(asterisk) and press '''Enter'''.
Type ''' ion()''' and press '''Enter'''.
+
Type: '''ion()''' and press '''Enter'''.
  
 
|-
 
|-
 
|10:36
 
|10:36
|Type '''print p.set_sqr1 within brackets 100 '''and press '''Enter'''.Here 100 is the '''frequency''' of the '''square wave'''.
+
|Type: '''print p.set_sqr1 within brackets 100 '''and press '''Enter'''. Here 100 is the '''frequency''' of the '''square wave'''.
  
 
|-
 
|-
 
|10:49
 
|10:49
|Type''' t,v=p.capture within brackets 6,400,100''' and press '''Enter'''.
+
|Type:''' t,v=p.capture within brackets 6, 400, 100''' and press '''Enter'''.
  
 
|-
 
|-
 
|11:00
 
|11:00
| Type''' plot within brackets t,v'''.'''plot within brackets t,v '''generates a '''square wave''' on a new window.
+
| Type:''' plot within brackets t,v'''. '''plot within brackets t,v '''generates a '''square wave''' on a new window.
  
 
|-
 
|-
Line 398: Line 387:
 
|-
 
|-
 
|11:17
 
|11:17
|In this tutorial we have learnt
+
|In this tutorial, we have learnt:
* Introduction to '''Python'''
+
Introduction to '''Python'''
 
+
Measure AC voltage using Plot window & '''Python'''
* Measure AC voltage using Plot window & '''Python'''
+
Generate a '''Sine''' wave
 
+
Measure external and internal voltages using '''Python'''
* Generate a '''Sine wave'''
+
 
+
* Measure external and internal voltages using '''Python'''
+
  
 
|-
 
|-
 
|11:33
 
|11:33
 
|Measure '''capacitance''' & '''resistance''' using Plot window & '''Python'''
 
|Measure '''capacitance''' & '''resistance''' using Plot window & '''Python'''
 
+
Generate a '''Square wave'''
* Generate a '''Square wave'''
+
Show connections & circuit diagrams for our experiments.
 
+
* Show connections & circuit diagrams for our experiments
+
  
 
|-
 
|-
 
|11:45
 
|11:45
| As an assignment,
+
| As an assignment,Measure the '''resistance''' of your finger using Plot window.  
*Measure the '''resistance''' of your finger using Plot window.  
+
Using '''python''', generate a combination of '''Sine''' and '''Square waves.'''
*Using '''python''', generate a combination of '''Sine''' and '''Square waves.'''
+
  
 
|-
 
|-
 
|11:56
 
|11:56
|Show circuit diagrams for the above experiment.  
+
|Show circuit diagrams for the above experiments.  
  
 
|-
 
|-
 
|11:59
 
|11:59
| This video summarises the Spoken Tutorial project.If you do not have good bandwidth, you can download and watch it.
+
| This video summarizes the Spoken Tutorial project. If you do not have good bandwidth, you can download and watch it.
  
 
|-
 
|-
 
|12:07
 
|12:07
|We conduct workshops using SpokenTutorials and give certificates. Please contact us.
+
|We conduct workshops using '''Spoken Tutorials''' and give certificates. Please contact us.
  
 
|-
 
|-
 
|12:13
 
|12:13
| The Spoken Tutorial Project is funded by '''NMEICT, MHRD Government of India'''.
+
| The Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.
  
 
|-
 
|-
 
|12:20
 
|12:20
| This tutorial is contributed by Kaushik Datta and Madhuri Ganapathi..Thank you for joining.
+
| This tutorial is contributed by Kaushik Datta and Madhuri Ganapathi.Thank you for joining.
 
+
 
|}
 
|}

Latest revision as of 17:04, 27 March 2017

Time Narration
00:01 Hello everyone. Welcome to this tutorial on Communicating to ExpEYES using Python.
00:07 In this tutorial, we will learn:

Introduction to Python

Measure AC voltage using Plot window and Python

Generate a Sine wave

Measure external and internal voltages using Python

00:22 Measure capacitance and resistance using Plot window & Python

Generate a Square wave Show connections and circuit diagrams for our experiments.

00:34 Here, I am using:

ExpEYES version 3.1.0

Ubuntu Linux OS version 14.10

00:43 To follow this tutorial, you should be familiar with:

ExpEYES Junior interface Basic Python programming.

00:52 If not, for relevant tutorials, please visit our website.
00:56 Let's begin with the introduction to Python.
01:00 Python is simple and easy to learn powerful programming language.

It is Free and Open Source, cross platform high level language.

It has effective approach to Object oriented program.

01:15 Let's make sure that Python is installed on our system.
01:18 Press CTRL+ ALT and T keys to open the Terminal.
01:22 To start Python interpreter, type: "python" and press Enter. Details regarding default version of Python will be displayed on the Terminal.
01:36 The displayed three angle brackets indicate Python prompt(>>>). Now, you are ready to type commands.
01:44 For more details about Python programming, please visit our website.
01:49 I will discuss about the channels on the top Panel of the device.
01:54 On the top Panel, each terminal is assigned to a specific channel number.
02:00 For example- channel 1 is assigned to A1 and channel 2 to A2.
02:07 I will show how to connect wires to the device.
02:11 Device has screw terminals on either side.
02:15 To make the connection, we insert wires into the terminals and tighten the screws. Here A2 is connected to SINE.
02:22 This is the circuit diagram.
02:28 Let's perform an experiment to measure the voltage of A2 and show its Sine wave.
02:36 Let's see the result on the Plot window.
02:39 On the Plot window, click on A2 to display the voltage of A2. Voltage of A2 is displayed below.
02:48 Click on A2 and drag to channel CH1. When we drag A2 to CH1, input data of A2 is assigned to CH1.
02:59 Move the msec/div slider to show the Sine wave. Click on A2 to show change in voltages of A2.
03:09 Click on CH1 and drag to FIT. The voltage and frequency of A2 are displayed on the right.
03:16 We will perform the same experiment and measure voltage of A2 using Python.
03:23 Please note, to avoid errors on Python interpreter:

Connect the device to the system.

Close the Plot window.

03:31 To import eyes library from ExpEYES, type at the prompt "import expeyes.eyesj". Press Enter.
03:40 Type: p=expeyes.eyesj.open() and press Enter. open() function returns an object if hardware is found.
03:53 These lines will load the ExpEYES library and establish connection to the device.
03:58 To view the voltage of A2, type: "print p.get_voltage" within brackets "2" and press Enter.
04:08 Output shows voltage of A2. Similarly, we can show the various voltages of A2.
04:15 Voltage of A2 changes as it is an AC voltage.
04:20 To generate plots using Python interpreter,

install python-matplotlib library using Synaptic Package Manager.

04:30 I have already installed python-matplotlib library on my system.
04:36 To generate plots on Windows Operating system:
04:40 Download and install,

matplotlib version 1.4.3 numpy version 1.9 or above.

04:49 Copy the installed ExpEYES files and drivers and paste in C drive.
04:55 To generate Sine wave- at the python prompt, type: "import expeyes.eyesj" and press Enter.
05:05 Type: p=expeyes.eyesj.open() and press Enter as before.
05:12 Type: from pylab import * (asterisk). "from pylab import *" is a program from matplotlib library. Press Enter.
05:26 Type: ion(). This command sets pylab interactive mode.

Press Enter.

05:35 Type: "t,v=p.capture" within brackets "2, 200, 100".

"t", "v" are time and voltage vectors.

05:50 2 is channel number for A2, 200 is the number of data points, 100 is a time interval between subsequent measurements.
06:02 Press Enter.
06:04 To view the output, type: "plot" within brackets "t, v".

plot within brackets t,v generates a Sine wave on a new window.

06:15 Press Enter.
06:18 We can generate a Sine wave using the above commands on Windows command prompt as well.
06:26 Next, let's measure voltage of A1 using a battery as an external voltage source.
06:32 To measure external voltage source, Ground(GND) is connected to A1 through a battery of 3V.
06:39 This is the circuit diagram. We will show the value of A1 using Python interpreter.
06:46 At the python prompt:

Type: "import expeyes.eyesj" and press Enter.

06:53 Type: p=expeyes.eyesj.open(), and press Enter.
06:59 Type: print p.get_voltage within brackets 1 and pressEnter.
07:07 Here, Channel 1 is assigned to A1. Voltage of A1 is displayed on the terminal.
07:14 Let's measure voltage of A1 using PVS as internal voltage source.
07:20 In this experiment, PVS is connected to A1.
07:24 This is the circuit diagram.
07:28 Back to the terminal. Type: print p.set_voltage within brackets 3 and press Enter.
07:39 Here, voltage of PVS will be set to 3 volts. Voltage of PVS is displayed.
07:47 Type: "print p.get_voltage" within brackets "1" and press Enter. voltage of A1 is displayed on the terminal.
07:59 Now, I will demonstrate AC and DC components of a voltage using capacitor and resistor. And also, generate a square wave.
08:11 In this experiment,

A1 is connected to SQR1. SQR1 is connected to A2 through a capacitor. A2 is connected to ground(GND) through 200K resistor.

08:25 This is the circuit diagram.
08:27 Let's see the result on the Plot window.
08:31 On the Plot window, click on Measure C on IN1 button.
08:36 Capacitance of IN1 is displayed as -0.6 pF (pico farads).
08:42 Click on Measure R on SEN button. Resistance of SEN is displayed as 560 Ω(ohms).
08:51 Please note you may get slightly different values of Capacitance & Resistance.
08:57 Click on SQ1 and drag to CH1.

SQ1 is assigned to channel CH1.

09:04 Click on A2 and drag to CH2.

A2 is assigned to channel CH2.

09:12 Click on SQR1 check box to show the Square waves. Move the msec/div slider to adjust the waves.
09:23 Click on CH2 and drag to FIT. Voltage and frequency of A2 are displayed on the right side.
09:32 We will perform the same experiment to measure Capacitance, Resistance and generate a Square wave using Python interpreter.
09:41 At the python prompt, type: "import expeyes.eyesj" and press Enter.
09:50 Type: p=expeyes.eyesj.open() and press Enter.
09:58 To display the Capacitance value, type: p.measure_cap() and press Enter.
10:07 Capacitance value is displayed on the terminal.
10:11 To display the Resistance value, type: p.measure_res() and press Enter.

Resistance value is displayed on the terminal.

10:24 To generate a Square wave, type: from pylab import *(asterisk) and press Enter.

Type: ion() and press Enter.

10:36 Type: print p.set_sqr1 within brackets 100 and press Enter. Here 100 is the frequency of the square wave.
10:49 Type: t,v=p.capture within brackets 6, 400, 100 and press Enter.
11:00 Type: plot within brackets t,v. plot within brackets t,v generates a square wave on a new window.
11:12 Press Enter.
11:14 Let's summarize.
11:17 In this tutorial, we have learnt:

Introduction to Python Measure AC voltage using Plot window & Python Generate a Sine wave Measure external and internal voltages using Python

11:33 Measure capacitance & resistance using Plot window & Python

Generate a Square wave Show connections & circuit diagrams for our experiments.

11:45 As an assignment,Measure the resistance of your finger using Plot window.

Using python, generate a combination of Sine and Square waves.

11:56 Show circuit diagrams for the above experiments.
11:59 This video summarizes the Spoken Tutorial project. If you do not have good bandwidth, you can download and watch it.
12:07 We conduct workshops using Spoken Tutorials and give certificates. Please contact us.
12:13 The Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.
12:20 This tutorial is contributed by Kaushik Datta and Madhuri Ganapathi.Thank you for joining.

Contributors and Content Editors

Pratik kamble, Ranjana, Sandhya.np14