alexmaurer-madis / statusled Goto Github PK
View Code? Open in Web Editor NEWLibrary to drive a status led
License: MIT License
Library to drive a status led
License: MIT License
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.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.