Skip to content

marcinbor85/BlinkCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlinkCode Library

BlinkCode Library is used for indicating flashing fault codes or various numeric settings. It uses long pulses for indicating tens and short pulses for indicating onces. Library is implemented in C++ with build-in Arduino port, but it is easy to port to different architecture.

Features

  • asynchronous non-blocking API with background processing
  • hardware independent high-level architecture
  • works well with digital, analogs and other signal output backends
  • unlimited number of parallel blink codes
  • easy to use with Arduino boards
  • support 1-99 codes numbers
  • configurable pulse times

Example

Basic code trigger:

#include <Arduino.h>

#include <BlinkCode.h>

constexpr int LED_PIN = 13;

using namespace blinkcode;

BlinkCode code(LED_PIN);

void setup()
{
    pinMode(LED_PIN, OUTPUT);           // Digital output for led

    code.begin();                       // Initialize and register blink code object
    code.trigger(12);                   // Start flash code - single long, double short
}

void loop()
{
    BlinkCode::service();               // Asynchronous service routine, should be called periodically
}

About

Asynchronous BlinkCode library for indicating flash fault codes

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages