In [26]:
#imports
import numpy as np
psi = [0,10,20,30,40,50,60,70,80,90]
analogout = [171,180,190,196,205,
214, 222, 232, 240, 248]
diffarray = []
for i in range(len(psi)):
if i == 0:
bert = 'weird'
else:
diffarray.append((analogout[i]-analogout[i-1])/10)
print ('The array of differences is: ' + str(diffarray))
print('The conversion of arduino output to'
' psi is: ' + str(np.average(diffarray)))