CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 14:14:59 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=ead8ad77c53e80c91598f26db0b62ebaada1fd3b448d9896f1891b0aa3bc109da%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22Eb4FOhEFnnoVuxwxvDnum20WWPqSQ21Z%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cef78dbf7cc1f7-BLR
#include "U8glib.h"#include "DHT.h"#define DHTPIN 5#define DHTTYPE DHT22 - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "U8glib.h"
- #include "DHT.h"
- #define DHTPIN 5
- #define DHTTYPE DHT22
- DHT dht(DHTPIN, DHTTYPE);
- U8GLIB_SH1106_128X64 u8g (12, 11, 8, 9, 10); // (D0, D1, CS, DC, RST)
- U8GLIB_SH1106_128X64 u8g2 (12, 11, 7, 9, 10); // (D0, D1, CS, DC, RST)
- void setup() {
- dht.begin();
- }
- void drawLocal() {
- int tempLocal = dht.readTemperature();
- int humiLocal = dht.readHumidity();
- u8g.setFont (u8g_font_unifont);
- u8g.drawFrame (1, 1, 126, 62);
- u8g.drawStr (10, 20, "LOCAL");
- u8g.drawStr (10, 40, "TEMP:");
- u8g.setPrintPos (90, 40);
- u8g.print(tempLocal);
- u8g.drawStr (109, 40, "C");
- u8g.drawStr (10, 53, "HUMI:");
- u8g.setPrintPos (90, 53);
- u8g.print(humiLocal);
- u8g.drawStr (109, 53, "%");
- }
- void drawAPI() {
- int tempAPI = 99;
- int humiAPI = 66;
- u8g2.setFont (u8g_font_unifont);
- u8g2.drawFrame (1, 1, 126, 62);
- u8g2.drawStr (10, 20, "FORECAST.io");
- u8g2.drawStr (10, 40, "TEMP:");
- u8g2.setPrintPos (90, 40);
- u8g2.print(tempAPI);
- u8g2.drawStr (109, 40, "C");
- u8g2.drawStr (10, 53, "HUMI:");
- u8g2.setPrintPos (90, 53);
- u8g2.print(humiAPI);
- u8g2.drawStr (109, 53, "%");
- }
- void loop() {
- u8g.firstPage();
- do {
- drawLocal();
- } while (u8g.nextPage() );
- u8g2.firstPage();
- do {
- drawAPI();
- } while (u8g2.nextPage() );
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐ Instant BTC Profit Method ✅ NEVER SEEN BEFO...
JavaScript | 2 sec ago | 0.24 KB
-
⭐✅ MAKE $2000 INSTANTLY ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 12 sec ago | 0.24 KB
-
⭐ Free Crypto Method ✅ NEVER SEEN BEFORE ⭐⭐⭐
JavaScript | 22 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ✅ NEVER SEEN...
JavaScript | 32 sec ago | 0.24 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 41 sec ago | 0.24 KB
-
⭐⭐⭐Profit Method⭐⭐
Java | 44 sec ago | 0.10 KB
-
✅⭐ Make $2500 in 15 minutes ✅ NEVER SEEN BEFO...
JavaScript | 51 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $1000 INSTANTLY⭐⭐
Java | 56 sec ago | 0.10 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand