Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import serial
- import matplotlib.pyplot as plot
- from drawnow import *
- L1=[]
- L2=[]
- L3=[]
- temp =[]
- hum =[]
- serialArduino = serial.Serial('com10',9600)
- def plotValues():
- plt.title('Grafic senzor DHT11')
- plt.grid(True)
- plt.ylabel('Valoare')
- plt.plot(temp, 'ro-', label='Senzor temperatura='+valueRead+'L1='+L1+' L2='+L2,color = 'red', hum, 'bo-',label='Senzor humiditate='+valueRead+'L1='+L1+' L2='+L2,color = 'blue')
- plt.legend(loc ='upper left')
- plt.xlabel('Timp')
- plt.ylabel('Temperatura si Umiditatea')
- for i in range(0,40):
- values.append(0)
- while True:
- while (serialArduino.inWaiting()==0):
- pass
- valueRead,L1,L2,L3 =
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement