Skip to content

LED are too dim when using analog write #11

Description

@spuder

Thank you for this library. It works perfectly, however the LEDs never seem to get above 50% brightness

#include <singleLEDLibrary.h>
sllib redLed(6);
sllib greenLed(9);
sllib blueLed(10);


void setup() {
  redLed.setOnSingle();
  blueLed.setOffSingle();
  greenLed.setOffSingle();

}

void loop() {
//    redLed.breathSingle(1200);
//    greenLed.breathSingle(1200);
//    blueLed.breathSingle(1200);
}

I suspect what is happening is that digitalWrite range is 0-100 whereas analogWrite range is 0-255.

Here is my setup

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions