Skip to main content
deleted 68 characters in body
Source Link
ocrdu
  • 1.8k
  • 3
  • 12
  • 24

//I I use a variable to store the readings. #include "Arduino_SensorKit.h"

#define Environment Environment_I2C void setup() { // put your setup code here, to run once: Oled.begin(); Oled.setFlipMode(true); // Sets the rotation of the screen //uncomment line below if using DHT20 (black sensor) Wire.begin(); //uncomment line below if you're connecting your DHT20 to pin a different than 3 Serial.begin(9600); Environment.begin();

}

void loop() { // put your main code here, to run repeatedly:

Wire.begin(); // You need variable to keep the reading because Enviroment will not work when LED in operation float temp= Environment.readTemperature(); float hum= Environment.readHumidity(); Serial.print("Temperature = "); Serial.print(temp); //print temperature Serial.println(" C"); Serial.print("Humidity = "); Serial.print(hum); //print humidity Serial.println(" %");

delay(2000);

// int random_value = analogRead(A0); Wire.end(); { Oled.setFont(u8x8_font_chroma48medium8_r); Oled.setCursor(0, 0); // Set the Coordinates Oled.print("temp: ");
Oled.print(temp); // Print the Values

Oled.setCursor(0, 3); // Set the Coordinates Oled.print("Humility: ");
Oled.print(hum); // Print the Values
Oled.refreshDisplay(); // Update the Display }

#include "Arduino_SensorKit.h" #define Environment Environment_I2C void setup() { Oled.begin(); Oled.setFlipMode(true); // Sets the rotation of the screen // uncomment line below if using DHT20 (black sensor) Wire.begin(); // uncomment line below if you're connecting your DHT20 to pin a different than 3 Serial.begin(9600); Environment.begin(); } void loop() { Wire.begin(); // You need variable to keep the reading because Enviroment will not work when LED in operation float temp= Environment.readTemperature(); float hum= Environment.readHumidity(); Serial.print("Temperature = "); Serial.print(temp); //print temperature Serial.println(" C"); Serial.print("Humidity = "); Serial.print(hum); //print humidity Serial.println(" %"); delay(2000); // int random_value = analogRead(A0); Wire.end(); { Oled.setFont(u8x8_font_chroma48medium8_r); Oled.setCursor(0, 0); // Set the Coordinates Oled.print("temp: "); Oled.print(temp); // Print the Values Oled.setCursor(0, 3); // Set the Coordinates Oled.print("Humidity: "); Oled.print(hum); // Print the Values Oled.refreshDisplay(); // Update the Display } } 

//I use a variable to store the readings. #include "Arduino_SensorKit.h"

#define Environment Environment_I2C void setup() { // put your setup code here, to run once: Oled.begin(); Oled.setFlipMode(true); // Sets the rotation of the screen //uncomment line below if using DHT20 (black sensor) Wire.begin(); //uncomment line below if you're connecting your DHT20 to pin a different than 3 Serial.begin(9600); Environment.begin();

}

void loop() { // put your main code here, to run repeatedly:

Wire.begin(); // You need variable to keep the reading because Enviroment will not work when LED in operation float temp= Environment.readTemperature(); float hum= Environment.readHumidity(); Serial.print("Temperature = "); Serial.print(temp); //print temperature Serial.println(" C"); Serial.print("Humidity = "); Serial.print(hum); //print humidity Serial.println(" %");

delay(2000);

// int random_value = analogRead(A0); Wire.end(); { Oled.setFont(u8x8_font_chroma48medium8_r); Oled.setCursor(0, 0); // Set the Coordinates Oled.print("temp: ");
Oled.print(temp); // Print the Values

Oled.setCursor(0, 3); // Set the Coordinates Oled.print("Humility: ");
Oled.print(hum); // Print the Values
Oled.refreshDisplay(); // Update the Display }

I use a variable to store the readings.

#include "Arduino_SensorKit.h" #define Environment Environment_I2C void setup() { Oled.begin(); Oled.setFlipMode(true); // Sets the rotation of the screen // uncomment line below if using DHT20 (black sensor) Wire.begin(); // uncomment line below if you're connecting your DHT20 to pin a different than 3 Serial.begin(9600); Environment.begin(); } void loop() { Wire.begin(); // You need variable to keep the reading because Enviroment will not work when LED in operation float temp= Environment.readTemperature(); float hum= Environment.readHumidity(); Serial.print("Temperature = "); Serial.print(temp); //print temperature Serial.println(" C"); Serial.print("Humidity = "); Serial.print(hum); //print humidity Serial.println(" %"); delay(2000); // int random_value = analogRead(A0); Wire.end(); { Oled.setFont(u8x8_font_chroma48medium8_r); Oled.setCursor(0, 0); // Set the Coordinates Oled.print("temp: "); Oled.print(temp); // Print the Values Oled.setCursor(0, 3); // Set the Coordinates Oled.print("Humidity: "); Oled.print(hum); // Print the Values Oled.refreshDisplay(); // Update the Display } } 
Source Link

//I use a variable to store the readings. #include "Arduino_SensorKit.h"

#define Environment Environment_I2C void setup() { // put your setup code here, to run once: Oled.begin(); Oled.setFlipMode(true); // Sets the rotation of the screen //uncomment line below if using DHT20 (black sensor) Wire.begin(); //uncomment line below if you're connecting your DHT20 to pin a different than 3 Serial.begin(9600); Environment.begin();

}

void loop() { // put your main code here, to run repeatedly:

Wire.begin(); // You need variable to keep the reading because Enviroment will not work when LED in operation float temp= Environment.readTemperature(); float hum= Environment.readHumidity(); Serial.print("Temperature = "); Serial.print(temp); //print temperature Serial.println(" C"); Serial.print("Humidity = "); Serial.print(hum); //print humidity Serial.println(" %");

delay(2000);

// int random_value = analogRead(A0); Wire.end(); { Oled.setFont(u8x8_font_chroma48medium8_r); Oled.setCursor(0, 0); // Set the Coordinates Oled.print("temp: ");
Oled.print(temp); // Print the Values

Oled.setCursor(0, 3); // Set the Coordinates Oled.print("Humility: ");
Oled.print(hum); // Print the Values
Oled.refreshDisplay(); // Update the Display }