ProjectsWithRed / nanoleaf

Modular NanoLeaf lights, create custom shapes, with ability to transform to a 4-digit display made up of 7-segment digits.
Other
105 stars 13 forks source link

number of ICs, config problem #6

Open matitoprzechvj opened 4 months ago

matitoprzechvj commented 4 months ago

Hey, i am trying to make that digital clock, i have all segments already wired and set up. I'm using ws2812b leds which have 1 IC per 1 led, what number should i put here and in wled led count configuration to make it work? Every segment has strip containing 9 leds.

const int NUM_OF_SEGMENTS = 28; // Number of total segments the whole display contains. ----> const int ADDR_LEDS_PER_SEG = 9; // Number of addressable LEDs (ICs) per segment. const int SEGS_PER_DIGIT = 7; // Number of segments that make up 1 digit. const int NUM_DIGITS = 10; // Number of digits each 7 segment digit can display, 0-9. -----> const int NUM_FIRST_LEDS = 9; // Number of first set of 3 addressable LEDs which are only used to set colours.

When im trying config as shown above only 3 segments and first strip that controlls the colours work

matitoprzechvj commented 4 months ago

okey figured it out, i had to skip 6 first leds from first control strip, now i have different problem, digits are mirrored or reversed, for example when i manually set digits to 5 5 5 5 they are showing as 2 2 2 2 one way or another, but digits like 1 3 are displaying fine

ProjectsWithRed commented 4 months ago

Hi,

You have chosen the correct numbers for most variables, but for the NUM_FIRST_LEDS, it should still be 3, and you just need to make sure you have 3 LEDs at the beginning.

What did you put as the length in the WLED app in the LED preferences configuration? In your case, it should be (974) + 3 = 255, 9 LEDs per segment, 7 segments per digit, 4 digits, plus the 3 in the beginning.

For the mirrored or reversed, did you follow the arrow correctly on the LED strips? Also double check the wiring.

Thank you, Reda

On Tue, 5 Mar 2024 at 23:03, matitoprzechvj @.***> wrote:

okey figured it out, i had to skip 6 first leds from first control strip, now i have different problem, digits are mirrored or reversed, for example when i manually set digits to 5 5 5 5 they are showing as 2 2 2 2 one way or another, but strangely digits like 1 3 are fine

— Reply to this email directly, view it on GitHub https://github.com/ProjectsWithRed/nanoleaf/issues/6#issuecomment-1979785963, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASMW6QMDR2IRC2LYU2JHLMDYWZFLDAVCNFSM6AAAAABEHCFWWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZG44DKOJWGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

matitoprzechvj commented 4 months ago

in my case, its perfectly fine when it is laying cable side up, its showing number correctly and everything works, ofc i need to flip it so then the numbers are upside down, picture attached, is there anything i can do in the code to idk reverse it or mirror, or i need to re-wire everything? 431125315_331672456036560_7729020972663466990_n

matitoprzechvj commented 4 months ago

Okay, re wired everything and now it works fine, thanks

ProjectsWithRed commented 3 months ago

That's amazing to hear! Good stuff!