Code Monkey home page Code Monkey logo

arduino-blinkenlight's Issues

Add a Bool to return a value to pattern blink

There could be a function like this:

bool pattern(int num, SpeedSetting speed, bool repeat = false)

Then the blink code would play only once, and some action by another function could be taken as soon as the blink is over. Like this:

If I put my hand over a distance sensor, it would blink the number of millimeters that the hand is over the sensor. But then some function could only allow another "distance measure by the sensor" when the number of mms blinked is over. So the bool argument would indicate the end of the blink pattern (for a repeat = false)

Thanks!

How to change fade_speed on the fly?

Hi! When using fadinglight, I need to change on the fly the time in ms that fade_speed changes, when using patterns. For instance, If I want to use a pattern blink that takes 2 seconds to be fully on and 2 seconds to be fully off, I need to decrease fade_speed to 2ms. But if I'll use 200 ms to be fully on and then 200 ms to be fully OFF, 30ms as fade_speed works better. So how can I, in the same code change the fade_speed?

Could Fade_speed be put as a parameter inside that speed Setting struct, that allows us to change the pattern blink settings on the fly?

Thanks a lot for your library!

Best Regards, Rodrigo

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.