Pixelblaze for Beginners - a tutorial syllabus

Heavily influenced by the expression doc, found at the bottom of the PB editor (and in github)

This is a first pass at a tutorial lesson plan, very subject to change… it’ll start with the most basics, and then flesh out those, assuming you know zero to start with. Feedback will always be welcomed. Ideally, this will eventually become a book of sorts, so letting me know what is clear or what isn’t, is helpful to everyone. More advanced topics will come after the below, but you have to walk before you can run.

How the PB engine works - the 2 stroke engine

  • Step 1 (optional): beforeRender

  • Step 2: render(), or maybe render2D(),render3D()

  • Repeat

Essential concepts

  • 0 to 1 thinking

  • RGB, HSV

  • ws2812 and other types of LEDs

PB Language - How PB is and also isn’t JS

    • Language limitations

  • 16.16 math

  • Operators

  • Logic

  • if/else

  • while/for/break/continue

  • how and why to make a function of your own

    • lambda syntax

    • built in vs custom functions

The Editor - live editing can be your friend

Variables

  • pixelCount, and other variables

  • Watching Variables

  • arrays

    • using arrays with functions

  • Constants

Functions

  • Pixel / Color Functions

  • Math Functions

  • Waveform Functions

  • Array Functions

  • UI functions

    • Sliders

    • Color Pickers

  • Coordinate Transformation Functions

  • Pixel mapping 2D and 3D

  • Input / Output Functions

  • Clock / Time Functions

Sensor Board

15 Likes

Too many things happening this week, so I’ll shoot to start the series next week.

First up: How the PB engine works, from a noncode perspective, and the most minimal program we can write, with enough explaining of what it does to make the code simple enough for everyone.