Back
Hall Effect Sensor Projects

Hall Effect Sensor Projects

425 Views12 Likes0 Comments12/29/2025

Use Hall effect sensors for magnetic field detection. Build speedometers, position sensors, or contactless switches.

Code Examples

1 example
DHT11 Temperature Sensor
Arduino
30 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