Bookshelves: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
No edit summary
No edit summary
Line 33: Line 33:


Here's a demo sketch that shows a rainbow pattern with sparkles: [https://gist.github.com/scottyallen/1373156296b4b67d7dcafb0459ad1715 demo_reel_bookcase.ino]  It has all the correct configuration for the various strip lengths and led types.
Here's a demo sketch that shows a rainbow pattern with sparkles: [https://gist.github.com/scottyallen/1373156296b4b67d7dcafb0459ad1715 demo_reel_bookcase.ino]  It has all the correct configuration for the various strip lengths and led types.
=== LED segments ===
If you want to do animations that take into account the specific locations of the leds on the bookcase, here's a complete mapping of each led segment, where a segment is defined as the strip of led between any intersection with another led strip.
[[File:Bookcase_led_segments.png]]
<pre>
segment, strip, start_index, num_leds
1, strip2, 0, 40
2, strip2, 40, 65
3, strip1, 0, 41
4, strip8, 0, 40
5, strip2, 105, 66
6, strip4, 0, 24
7, strip4, 24, 5
8, strip4, 29, 10
9, strip1, 41, 26
10, strip3, 0, 10
11, strip6, 0, 9
12, strip8, 40, 10
13, strip5, 0, 4
14, strip5, 4, 10
15, strip3, 10, 14
16, strip8, 50, 15
17, strip7, 0, 25
18, strip7, 25, 15
19, strip7, 40, 65
20, strip1, 67, 105
21, strip2, 171, 106
22, strip1, 172, 105
</pre>

Revision as of 21:40, 28 April 2016

Construction Plans

Bookshelves.jpg

LED Strips

Bookshelf LEDs layout.jpeg

LED Strip Mapping

Strip Arduino Pin Number of LEDs
Strip 1 2 277
Strip 2 3 277
Strip 3 4 24
Strip 4 5 39
Strip 5 6 14
Strip 6 7 9
Strip 7 8 105
Strip 8 9 65

The LEDs are WS2812B chips, with color order GRB.

Demo arduino code

Here's a demo sketch that shows a rainbow pattern with sparkles: demo_reel_bookcase.ino It has all the correct configuration for the various strip lengths and led types.

LED segments

If you want to do animations that take into account the specific locations of the leds on the bookcase, here's a complete mapping of each led segment, where a segment is defined as the strip of led between any intersection with another led strip.

Bookcase led segments.png

segment, strip, start_index, num_leds
1, strip2, 0, 40
2, strip2, 40, 65
3, strip1, 0, 41
4, strip8, 0, 40
5, strip2, 105, 66
6, strip4, 0, 24
7, strip4, 24, 5
8, strip4, 29, 10
9, strip1, 41, 26
10, strip3, 0, 10
11, strip6, 0, 9
12, strip8, 40, 10
13, strip5, 0, 4
14, strip5, 4, 10
15, strip3, 10, 14
16, strip8, 50, 15
17, strip7, 0, 25
18, strip7, 25, 15
19, strip7, 40, 65
20, strip1, 67, 105
21, strip2, 171, 106
22, strip1, 172, 105