User Tools

Site Tools


openhw:arduino:εξαρτήματα:αισθητήρες:θερμοκρασίας:tmp36

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
openhw:arduino:εξαρτήματα:αισθητήρες:θερμοκρασίας:tmp36 [2026/06/12 17:59] alexandrospropenhw:arduino:εξαρτήματα:αισθητήρες:θερμοκρασίας:tmp36 [2026/06/12 18:03] (current) – [Πρόσβαση από το Sketch] alexandrospr
Line 49: Line 49:
  
 void setup() { void setup() {
-  // Begin serial communication at 9600 baud rate+  // Ξεκινάμε επικοινωνία με την κονσόλα του IDE.
   Serial.begin(9600);   Serial.begin(9600);
 } }
  
 void loop() { void loop() {
-  // Get the voltage reading from the TMP36+  // Λήψη της τιμής του ακροδέκτη εξόδου του TMP36
   int reading = analogRead(sensorPin);   int reading = analogRead(sensorPin);
  
-  // Convert that reading into voltage +  // Μετατροπή της τιμής σε τάση.
-  // Replace 5.0 with 3.3, if you are using a 3.3V Arduino+
   float voltage = reading * (5.0 / 1024.0);   float voltage = reading * (5.0 / 1024.0);
  
Line 64: Line 63:
   float temperatureC = (voltage - 0.5) * 100;   float temperatureC = (voltage - 0.5) * 100;
  
-  // Print the temperature in Celsius +  // Εμφάνιση της θερμοκρασίας σε Κελσίου 
-  Serial.print("Temperature: ");+  Serial.print("θερμοκρασία: ");
   Serial.print(temperatureC);   Serial.print(temperatureC);
-  Serial.print("\xC2\xB0"); // shows degree symbol+  Serial.print("\xC2\xB0"); // σύμβολο θερμοκρασίας
   Serial.print(" |  ");   Serial.print(" |  ");
      
-  // Print the temperature in Fahrenheit 
-  float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0; 
-  Serial.print(temperatureF); 
-  Serial.print("\xC2\xB0"); // shows degree symbol 
-  Serial.println("F"); 
  
-  delay(1000); // wait a second between readings+  delay(1000); // αναμονή ενός δευτερολέπτου πριν νέα ανάγνωση τιμής
 } }
 } }
openhw/arduino/εξαρτήματα/αισθητήρες/θερμοκρασίας/tmp36.1781287163.txt.gz · Last modified: by alexandrospr

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki