FastLED / FastLED

The FastLED library for colored LED animation on Arduino. Please direct questions/requests for help to the FastLED Reddit community: http://fastled.io/r We'd like to use github "issues" just for tracking library bugs / enhancements.
http://fastled.io
MIT License
6.42k stars 1.63k forks source link

Reversing every second line in LED matrix #34

Closed olesk75 closed 10 years ago

olesk75 commented 10 years ago

Hi and thanks for the awesome library!

I'm a little hesitant to put this forward, as I might belong to a small minority, but I thought I'd at least mention it and see what you think.

I've bought of of these: https://www.kickstarter.com/projects/311408456/rgb-123-led-matrices

In my case a 16x16 matrix of 256 WS2812B LEDs. Works wonderfully with FastLED with one minor issue: every second row is reversed. This due to the LEDs being wired in a zigzag pattern in the matrix, where led15 is on the first row in the last column on the right, while led16 is one row below in the same column, and led17 one column to the left - you get the idea.

As I let the Arduino (and later the Spark Core whenever FastLED supports it) simply receive data over serial or WiFi from a PC (it "streams" live) I've moved the heavy lifting of reversing every second line to my Python code on the PC in stead of wasting precious cycles on the Arduino. However, I was thinking that I'm probably not the only one that might have LEDs wired in a zigzag pattern, so perhaps this is something for FastLED?

OJ - no relation

kriegsman commented 10 years ago

Hi, and you're among good company. About half of the LED matricies are in plain "row order" and the other half are in "row prime order" aka "serpentine" aka "boustrophedon" order, meaning that they go across one row and then BACKWARDS across the next row.

We'll be adding basic XY matrix support in an upcoming release, and you'll be able to configure whether you have a plain "row order" or whether you have a serpentine layout.

So: yes, we've seen it before and you're not alone, and we're hoping to provide both options for our users when we ship XY matrix support. (No date is set on that yet.)

I'm going to close this "Issue" but I've opened the more general Issue #35 for tracking the XY feature.

focalintent commented 10 years ago

Search the g+ community - I posted a basic xy matrix class to there at some point. (Traveling internationally right now, or id dig it up myself)

--Dg (on mobile phone, pardon terseness and typos)

On Feb 24, 2014, at 12:34 PM, kriegsman notifications@github.com wrote:

Hi, and you're among good company. About half of the LED matricies are in plain "row order" and the other half are in "row prime order" aka "serpentine" aka "boustrophedon" order, meaning that they go across one row and then BACKWARDS across the next row.

We'll be adding basic XY matrix support in an upcoming release, and you'll be able to configure whether you have a plain "row order" or whether you have a serpentine layout.

So: yes, we've seen it before and you're not alone, and we're hoping to provide both options for our users when we ship XY matrix support. (No date is set on that yet.)

I'm going to close this "Issue" but I've opened the more general Issue #35 for tracking the XY feature.

— Reply to this email directly or view it on GitHub.

olesk75 commented 10 years ago

Thanks for the feedback and the pointer - I'll make sure to check the g+ page (and upload the video of the anti-aliased scroller that Kriegsman asked for there ;)

IIroobixII commented 8 years ago

@focalintent I wasn't able to find your video, this might be a dead thread and if it's not too much could you dig up that link as it would answer my question I believe, thanks

focalintent commented 8 years ago

Not sure what video you're referring to - or for that matter the question you'd like answered :)

IIroobixII commented 8 years ago

I'm sorry for the misunderstanding but hopefully you are still able to help me out as i would greatly appreciate it. I was trying to find help on my column matrix serpentine raster matrix I built (very noob 2nd project) 8x17 neopixel and found a comment of yours from 2 years ago quoted "I posted a basic xy matrix class to there at some point." and I thought you had meant you had posted a tutorial/class instead of the actual "class" function as I think you meant on the g+ community. I am trying to treat my matrix as a two dimensional display and I don't fully grasp how to use a 2d array quite yet as I am trying to get something to scroll and was just told that " to transfer the matrix defining the display you want with a one column offset into the LED buffer. This shifts the whole pattern over to the right or left depending on the sign of the offset. " because as of now I am just creating text by the "setpixelcolor" function with each led individually.


From: Daniel Garcia notifications@github.com Sent: Monday, August 15, 2016 12:56:12 AM To: FastLED/FastLED Cc: IIroobixII; Comment Subject: Re: [FastLED/FastLED] Reversing every second line in LED matrix (#34)

Not sure what video you're referring to - or for that matter the question you'd like answered :)

You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/FastLED/FastLED/issues/34#issuecomment-239734166, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AUDrUqPP0ouKfGEMoMXdPvpOs2ChK691ks5qf_98gaJpZM4BkYOb.

focalintent commented 8 years ago

It sounds like you're using the neopixel library - which I generally don't use - if you want specifics on how to scroll a 2D matrix I'd say ask on the g+ group for FastLED if you're using FastLED (http://fastled.io/+) or on adafruit's forums if you're using the neopixel library.

jasoncoon commented 7 years ago

This is possible using the kMatrixSerpentineLayout variable in the XYMatrix demo: https://github.com/FastLED/FastLED/blob/master/examples/XYMatrix/XYMatrix.ino

Another option is this library used with FastLED: https://github.com/AaronLiddiment/LEDMatrix