
How to Create a LED Mask Using Arduino, NeoPixels, and C++ - armaizadenwala
https://armaizadenwala.com/blog/how-to-create-a-led-rave-mask-using-arduino
======
leggomylibro
Fun! It's amazing how ubiquitous WS2812Bs have become in such a short time.
They're wonderful for everything from wearables to signage to room lighting,
and there are 12V versions available if you want to drive longer strings.

Some advice for people seeing this article in 2020: you might consider using a
more modern microcontroller which supports DMA for new projects today. The
ATMega328p which is used in Arduino Unos and Nanos is a reliable workhorse,
but it's also slow and expensive compared to modern 32-bit MCUs.

Check out ESP8266/ESP32 or ARM Cortex-M cores. They're fast enough to make
buttery-smooth animations, they have enough memory for thousands of LEDs, and
DMA lets you set up a continuous data transfer to the LEDs which does not
require CPU time. These days, there are plenty of ARM Cortex-M boards which
work with the Arduino IDE while still being a hair cheaper than "Arduino"
knock-offs, and ESP8266 boards let you control your patterns over WiFi.

If you're starting to learn about embedded development today, it's not a bad
idea to start with more modern hardware; projects like MicroPython and Arduino
support a wide variety of chips.

Also, if you use the Arduino IDE and appreciate their work, consider buying a
genuine Arduino Nano. They cost a bit more than $3-5:

[https://store.arduino.cc/usa/arduino-
nano](https://store.arduino.cc/usa/arduino-nano)

~~~
person_of_color
Im building a setup now. Any tips on libraries for esp8266 to control the
maximum number of leds via i2s DMA?

~~~
semi-extrinsic
If you want maximum number of LEDs, I think you want the four-wire LED strips
that are driven over SPI, like the APA102 and similar. Much faster than bit-
banging on the three-wire strips.

~~~
rowanG077
If you want max number of LEDs you have to use HUB based LED panels. They are
way cheaper. But harder to control.

~~~
person_of_color
Got a link?

~~~
rowanG077
For instance:
[https://nl.aliexpress.com/item/32969045578.html?spm=a2g0o.pr...](https://nl.aliexpress.com/item/32969045578.html?spm=a2g0o.productlist.0.0.61d746ccDp9BcO&algo_pvid=3b98d180-071a-4b30-bd2b-4e4a6a2c25c2&algo_expid=3b98d180-071a-4b30-bd2b-4e4a6a2c25c2-4&btsid=0b0a0ad815832683120521475e1e2f&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_)

You can find how to control them if you search for HUB75. For a couple of
dollars you got 2048 LEDS. You can get them in different sizes and LED
pitches.

------
brailsafe
I saw one of these last night at a show. It was pretty cool, but thought it
was a little confusing to see so many rave masks (led and non-led) among so
many surgical masks on sock people. We need LED rave surgical masks!

~~~
brailsafe
_sick people_

------
midgetjones
This seems an appropriate time to mention Shobaleader One, Squarepusher's live
project, as their stage gear is a sort of Kendo uniform with a full-face LED
matrix.

The masks don't look quite as impressive in the video[0], but live it was
incredible. The LEDs can react to volume, but additionally they were synced
into preprogrammed routines to fit the music, and with very little other light
on stage it was mesmerising.

[0]
[https://www.youtube.com/watch?v=VypU8zojFsY](https://www.youtube.com/watch?v=VypU8zojFsY)

edit: warning! jazz fusion

------
slowboat
This is cool project, the effects look great! makes me think of 'Ruiner'
computer game, the main character had an animated mask set in a cyberpunk
world.

Great work enjoyed the article :)

~~~
armaizadenwala
Thank you! I can't wait to upgrade it with a better microcontroller!

------
pugworthy
Just in time! )'(

------
fnord77
> Any airsoft mesh mask should work.

how about a fencing mask

------
nixpulvis
This mask craze is confusing to me. Not surprising, just confusing.

~~~
sebbecai
I could be wrong, but I've always thought this was connected to Burning Man
(masks are functional there).

------
drcursor
This is the mask that will most likely avoid you getting any kind of
virus/bacteria/human interaction. Great for these pandemia-panic times.

------
LessDmesg
C++? How about no.

~~~
phito
Why would you want to program a microcontroller in any other language?

~~~
jmiskovic
Because C++ is huge language with lot of history baggage that makes it easy to
write bad code. I'd love to use something more elegant like Nim (with disabled
GC). Note that only lowest layer of embedded project has to have direct access
to memory mapped devices and for this I still prefer C.

~~~
nimmer
The new ARC memory manager will replace GC.

