/******************************************
Pengujian Set Point dan Sensor LM 35
* Created by ArduinoGetStarted.com
* This example code is in the public domain
* 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);
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(3000);
}