PROJECTS LED Matrix Pillows
also generate pixel locations from a JavaScript
program (Figure
W
). Download the code file
PixelPillowMapperCode.txt from the project page
at makezine.com/go/pixelblaze-pillows, then
paste its contents into the Mapper text box.
This code specifies pixel locations for the two
pillows using variable parameters to define their
orientations and separation. Click the Save button
to retain the new mapping. You’ll know the map
is correct when an affirmative message in green
text appears below the mapper box and the
image showing the LED positions resembles the
physical layout of your pillows’ LED matrices.
You may also want to experiment with the Fill
and Contain options, which stretch the pattern to
eliminate empty space at the periphery or keep
empty space to maintain the pattern’s aspect
ratio, respectively. This choice is strictly aesthetic.
6. ATTACH DIFFUSER AND COVER
A 20"×20" square of quilt batting over the LEDs
helps to diffuse emitted light and prevents twist
tie wires from poking out. Figure
X
shows the
difference in appearance of LED light shining
through (from right to left) no diffusing material, a
single layer of batting, and a double layer.
Place a 20" square of batting over each matrix,
then insert the pillow and batting into the cover.
Plump the pillow and tug the corners to ensure
they fill the cover evenly. Smooth the batting if it
has bunched up, then zip the covers closed,
leaving just a small gap for the wiring to emerge.
TIP: The fuzzy white shag fabric is an amazingly
good light diffuser as well, so not only is it a fun
texture, its a functional element.
Arrange your pixel pillows on a sofa or bed,
tucking the wiring out of the way to hide it. If you
change the pillow orientation and position, be
sure to update the Pixelblaze Mapper.
7. PICK YOUR PATTERNS
This last step is by far most fun to execute. The
Pixelblaze controller comes with several dozen
animation patterns pre-installed. Switching
between them is as simple as clicking the pattern
name in the app’s Patterns tab. The pillow display
will update immediately.
You can view and modify the pattern code in the
app’s code editor. Select the Edit button next to
a specific pattern in the Patterns tab to bring its
code into the editor window. You can also access
the pattern editor directly via the Edit tab and
create new patterns there or upload them from
pattern files in the .epe format.
Only a few lines of code are required to create
your own original pattern, like this Bullseye
pattern that sets the pixel colors based on their
distance from an oscillating central point. The
oscillations around the center are created easily
in the code with the Pixelblaze editor (Figure
Y
).
When making or modifying patterns you can
verify that your color settings and pixel map are
correct by comparing the editor pattern preview
window to the actual pillow display (Figure
Z
). If
you’re not comfortable with jumping into coding
your own patterns, making small changes to
existing code and watching the real-time display
response is a great way to learn.
The Pixelblaze pattern editor has far too many
powerful and useful features to describe here,
but you can explore them in greater depth at
W X
54 makezine.com
M83_048-55_PixelPillow_F1.indd 54M83_048-55_PixelPillow_F1.indd 54 10/10/22 2:14 PM10/10/22 2:14 PM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.3.208