Last Updated on 15. October 2026 by SuffocationLink status: OK
Motorplatine zur Ansteuerung von zwei Motoren (6,6 V – 38 V) über den I²C-Bus
For the D1 mini ESP8266 and ESP32, go here:
- Preview – W600-Pico V1.0.0 1MB FlashLink status: OK
- Wemos C3 MiniLink status: OK
- (Wemos) D1 ESP32Link status: OK
- Wemos D1 Mini Pro (V1.1.0)Link status: OK
- Wemos D1 MiniLink status: OK
Facts
- Versorgungsspannung 6,6V – 38 V
- Maximaler Dauerstrom 2A (kurzzeitig bis zu 3,6A)
- Steuerung Vorwärts/Rückwärts (Geschwindigkeit), Stopp/Bremsen
| Description | Name | Pin |
|---|---|---|
| I²C Clock | SCL | 5 (D1) |
| I²C Data | Seventh-day Adventist | 4 (D2) |
| Motor A Anschluss 1 | 1A | |
| Motor A Anschluss 2 | 2A | |
| Motor B Anschluss 1 | 1B | |
| Motor B Anschluss 2 | 2B | |
| Externe Spannung | VM(6,5 -38V) | VM |
| Externe Spannung GND | Ground | Ground |
| Default I²C Adresse | 0x30 | |
SchematicLink status: OK
Compatibility
| D1 Type | Compatible | Begründung, wenn nicht |
|---|---|---|
| D1 mini | Yes | |
| D1 mini Pro | Yes | Untested |
| D1 mini Lite | Yes | Untested |
| D1 32 | Yes | |
S2 mini | Yes | Untested |
| C3 | Yes | Untested |
Areas of application
- Ferngesteuerte Autos
- Selbstfahrende Roboter
- Arme mit zwei Freiheitsgraden
- Betreiben eines Schrittmotors
Views



