Best Beginner Tutorials
@JasonCoon has a REALLY GOOD set of code tutorials for Pixelblaze. I’m sure he would be more than happy if you adapted these for your class. They cover the basics of additive color theory, HSV colors, PB core concepts, and the most common animation APIs found in almost every pattern.
A set of 2D tutorials here, aimed at the Lux Lavalier, but concepts are portable.
An updated set of 3D tutorials here. This is demonstrated on a volumetric cube kit he sells, but the concepts are fully portable.
On-boarding and Device Bring-Up
Guessing MAC addresses and going through Pixelblaze setup could easily be the kind of chaos that takes an entire session to sort out, if not more.
Here’s what I would recommend. Set each PB up in AP mode, giving them some kind of unique network name. During setup mode, they have part of their MAC address in the name, so you could use that to help ID them. Do this one at a time beforehand, and label the device with the name, ID and password. Then each person will know which network to connect to. For a reduced chance of accidental cross-connection, give them different network passwords too. This should work reliably as long as your university doesn’t employ rogue AP destroying techniques. They will be able to continue to connect to the devices at home or anywhere. However, their devices won’t be connected to the internet while on the PB network. It can be a bit of a pain switching back and forth between networks to google something, but will prevent the chaos of a classroom of students trying to reconfigure wifi each class if they need to bring them home to work on things.
Managing Many Pixelblazes
Most of it would be handled by labeling the physical device, but here are a few other tips for things that will likely come up:
- If you have trouble connecting to a PB, try power cycling it. In AP mode, the channel is picked randomly, so it’s possible some will sometimes land on a busy/noisy wifi channel.
- Ensure sufficient power and/or reduce max brightness to avoid brown-outs. LEDs can pull a lot of current, and can change power draw extremely quickly. If a power supply and/or wiring can’t keep up and voltage drops low enough, Pixelblaze can brown-out causing a reset. Most of the time this isn’t super obvious since it boots back up quickly (though the orange status LED will flash), but if it resets too frequently it will start activating fail-safe modes and can end up refusing to output LED data until power cycled.
- When in doubt, disconnect LEDs and power PB separately so you can get back in the interface and change settings if needed to reduce power draw.
- For best signal, keep wires or other metal away from the antenna (the thin overhanging part of the board)
- Click the Save button before closing the tab/browser. Otherwise it’s easy to lose your changes. While the editor shows changes immediately, they aren’t permanently stored anywhere until saved. There’s a hidden autosave that keeps a few copies in browser local storage, but it has many caveats and isn’t good enough to rely on yet. You can poke around with it in the browser console.
restoreAutoSave()
for the most recent and JSON.parse(localStorage.getItem("autoSave"))
for a raw list of the last 10 changes. However, it’s tied to the host, so it will change if they are accessing PB via different IP addresses.
- Encourage occasional backups (from the Settings tab), especially if they are modding the hardware.
Best LEDs
Your 30 pixel strips, 8x8, and 32x32 matrices are good places to start.
I sell 1 meter 60 pixel SK9822 strips (like DotStar) that are also a good starter, and support HDR to boot. You might want to get one just to compare and demonstrate how color bit depth impacts colors, especially at low brightness levels.
A lot will depend on what they want to use them for. Pebbles are great for wearables, since they are more flexible whereas strips tend to only want to bend along one axis.
Accelerometers and Sound
Pixelblaze ships with a good handful of sound reactive patterns, and more on the community pattern site, but there aren’t a ton of accelerometer examples. I think most of those end up being application specific, so haven’t been shared as frequently.
I think the easiest way to get started with the accelerometer is a basic G force magnitude measurement, by calculating the length of the 3D vector: g = hypot3(accelerometer[0], accelerometer[1], accelerometer[2]) * 52
will sit around 1.0 while at rest in earth’s gravity.