❓ What are B1–B4 bits and how do they affect ZLEDS animation playback?

🎛️ B1–B4 Case Commands

B1–B4 bits are part of each frame’s data in a ZLEDS animation. When a frame starts with a value between 1 and 15, these bits trigger a built-in command instead of lighting up LEDs directly. These commands let you adjust playback behavior on the fly, such as brightness, speed, or fade style, all within the animation itself.

Case 1 through 14 commands will still display LEDs based on the values from L1–L40, allowing each frame to both light up and adjust playback characteristics.

Case 15 is reserved for advanced instructions. In this mode, the LEDs from the last non–Case 15 frame remain lit while the new frame uses its L1–L40 data exclusively for internal control actions like memory jumps, loop logic, or playback rules.

This allows sequences to adapt dynamically as they play, giving you professional-looking results without needing external controls.

🟠 = Bit ON, ⚪ = Bit OFF

💡 PWM Brightness (L1–L4)

Value L1–L4 Description
0 ⚪ ⚪ ⚪ ⚪ No change
1 ⚪ ⚪ ⚪ 🔴 Lowest Brightness Setting
3 ⚪ ⚪ 🔴 🔴 Medium Brightness
14 🔴 🔴 🔴 ⚪ Highest PWM Brightness
15 🔴 🔴 🔴 🔴 Constant ON (no PWM)

⏩ Playback Speed (L5–L8)

Value L5–L8 Description
0 ⚪ ⚪ ⚪ ⚪ No change
1 ⚪ ⚪ ⚪ 🔴 Slowest playback
3 ⚪ ⚪ 🔴 🔴 Slightly faster
7 ⚪ 🔴 🔴 🔴 Mid-speed
12 🔴 🔴 ⚪ ⚪ Fast
15 🔴 🔴 🔴 🔴 Fastest playback

🌅 Fade In (L9–L10)

Value L9–L10 Description
0 ⚪ ⚪ Instant ON (default)
1 ⚪ 🔴 Slowest fade in
2 🔴 ⚪ Medium fade in
3 🔴 🔴 Fast fade in

🌇 Fade Out (L11–L12)

Value L11–L12 Description
0 ⚪ ⚪ Instant OFF
1 ⚪ 🔴 Long fade out
2 🔴 ⚪ Medium fade out
3 🔴 🔴 Short fade out

🧠 Memory Slot Jump (L13–L16)

Value L13–L16 Description
0 ⚪ ⚪ ⚪ ⚪ No change
1 ⚪ ⚪ ⚪ 🔴 Jump to Slot 1
5 ⚪ 🔴 ⚪ 🔴 Jump to Slot 5
10 🔴 ⚪ 🔴 ⚪ Jump to Slot 10
15 🔴 🔴 🔴 🔴 Jump to Slot 15 (last available memory slot)

🎞️ Mini Loop Start Frame (L19–L24)

Marks which frame should begin the mini-loop. Must be paired with a valid repeat count (see next table), or this command will be ignored.

Value L19–L24 Description
0 No action
1 Start loop at Frame 1
5 Start loop at Frame 5
17 Start loop at Frame 17
33 Start loop at Frame 33 (maximum supported)

🔁 Mini Loop Repeat Count (L25–L32)

Defines how many times to repeat the mini-loop. If set to 0, the mini-loop command will be ignored.

Value L25–L32 Description
0 Disable loop
1 Repeat 1 time
3 Repeat 3 times
16 Repeat 16 times
255 Maximum repeat count

⚠️ Disclaimer

All B1–B4 CASE commands have been tested extensively. However, due to the open-ended way these commands can be combined, there may still be unintended results.

The ZLEDS system does not currently include safeguards to prevent conflicting command combinations. Using multiple CASE commands in quick succession or applying them improperly may result in:

  • Flickering or frozen LEDs
  • Unexpected brightness or speed shifts
  • Playback glitches or controller confusion

Tip: Test your custom sequences thoroughly before live use.

Category: Command Bits

Tagged in :

Leave a Reply

More Articles & Posts

error: ⚠️