Git Product home page Git Product logo

led's Introduction

LED Library for Arduino - ezLED

This library is designed for Arduino, ESP32, ESP8266... to control LED: on, off, toggle, fade in/out, blink, blink the number of times, blink in a period of time. It is designed for not only beginners but also experienced users.

ezLED stands for easy LED, which mean that the library is easy to use.

Features

  • Turn on/off
  • Toggle between on and off
  • Fade in/out
  • Blink
  • Blink with the number of times
  • Blink in a period of time
  • Cancel the blinking or fading anytime
  • Support both control modes: CTRL_ANODE and CTRL_CATHODE
  • Get the on/off LED's states: LED_OFF, LED_ON
  • Get the operation LED's state: LED_IDLE, LED_DELAY, LED_FADING, LED_BLINKING
  • All functions are non-blocking (without using delay() function)
  • Easy to use with multiple LEDs

Available Functions

  • ezLED(int pin)
  • ezLED(int pin, int mode)
  • void turnON()
  • void turnON(unsigned long delayTime)
  • void turnOFF()
  • void turnOFF(unsigned long delayTime)
  • void toggle()
  • void toggle(unsigned long delayTime)
  • void fade(int fadeFrom, int fadeTo, unsigned long fadeTime)
  • void fade(int fadeFrom, int fadeTo, unsigned long fadeTime, unsigned long delayTime)
  • void blink(unsigned long onTime, unsigned long offTime)
  • void blink(unsigned long onTime, unsigned long offTime, unsigned long delayTime)
  • void blinkInPeriod(unsigned long onTime, unsigned long offTime, unsigned long blinkTime)
  • void blinkInPeriod(unsigned long onTime, unsigned long offTime, unsigned long blinkTime, unsigned long delayTime)
  • void blinkNumberOfTimes(unsigned long onTime, unsigned long offTime, unsigned int numberOfTimes)
  • void blinkNumberOfTimes(unsigned long onTime, unsigned long offTime, unsigned int numberOfTimes, unsigned long delayTime)
  • void cancel(void)
  • int getOnOff(void)
  • int getState(void)
  • void loop(void)

Available Examples

How To Install the Library

References

led's People

Contributors

arduinogetstarted avatar mcsarge 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.