Giter VIP home page Giter VIP logo

wemoslibrary's Introduction

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:

Image of Wemos D1 Mini AliExpress

Image of Wemos D1 Mini v3 Amazon Germany AliExpress

Image of Wemos D1 Mini Pro AliExpress

The following base boards can be used to use several Wemos Shields in parallel:

Image of Dual Base Amazon Germany AliExpress Dual Base

Image of Triple Base AliExpress Triple Base

Implemented classes

WLed

Supported Boards

Supports WEMOS Builtin LED

Image of Wemos D1 Mini Amazon Germany AliExpress

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

Image of RGB Shield AliExpress

Image of RGB 7 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

Image of RGB Shield AliExpress

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

Image of RGB Shield Amazon Germany AliExpress

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

Image of RGB Shield AliExpress

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

Image of Ambient Light Shield

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:

Donations

Github Sponsors:

❤️ Sponsor

Copyright

Alexander Wenzel [email protected]

This code is licensed under LGPLv3.

Links

https://github.com/alexmucde/WemosLibrary

wemoslibrary's People

Contributors

alexmucde avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.