I'm new to Arduino and trying to figure out how to convert Celsius to Fahrenheit with the parameters listed below. Do I need to create a separate file for the calculations? If so, can someone help me on how I can go about doing that?
#include <DHT.h>
#include <DHT_U.h>
int SENSOR = 2;
int TEMPERATURE;
int HUMIDITY;
DHT dht(SENSOR, DHT11);
void setup() {
Serial.begin(9600);
dht.begin();
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
TEMPERATURE = dht.readTemperature();
HUMIDITY = dht.readHumidity();
Serial.print("Temp: ");
Serial.print(TEMPERATURE);
Serial.println(" celsius ");
Serial.println(" ");
Serial.print("Humidity: ");
Serial.println(HUMIDITY);
delay(2000);
//Built In LED
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(250); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(250);
}