Trying to set up a simple circuit with my new UNO. Anyone else have these problems before and know how to fix them? The formatting on my Serial Monitor is all wonky. See photo for what's happening.
/*
ARBOR- Attempt 1 at prototype 15 temperature and humidity control.
*/
// include the EduIntro library
#include <EduIntro.h>
DHT11 dht11(D7); //creating the object sensor on digital pin 7
int C; // temperature C readings are integers
float F; // temperature F readings are returned in float format
int H; // humidity readings are integers
void setup()
{
//initialize serial communications at 9600 bps
Serial.begin(9600);
}
void loop()
{
dht11.update();
C = dht11.readCelsius(); // Reading the temperature in Celsius degrees and store in the C variable
F = dht11.readFahrenheit(); // Reading the temperature in Fahrenheit degrees and store in the F variable
H = dht11.readHumidity(); // Reading the humidity index
// Print the collected data in a row on the Serial Monitor
Serial.print("H: ");
Serial.print(H);
Serial.print("\tC: ");
Serial.print(C);
Serial.print("\tF: ");
Serial.println(F);
delay(2000); // Wait two seconds before getting another temperature/humidity reading
}
sketch_jul27c.ino (1.07 KB)