import webbrowser
import requests
import matplotlib.pyplot as plt


IPeth="http://169.254.20.20"

#prog_html = requests.get(IPeth,"/progconfig")

#gain_html = requests.get(IPeth,"/args?gain=400")


#***** graph ascan *****


ascan = requests.get(IPeth+"/adcread")
ascan_brut=ascan.text
print(ascan_brut)
ascan_list=ascan_brut.split(',')
ascan_finallist=ascan_list[:-1]
ascan_float=[float(x) for x in ascan_finallist]

plt.title('US-ETHERNET')
plt.plot(ascan_float, color='g', lw=0.8)
plt.xlim(0,)
plt.ylim(0,255)
plt.grid()
plt.show()
plt.close()

