Skip to content

LED Index wrong #5

@michaelheiml

Description

@michaelheiml

Hi, I noticed that e.g. in example 2 pixel LED 4 is named as index 4.

//turn on LED#4, red
  LEDStick.setLEDColor(4, 255, 0, 0);

But actually, the LED index is from 0 to 9 (LED 1 to 10).
So calling=
LEDStick.setLEDColor(4, 255, 0, 0);
turns on the 5th pixel on the LED strip (not the 4th!)

It is also described wrong in Qwiic_LED_Stick.h where it says in line 48-50

//Change the color of a specific LED 
//each color must be a value between 0-255
//LEDS indexed starting at 1 (<- wrong, index starts at 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions