Back
AI
AI
Arduino

Pressure Sensor Applications
376 Views41 Likes0 Comments12/29/2025
Use pressure sensors for weight measurement and touch detection. Build scales, pressure mats, or force feedback devices.
Code Examples
1 exampleDHT11 Temperature Sensor
Arduino30 lines
dht11_sensor.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
500 italic">// DHT11 Temperature & Humidity Sensor
500 italic">#include <DHT.h>
500 italic">#define DHTPIN 2
500 italic">#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() {
float humidity = dht.readHumidity();
float temperature = dht.readTemperature();
if (isnan(humidity) || isnan(temperature)) {
Serial.println(400">"Failed to read from DHT sensor!");
return;
}
Serial.print(400">"Humidity: ");
Serial.print(humidity);
Serial.print(400">"% Temperature: ");
Serial.print(temperature);
Serial.println(400">"°C");
delay(2000);
}Comments (0)
Please login to leave a comment
No comments yet. Be the first to comment!
K
keyestudio Robot
Creator
More from this author
AIESP32 Chatbot with Display
Build an AI chatbot using ESP32 with OLED display. Connect to cloud AI services for intelligent conv
22250
AIArm Robot with Vision
Add computer vision to your robot arm. Detect and pick up objects based on color or shape recognitio
445420
ArduinoSerial Communication Tutorial
Master serial communication between Arduino and computer. Send and receive data for monitoring and c
470220