wokwi / arduino-libraries

Online Playgrounds for popular Arduino libraries
10 stars 6 forks source link

ArrayOfLedArrays #14

Closed marmilicious closed 4 years ago

marmilicious commented 4 years ago

Is the Data input connection on strips on the same end as pixel 0? Seems like it's running from the other end of where the data connection is, which I only noticed after putting this example together. Or maybe I'm not understanding how the wiring works?

Anyway here's the ArrayOfLedArrays example. I was going to put these array examples under a Multiples folder (the same as the FastLED github): https://github.com/FastLED/FastLED/tree/master/examples/Multiple

urish commented 4 years ago

Actually, that's a good point. I think it makes more sense to put it next to pixel 0, rather than at the bottom of the matrix?

On the other hand, if we add support for specifying the starting point of the matrix, then this won't matter too much?

Regarding the subfolder, this currently isn't supported (it won't get picked up by the site). How about adding the Multiple as a prefix to the folder name instead?

marmilicious commented 4 years ago

Ok, I'll switch the naming.

If it's a strip display seems like pixel 0 should always be at the same end as the data input, just like real strips. If the display is showing a matrix then I don't really think it matters where the data connects, because those do vary even on real life matrix panels. It could just connect to the midpoint of a side.

Btw, it occurred to me that "neopixel" is an Adafruit brand name, similar to their dotstar name for apa102 pixels. I wonder if it should just be wokwi-pixel instead of wokwi-neopixel?

Maybe types: wokwi-pixel, wokwi-pixel-strip, wokwi-pixel-matrix (Actually, is there be a basic strip type? Or is it better to use matrix even when only displaying a strip?)

urish commented 4 years ago

If it's a strip display seems like pixel 0 should always be at the same end as the data input, just like real strips. If the display is showing a matrix then I don't really think it matters where the data connects, because those do vary even on real life matrix panels. It could just connect to the midpoint of a side.

Yes, that makes sense. Right now, we only have a single pixel, or matrix (either as matrix of pixels or canvas). I think it will makes sense to introduce another strip type, instead of using matrix for this purpose, since people already have this distinction in their minds, and we've already spotted two differences: strips connectors need to be near the 0-pixels, and strips don't need matrix layout (e.g. serpentine) configuration.

So I'm thinking strips could be kept simple, with just number of LEDs (and type of renderer? canvas vs individual pixels?), while matrices will have all the extra options.

Btw, it occurred to me that "neopixel" is an Adafruit brand name, similar to their dotstar name for apa102 pixels. I wonder if it should just be wokwi-pixel instead of wokwi-neopixel?

If we decide on renaming, I'm thinking that wokwi-led-strip and wokwi-led-matrix may make more sense? I used the name neopixel since I think most beginners are familiar with it (also looking at FastLED examples, I see they are using new names).

p.s. how about we move this discussion into own issue?