Giter Site home page Giter Site logo

rgbled's Introduction

Hi 👋, I'm Steven

A passionate developer from France 🇫🇷


GitHub Streak

💫 In a Nutshell:

  • 🔭 I’m currently working on ... Node.JS, NuxtJS (VueJS), ReactJS, ElasticSearch and Kibana
  • 👨‍💻 Most of my projects are available at https://github.com/wilmouths?tab=repositories
  • 💬 Favourite quotation: ... "Quand on a 20 ans, on crache le tonnerre par devant et on pète les éclairs par derrière." - Marius

💻 My Tech Stack:

javascript typescript react vuejs nuxtjs vuetify nestjs nodejs express ruby bash git mongodb postgresql redis nginx


🔥 More Stats:

rgbled's People

Contributors

calania avatar davidob avatar hpreston avatar izhanghui avatar manghao avatar per1234 avatar somebuddy87 avatar wilmouths avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rgbled's Issues

Support for multiple LED's

Hi there.
I am trying to control 3x CA RGB leds but it appears to be impossible.

#define R1_PIN  12
#define G1_PIN  14
#define B1_PIN  27
#define R2_PIN  26
#define G2_PIN  25
#define B2_PIN  33
#define R3_PIN  32
#define G3_PIN  13
#define B3_PIN  19

// Create instances of the RGBled class for each LED
RGBLed led1(R1_PIN, G1_PIN, B1_PIN, RGBLed::COMMON_ANODE);
RGBLed led2(R2_PIN, G2_PIN, B2_PIN, RGBLed::COMMON_ANODE);
RGBLed led3(R3_PIN, G3_PIN, B3_PIN, RGBLed::COMMON_ANODE);

led1.setColor(255, 0, 0);
led2.setColor(0, 255, 0);
led3.setColor(0, 0, 255);

Setting led3 to blue sets all 3 LED's to blue.

I am using an esp32.

Can this library only handle one led?

kind regards,
Jean

Request for Max/Min Brightness for fadeIn/fadeOut

I'm not sure how to modify this to set a maximum brightness for the fadeIn() function. I'm trying to use an LED strip for a night light, and fade to FULL brightness will not be acceptable. Also, in thinking about it, if I wanted to create a "breathing" effect in another project, I would probably only want to fade to a certain minimum brightness before starting to fade back in.

If you have the time, please implement this!

COMMON_ANODE dont work correctly

Hi,

on Arduino Nano 33 BLE sense I can not set the onboard RGB-LED with COMMON_ANODE. With some change in the color function it works for me:

void RGBLed::color(int red, int green, int blue) {
	if (_common == COMMON_ANODE) {
		analogWrite(_red, 255 - red);
		analogWrite(_green, 255 - green);
		analogWrite(_blue, 255 - blue);
	} else {
		analogWrite(_red, red);
		analogWrite(_green, green);
		analogWrite(_blue, blue);
	}
}

I also rewrite your fade function, it seems as it works without the >= / <= stuff:

void RGBLed::fade(int red, int green, int blue, int steps, int duration, int value) {
        float brightness = float(value) / 255.f;
        color(red * brightness, green * brightness, blue * brightness);
        delay((unsigned long) (duration / steps));
}

Brightness function isn't working properly!??!

WELL IF I USE THE FUNCTION INDIVIDUALLY THEN IT WORKS, BUT WHEN COMBINED WITH OTHER FUNCTION LIKE FLASH, IT DOESN'T WORK AND SIMPLY IGNORES THE BRIGHTNESS AND USES FLASH ONLY!!
AND I'M USING THEM IN LOOP SECTION SOMEWHAT LIKE THIS :
led. brightness (code) ;
led. flash(code);
And I'm I doing It right??

I will attach an image too! IMG_20200926_212746.jpg

  • changed the flash color to cyan but in vain!!

Request for non-blocking duration timers

At this moment, the delay for the LED is blocking the program to continue it's loop.
I'm using this library to get a status led flashing in multiple colors, works like a charm.
But in the meantime, I want the webserver running to respond to my requests without having to wait for the delays to complete.
For example: I have one status led that flashes 100ms every 30s, when performing a webserver request, I have to wait up to 30s for it to respond as this library is blocking everything.

Request for rgbw-LEDs support

A small request if the function could be extended to support RGBW LEDs (with a additional white LEDs).
Maybe I have overlooked the possibility to handle it with the existing code, but I don't think so.
In this case an additional pin might have to be declared to be able to control the white LED.

kindest regards

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.