WemosLibrary
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
Implemented classes
WLed
Supported Boards
Supports WEMOS Builtin LED
Default Settings
Pin: GPIO02/D4
Dependent Library
None
Examples
#include <WLed.h>
WLed led;
void setup() {
led.setup();
}
void loop() {
led.loop();
led.on();
delay(500);
led.off();
delay(500);
}
WRgb
Supported Boards
WEMOS WS2812B RGB Shield
Default Settings
Pin: GPIO04/D2
Dependent Library
Adafruit NeoPixel
Examples
#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);
}
WButton
Supported Boards
Supports WEMOS Button Shield
Default Settings
Pin: GPIO00/D3
Dependent Library
None
Examples
#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;
}
}
WRelais
Supported Boards
Supports WEMOS Relais Shield
Default Settings
Pin: GPIO14/D5
Dependent Library
None
Examples
#include <WRelais.h>
WRelais relais;
void setup() {
relais.setup();
}
void loop() {
relais.on();
delay(500);
relais.off();
delay(500);
}
WBuzzer
Supported Boards
Supports WEMOS Buzzer Shield
Default Settings
Pin: GPIO05/D1
Dependent Library
None
Examples
#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);
}
WAmbientLight
Supported Boards
Supports WEMOS Ambient Light
Default Settings
Pin:
- GPIO05/D1
- GPIO04/D2
Default I²C Address: 0x23
Dependent Library
BH1750
Examples
#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);
}
WCan
Supported Boards
Supports a custom build CAN Shield with MCP2515
Default Settings
D5 SCK D6 MISO D7 MOSI D8 GPIO015 CS D4 GPIO02 INT
Dependent Library
MCP CAN lib
WMqtt
Dependent Library
PubSubClient
WTimer
Helper class
WColour
Helper class
WColourArray
Helper class
WDlt
Logging in the Automotive DLT protocol
Serial
Helper class for serial port communication
Contributing
Contibutions are always welcome! Please provide a Pull Request on Github.
https://github.com/alexmucde/DLTRelais
Donation
If you find this SW useful and you want to donate my work please select one of the following donations:
Paypal Donation:
Github Sponsors:
Copyright
Alexander Wenzel alex@eli2.de
This code is licensed under LGPLv3.