Programming
Libraries
Arduino ESP32 Bibliothek V2.0.3-RC1
Arduino ESP8266 Bibliothek V3.0.2
https://github.com/wemos/LOLIN_I2C_MOTOR_LibraryLink status: OK
Test programme
Source code MotorTest.ino (GitHubLink status: OK)
/* Testprogramm for D1 motor shields
Step 1: Motor A Forward -> increase Speed -> decrease speed
Step 2: Motor B Forward -> increase Speed -> decrease speed
Step 3: Motor A&B Forward -> increase Speed -> decrease speed
Lib:
https://github.com/wemos/LOLIN_I2C_MOTOR_Library
Inspired by the examples of the library
Created by S. Fambach
Visit http://www.fambach.net if you want
*/
#include <Wire.h>
// get the motor lib and get an object
#include "LOLIN_I2C_MOTOR.h"
LOLIN_I2C_MOTOR motor; //I2C address 0x30
void setup()
{
Wire.begin();
Serial.begin(115200);
Serial.println(F("Init Motor Shield..."));
while (motor.PRODUCT_ID != PRODUCT_ID_I2C_MOTOR) //wait motor shield ready.
{
motor.getInfo();
}
Serial.println(F("... Success"));
}
void loop()
{
// M1 forward test ********************************************************
Serial.print(F("MA forward Test .."));
motor.changeStatus(MOTOR_CH_A, MOTOR_STATUS_CW);
motor.changeFreq(MOTOR_CH_A, 20000);
motor.changeStatus(MOTOR_CH_B, MOTOR_STATUS_STOP);
Serial.print(F(".. increase speed .."));
for (int i = 0; i < 100; i++) {
motor.changeDuty(MOTOR_CH_A, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
Serial.print(F(".. decrease speed .."));
for (int i = 100; i > 0; i--) {
motor.changeDuty(MOTOR_CH_A, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
motor.changeDuty(MOTOR_CH_A, 0);
Serial.println(F(".. Finished"));
// motor.changeStatus(MOTOR_CH_A,MOTOR_STATUS_STOP);
// M1 backward test ********************************************************
Serial.print(F("MA Backward Test .."));
motor.changeStatus(MOTOR_CH_A, MOTOR_STATUS_CCW);
motor.changeFreq(MOTOR_CH_A, 20000);
motor.changeStatus(MOTOR_CH_B, MOTOR_STATUS_STOP);
Serial.print(F(".. increase speed .."));
for (int i = 0; i < 100; i++) {
motor.changeDuty(MOTOR_CH_A, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
Serial.print(F(".. decrease speed .."));
for (int i = 100; i > 0; i--) {
motor.changeDuty(MOTOR_CH_A, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
motor.changeDuty(MOTOR_CH_A, 0);
Serial.println(F(".. Finished"));
motor.changeStatus(MOTOR_CH_A, MOTOR_STATUS_STOP);
// M2 forward test ********************************************************
Serial.print(F("MB forward Test .."));
motor.changeStatus(MOTOR_CH_B, MOTOR_STATUS_CW);
motor.changeFreq(MOTOR_CH_B, 20000);
motor.changeStatus(MOTOR_CH_A, MOTOR_STATUS_STOP);
Serial.print(F(".. increase speed .."));
for (int i = 0; i < 100; i++) {
motor.changeDuty(MOTOR_CH_B, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
Serial.print(F(".. decrease speed .."));
for (int i = 100; i > 0; i--) {
motor.changeDuty(MOTOR_CH_B, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
motor.changeDuty(MOTOR_CH_B, 0);
Serial.println(F(".. Finished"));
// M2 Backward test ********************************************************
Serial.print(F("MB backward Test .."));
motor.changeStatus(MOTOR_CH_B, MOTOR_STATUS_CCW);
motor.changeFreq(MOTOR_CH_B, 20000);
motor.changeStatus(MOTOR_CH_A, MOTOR_STATUS_STOP);
Serial.print(F(".. increase speed .."));
for (int i = 0; i < 100; i++) {
motor.changeDuty(MOTOR_CH_B, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
Serial.print(F(".. decrease speed .."));
for (int i = 100; i > 0; i--) {
motor.changeDuty(MOTOR_CH_B, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
motor.changeDuty(MOTOR_CH_B, 0);
Serial.println(F(".. Finished"));
// test both motors ********************************************************
// forward test
Serial.print(F("Both forward Test .."));
motor.changeStatus(MOTOR_CH_BOTH, MOTOR_STATUS_CW);
motor.changeFreq(MOTOR_CH_BOTH, 20000);
//
Serial.print(F(".. increase speed .."));
for (int i = 0; i < 100; i++) {
motor.changeDuty(MOTOR_CH_BOTH, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
Serial.print(F(".. decrease speed .."));
for (int i = 100; i > 0; i--) {
motor.changeDuty(MOTOR_CH_BOTH, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
motor.changeDuty(MOTOR_CH_BOTH, 0);
Serial.println(F(".. Finished"));
// Backward test ********************************************************
Serial.print(F("Both backward Test .."));
motor.changeStatus(MOTOR_CH_BOTH, MOTOR_STATUS_CCW);
motor.changeFreq(MOTOR_CH_BOTH, 20000);
Serial.print(F(".. increase speed .."));
for (int i = 0; i < 100; i++) {
motor.changeDuty(MOTOR_CH_BOTH, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
Serial.print(F(".. decrease speed .."));
for (int i = 100; i > 0; i--) {
motor.changeDuty(MOTOR_CH_BOTH, i);
if ( (i % 10) == 0 ) {
Serial.print(".");
}
delay(200);
}
motor.changeDuty(MOTOR_CH_BOTH, 0);
Serial.println(F(".. Finished"));
/********************************************************/
motor.changeStatus(MOTOR_CH_BOTH, MOTOR_STATUS_STOP);
delay(2000);
// stop
}
So siehts auf der Konsole aus:

Problems
—
Conclusion
Kann zwei Motoren über den I²C-Bus bedienen, was will man mehr?
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 – PIR (Bewegungssensor)Link status: OK
- D1 Mini Shield – HR8833 MotorLink status: OK
- D1 Mini Shield – SG30 LuftqualitätsmessungLink status: OK
- D1 Mini Shield – I2C ConnectorLink status: Unknown
- D1 Mini Shield – Matrix LED ShieldLink status: Unknown
- D1 Mini Shield – Oled 64×48Link status: Unknown
- D1 Mini Shield – Buzzer (Pipser)Link status: Unknown
More ESPs
- October Check 2026 – Neue Mikrocontroller und BoardsLink status: OK
- Ulanzi TC001 Smart Pixel ClockLink status: Unknown
- ESP WEB Serial LibraryLink status: Unknown
- 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: Unknown
- ESP8266/32 WiFi Manager.Link status: OK
Sources
Sources for the Shield
HLink status: UnknownerstellerseiteLink status: Unknown
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: Unknown
https://www.exp-tech.de/plattformen/esp8266/entwicklungsboards/8898/wemos-d1-miniLink status: Unknown
| 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 |
| 04.10.2026 | Rechtschreibung korrigiert: Tippfehler, Groß-/Kleinschreibung, Kommas | Suffocation |
| 03.10.2026 | Log-Liste eingefügt | Suffocation |
| 15.04.2022 | Post created | Suffocation |
Haben Sie ein Codebeispiel zum Antreiben eines Schrittmotors mit AT8870?
Ich kann es mit LOLIN_I2C_MOTOR nicht zum Laufen bringen.