Files
DesignForElectronics/week6/resources/dummyTemp.cpp
T

19 lines
485 B
C++
Raw Normal View History

2026-10-29 15:15:57 -04:00
#include <Arduino.h>
void setup() {
// Initialize serial communication at 9600 baud
Serial.begin(9600);
}
void loop() {
// Simulate a temperature reading (replace with actual sensor logic if needed)
float temperature = 25.5; // Example value in Celsius
// Print the temperature message to the serial monitor
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
// Wait for 5 seconds before sending the next message
delay(5000);
}