/*************************************
Pengujian Setpoint dan Sensor LM35
sidik(c) Mei 2023
Referensi:
Created by ArduinoGetStarted.com
Tutorial page: https://arduinogetstarted.com/tutorials/arduino-lm35-temperature-sensor
****************************************/
#include "mylib.h"
void setup() {
Serial.begin(9600);
}
void loop() {
float tempC = bacaSuhuC();
float tempF = bacaSuhuF();
float setpoint = bacaSetpoint();
// print the temperature in the Serial Monitor:
Serial.print("Setpoint: ");
Serial.print(setpoint); // print the temperature in Celsius
Serial.print("°C");
Serial.print(" Temperature: ");
Serial.print(tempC); // print the temperature in Celsius
Serial.print("°C");
Serial.print(" / "); // separator between Celsius and Fahrenheit
Serial.print(tempF); // print the temperature in Fahrenheit
Serial.println("°F");
delay(1000);
}