Untitled
unknown
plain_text
6 months ago
763 B
11
Indexable
#include "max6675.h" // Pines del MAX6675 int thermoDO = 4; int thermoCS = 5; int thermoCLK = 6; // Crear una instancia del MAX6675 MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO); void setup() { Serial.begin(9600); // Inicializar el puerto serial a 9600 baudios delay(500); // Darle tiempo al sensor para estabilizarse } void loop() { // Leer la temperatura del sensor double temperatura = thermocouple.readCelsius(); // Enviar los datos de temperatura en el formato "T:<valor>" por el puerto serial Serial.print("T:"); // Prefijo "T:" para indicar que es la temperatura Serial.println(temperatura); // Enviar la temperatura con salto de línea // Esperar 1 segundo antes de la próxima lectura delay(1000); }
Editor is loading...
Leave a Comment