Aqui mostramos una conexion basica del LM35
float tempC; int LM35=0; unsigned long myTime; void setup() { Serial.begin(9600); // put your setup code here, to run once: } void loop() { myTime = millis(); tempC=analogRead(LM35); tempC=(5.0*tempC*100)/1023.0; Serial.print(myTime/1000); Serial.print(" "); Serial.print(tempC); Serial.print("\n"); delay(1000); // put your main code here, to run repeatedly: }
import numpy as np import matplotlib.pyplot as plt data = np.loadtxt('neuf04.txt') t = data[:, 0] T1 = data[:, 1] #T2 = data[:, 2] #plt.xlim([10,40]) #plt.ylim([0,60]) plt.grid() plt.plot(t, T1,'-b')# ,t, T2,'-g') plt.show()
12 22.97 13 22.97 14 22.48 15 22.48 16 22.48 17 22.97 18 22.97 19 22.48 20 22.97 21 22.97 22 22.97 23 22.97 24 22.48 25 22.48 26 22.97 27 22.97 28 22.97 29 22.48 30 22.97 31 22.97 32 22.97 33 22.97 34 22.48 35 22.48 36 22.48 37 22.48 38 22.97 39 23.46 40 22.48 41 22.48 42 22.48 43 22.97 44 23.46 45 22.97 46 22.97 47 22.48 48 22.48 49 22.48 50 22.97 51 22.48 52 22.48 53 22.48 54 23.46 55 22.97 56 22.97 57 22.48 58 22.97 59 22.97 60 22.48 61 22.97 62 23.46 63 23.46 64 22.97 65 22.97 66 23.46 67 22.48 68 22.97 69 22.97 70 22.97 71 22.97 72 22.97 73 23.95 74 22.97 75 23.46 76 22.97 77 23.46 78 23.46 79 23.46 80 23.95 81 23.95 82 23.95 83 24.44 84 25.90 85 27.37 86 27.86 87 28.35 88 28.84 89 28.84 90 29.81 91 29.81 92 30.30 93 30.30 94 30.79 95 30.30 96 30.30 97 30.79 98 30.30 99 29.81 100 33.72 101 26.88 102 25.90 103 32.26 104 30.30 105 32.26 106 31.77 107 31.77 108 31.28 109 31.77 110 31.28 111 31.28 112 30.79 113 30.79 114 31.28 115 31.77 116 31.77 117 30.30 118 31.28 119 30.79 120 32.75 121 32.75 122 31.28 123 31.77 124 31.77 125 30.79 126 30.79 127 30.30 128 30.30 129 29.81 130 29.33 131 29.81 132 29.33 133 29.33 134 28.84 135 28.35