Giter VIP home page Giter VIP logo

statusled's People

Contributors

alexmaurer-madis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

statusled's Issues

ledSetCount first cycle blinks count-1

Hello,
Thank you for publishing this code - it is exactly what I was looking for. I am by no means an expert, nor do I presume to critique your code, but I have found that when using ledSetCount, the first time the sequence is run, only count-1 blinks occur. For example:

#include <statusled.h>

StatusLed sl = StatusLed();

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  
  uint32_t currentMillis=millis();

  sl.ledSetCount(3, 0.1, 0.4, 1);

  if(sl.process(currentMillis)) {           // Calling process will return true if the state of the LED has changed
    digitalWrite(LED_BUILTIN, sl.state);    // Update output (use !sl.state if you must invert the output)
  }
}

After reset, only 2 blinks and after the 1 sec pause, then 3 blinks thereafter.

If I am incorrectly calling the function, please advise.

Thanks.

Stop blinking

Hi

What is the suggested way to blink for say 20 seconds then stop? Once blinking starts it does not stop unless set off.

However there is no concept of wait before off?

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.