Easy to use C++ Library for the WEMOS/LOLIN D1 mini CPU boards and shields for the Arduino platform.
The following Wemos D1 Mini CPU Boards are supprted:
The following base boards can be used to use several Wemos Shields in parallel:
Amazon Germany AliExpress Dual Base
Supports WEMOS Builtin LED
Pin: GPIO02/D4
None
#include <WLed.h>
WLed led;
void setup() {
led.setup();
}
void loop() {
led.loop();
led.on();
delay(500);
led.off();
delay(500);
}
WEMOS WS2812B RGB Shield
Pin: GPIO04/D2
Adafruit NeoPixel
#include <WRgb.h>
WRgb rgb; // single WS2812B RGB Leds
//WRgb rgb(7); // seven WS2812B RGB Leds
void setup() {
rgb.setup();
}
void loop() {
rgb.loop();
rgb.setColor(white);
rgb.on();
delay(500);
rgb.setColor(red);
delay(500);
rgb.setColor(green);
delay(500);
rgb.setColor(blue);
delay(500);
rgb.off();
delay(500);
}
Supports WEMOS Button Shield
Pin: GPIO00/D3
None
#include <WButton.h>
#include <WLed.h>
WButton button;
WLed led;
void setup() {
button.setup();
led.setup();
}
void loop() {
switch(button.event())
{
case WButton::Pressed:
led.on();
break;
case WButton::Released:
led.off();
break;
}
}
Supports WEMOS Relais Shield
Pin: GPIO14/D5
None
#include <WRelais.h>
WRelais relais;
void setup() {
relais.setup();
}
void loop() {
relais.on();
delay(500);
relais.off();
delay(500);
}
Supports WEMOS Buzzer Shield
Pin: GPIO05/D1
None
#include <WBuzzer.h>
WBuzzer buzzer;
void setup() {
buzzer.setup();
}
void loop() {
buzzer.tone(262,150); // c
delay(500);
buzzer.tone(294,150); // d
delay(500);
buzzer.tone(230,150); // e
delay(500);
}
Supports WEMOS Ambient Light
Pin:
- GPIO05/D1
- GPIO04/D2
Default I²C Address: 0x23
BH1750
#include <WAmbientLight.h>
WAmbientLight ambientLight;
void setup() {
Serial.begin(115200);
ambientLight.setup();
}
void loop() {
uint16_t value = ambientLight.getValue();
Serial.print("Light: ");
Serial.print(value);
Serial.println(" lx");
delay(1000);
}
Supports a custom build CAN Shield with MCP2515
D5 SCK D6 MISO D7 MOSI D8 GPIO015 CS D4 GPIO02 INT
MCP CAN lib
PubSubClient
Helper class
Helper class
Helper class
Logging in the Automotive DLT protocol
Helper class for serial port communication
Contibutions are always welcome! Please provide a Pull Request on Github.
https://github.com/alexmucde/DLTRelais
If you find this SW useful and you want to donate my work please select one of the following donations:
Paypal Donation:
Github Sponsors:
Alexander Wenzel [email protected]
This code is licensed under LGPLv3.