
Details
A temperature and humidity sensor built around the DHT11. It measures 0 to 50 °C to within ±2 °C and 20 to 90 % relative humidity to within ±5 %, with a new reading once a second.
It reports both values over a single-wire digital protocol on one GPIO pin. The 4.7 kΩ pull-up the data line needs is on the board, so no extra parts are required. It runs at 3.3 V or 5 V.
The board is 22 × 22 mm with four ⌀2.7 mm mounting holes. It plugs into a breadboard or any AX22 port, and works in the Arduino IDE with the DHT sensor library, in MicroPython and in MicroBlocks.
No wiring. No coding.
Temperature & Humidity pushes straight into any AX22 port. Then say what you want in Axiometa Studio, which writes the code and uploads it to your board.
Pinouts
Resources
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>
#define DHTPIN 14
#define DHTTYPE DHT11
DHT_Unified dht(DHTPIN, DHTTYPE);
uint32_t delayMS;
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() {
delay(100);
sensors_event_t event;
dht.temperature().getEvent(&event);
if (isnan(event.temperature)) {
Serial.println(F("Error reading temperature!"));
} else {
Serial.print(F("Temperature: "));
Serial.print(event.temperature);
Serial.println(F("°C"));
}
// Get humidity event and print its value.
dht.humidity().getEvent(&event);
if (isnan(event.relative_humidity)) {
Serial.println(F("Error reading humidity!"));
} else {
Serial.print(F("Humidity: "));
Serial.print(event.relative_humidity);
Serial.println(F("%"));
}
}