Étape 3: Capteur de température. Partie 2
Une chaleur excessive est un danger pour l’équipement informatique et vous avez besoin d’avoir certains façon d’être vous avertir de cela.
À l’aide d’un capteur de température réelle.
Nécessaire :
fil
LM355
résistance d’ohm 2 k (valeur modifiée après revenir en arrière et en regardant mes recherches.)
fil.
-------------------------------------------------------------------------------------
-Devra faire des essais pour voir quelle valeur correspond à
quelle température. Il existe plusieurs formules.
Les résultats peuvent varier.
Pseudo-code :
gettempdata :
r = STICK(2)
Temp = r
imprimer "cote de température (0 - 255) est:" ; Temp
Si temp > quelque valeur puis impression « attention, trop chaud »
dangerflag = 1
...
...
...
RETOUR
--------------------------------------------------------------------------------------
Joystick B ____ Joystick A / | / | / | / 1 | | O------- 5 Volt 5 Volt -------O | | 9 2 | | O------- Button 1 Button 3 -------O | | 10 3 | | O------- Resistor X-axis (joystick(1)) Resistor X-axis -------O | (joystick(2)) | 11 4 | | O------- Ground MIDI TXD -------O | | 12 5 | | O------- Ground Resistor Y-axis -------O | (joystick(2)) | 13 6 | | O------- Resistor Y-axis (joystick(1)) Button 4 -------O | | 14 7 | | O------- Button 2 MIDI RXD -------O | | 15 8 | | O------- 5 Volt \ | \ | \ | \ | \__| Digital pin 2 = Button 1 = Strig(0) pin 7 = Button 2 = Strig(1) pin 10 = Button 3 = Strig(2) pin 14 = Button 4 = Strig(3) Analog pin 3 = Resistor = Stick(0) pin 6 = Resistor = Stick(1) pin 11 = Resistor = Stick(2) pin 13 = Resistor = Stick(3)