# ExpEYES

## Programming ExpEYES with python

To run ExpEYES, you need the following

• A computer with a USB port. it could be a desktop, laptop, or a single board computer like Raspberry Pi.
• eyes17 Debian package installed. To install it Follow the instructions given here

The main features are:

• Measure DC voltages
• Capture and analyse AC volatge waveforms
• Generate DC voltages
• generate AC waveforms
• Measure time intervals between logic level transitions

These are implemented using corresponding Python functions. Some of them are explained below.

import eyes17.eyes
p = eyes17.eyes.open()


Every program should start with these two lines, to load the library and establish a connection if the hardware is connected. The variable ‘p’ is an Object representing the device and subsequent calls use this.

v = p.get_voltage('A1')      #  Read the voltage present at input A1
print (v)


Instead of ‘A1’ you may use any other inputs.

Now Connect a wire from PV1 to A1.

import time
p.set_pv1(2.5)    			# Sets the voltage on PV1
time.sleep(0.2)      		# Allow some time to settle
v = p.get_voltage('A1')     # Read the volatge at A1
print(v)


The readback may differ by 4-5 millivolts. The resolution is 12 bits only.

import matplotlib.pyplot as plt
p.set_sine(1000)				# Set 1kH sine wave on WG
time.sleep(0.5)
p.select_range('A1',4)			# Set A1 to 4V max
t,v = p.capture1('A1',300, 5)	# Digitize 300 points, 5 microsecond spacing
plt.plot(t,v)
plt.show()


Generates a sine wave on WG. Captures A1 and plots the waveform.

import matplotlib.pyplot as plt
import numpy as np

def f1(x):
return np.sin(x) + np.sin(3*x)/3