Last Updated on 15. October 2026 by SuffocationLink status: OK
Diese Zusatzplatine hat einen kleinen Bewegungssensor on Board. Der Sensor hat eine leichte Verzögerung und ist bei Auslieferung mit dem D3 Pin des D1 Mini verbunden.
For the D1 mini ESP8266 and ESP32, go here:
- Preview – W600-Pico V1.0.0 1MB FlashLink status: Unknown
- Wemos C3 MiniLink status: Unknown
- (Wemos) D1 ESP32Link status: Unknown
- Wemos D1 Mini Pro (V1.1.0)Link status: Unknown
- Wemos D1 MiniLink status: Unknown
Facts
- Bewegungssensor
- Pin-Auswahl per Lötbrücke auf Rückseite möglich
| Description | Name | D1 | ESP32 | S2 | C3 |
|---|---|---|---|---|---|
| Bewegung registriert | Data | D3 (voreingestellt) | 17 | 18 | 7 |
| Eingebaute LED | LED | 2 | 2 | 2 | 7! |
SchematicLink status: OK
Compatibility
| D1 Type | Compatible | Begründung, wenn nicht |
|---|---|---|
| D1 mini | Bedingt | D3 = IO 0 => Shield muss beim Booten ausgesteckt werden |
| D1 mini Pro | Yes | Untested |
| D1 mini Lite | Yes | Untested |
| D1 32 | Yes | |
| S2 mini | Yes | |
| C3 | Bedingt | D7 ist auch der Port für die LED |
Areas of application
- Bewegungsmelder
- Berührungsloses Schalten
Views


Programming
Libraries
Arduino ESP32 Bibliothek V2.0.2
Arduino ESP8266 Bibliothek V3.0.2
Test programme
Source code PirExample.ino (GitHubLink status: OK)
/**
Example for pir sensor
Written by S. Famach GPL2
Visit https://www.fambach.net
*/
// keeps the output 5 seconds on
#define OUTPUT_ON_TIME_S 5
// output pin +
// pin where the pir is connected
#if defined(ESP8266) // d1 mini
#pragma message("ESP8266 Remove Shield while start!")
#define PIR_PIN D3
#define OUTPUT_PIN 2
#elif defined ( ESP32 ) // d1 mini esp32
#if CONFIG_IDF_TARGET_ESP32C3 // c3
#pragma message("ESP32C3")
#define PIR_PIN 7
#define OUTPUT_PIN -1 // build in led is pin 7 ;)
#elif CONFIG_IDF_TARGET_ESP32S2
#pragma message("ESP32S2")
#define PIR_PIN 18
#define OUTPUT_PIN 2
#else
#pragma message("ESP32")
#define PIR_PIN 17
#define OUTPUT_PIN 2
#endif
#else
#error "Unknown board"
#define PIR_PIN -1
#define OUTPUT_PIN -1
#endif
void setup() {
Serial.begin(115200);
pinMode(PIR_PIN, INPUT);
pinMode(OUTPUT_PIN, OUTPUT);
delay(2000);
Serial.println(F("Started"));
}
long timestamp = millis();
boolean swon = false;
boolean rec = false;
void loop() {
// check pir pin
if (digitalRead(PIR_PIN)) {
timestamp = millis(); // refresh timestamp
if (!swon) {
Serial.println(F("Switch LED on"));
digitalWrite(OUTPUT_PIN, HIGH);
swon = true;
}
if(!rec){
rec = true;
Serial.print(F("Pir is on ..."));
}
} else {
// switch off light if timeout is over
if ( (millis() - timestamp ) > (OUTPUT_ON_TIME_S * 1000) && swon) {
Serial.println(F("Switch LED OFF"));
digitalWrite(OUTPUT_PIN, LOW);
swon = false;
}
if(rec){
rec = false;
Serial.println(F("... off"));
}
}
}
Problems
Booten oder Programmierung nicht möglich
Gerade beim D1 Mini liegt der PIR auf dem GPIO 0, welcher beim Booten im richtigen Zustand sein muss. Ist der PIR eingestöpselt, funktioniert dies leider bei mir nicht. Somit folgendes Vorgehen:
- ESP programmieren
- ESP booten
- PIR aufstecken (vorsichtig, keinen Kurzschluss verursachen)
Conclusion
Der PIR macht, was er soll, allerdings stört die Verzögerung beim Ausschalten etwas. Schöner wäre es hier, keine Verzögerung zu haben und diese selbst zu programmieren.
More posts
Other Shields
- D1 Mini Shield – Prototyp-PlatineLink status: OK
- D1 Mini Shield – RGB LED (Einzeln)Link status: OK
- D1 Mini Shield – RGB LEDLink status: OK
- D1 Mini Shield – HR8833 MotorLink status: OK
- D1 Mini Shield – AT8870 MotorLink status: OK
- D1 Mini Shield – SG30 LuftqualitätsmessungLink status: OK
- D1 Mini Shield – I2C ConnectorLink status: OK
- D1 Mini Shield – Matrix LED ShieldLink status: OK
- D1 Mini Shield – Oled 64×48Link status: OK
- D1 Mini Shield – Buzzer (Pipser)Link status: OK
More ESPs
- October Check 2026 – Neue Mikrocontroller und BoardsLink status: OK
- Ulanzi TC001 Smart Pixel ClockLink status: OK
- ESP WEB Serial LibraryLink status: OK
- ESP32-C3 Seeed Studio XIAOLink status: OK
- ESP32-C3 Super Mini BoardLink status: OK
- Preview – LuatOs ESP32-C3 BoardLink status: OK
- ESP32 Bluetooth GamepadLink status: OK
- ESP01 – DHT11 Temperatur und Feuchte Sensor PlatinenLink status: OK
- ESP01 Relay BoardsLink status: OK
- ESP8266/32 WiFi Manager.Link status: OK
Sources
Sources for the Shield
Manufacturer's websiteLink status: OK
https://www.wemos.cc/en/latest/_static/files/sch_pir_v1.0.0.pdfLink status: OK
Arduino BeispieleLink status: OK
Sources for the boards
Manufacturer's websiteLink status: OK
SchematicLink status: OK
CH340 USB DriverLink status: OK
https://arduino-projekte.info/wemos-d1-mini/Link status: OK
https://www.exp-tech.de/plattformen/esp8266/entwicklungsboards/8898/wemos-d1-miniLink status: Broken
| Date | Change | Author |
|---|---|---|
| 15.10.2026 | Beispielcode als Code-Block eingefügt (Einbettung über gist-it.appspot.com funktionierte nicht mehr) | Suffocation |
| 08.10.2026 | Überschriften-Hierarchie korrigiert (H1→H2, Unterebenen eine Stufe tiefer) | Suffocation |
| 03.10.2026 | Rechtschreibung korrigiert: Tippfehler, Kommas, Groß-/Kleinschreibung, Formulierungen Log-Liste eingefügt | Suffocation |
| 16.04.2022 | Post created | Suffocation |