Time to begin a new series of How to Program

An interesting note on the state of the survey, at 23 responses, not ONE has said they know JavaScript. Lots of new coders (easily half, likely more), a smatter of experienced folks, but the one group I’d expect to see more of, folks who know JavaScript but want to learn more PBish specifics, no sign of. Weird. I think this continues to point out a huge untapped market, @wizard, of the millions of JS coders who don’t know PB exists, and end up using WLED or raspberry pi, or other nonJS tools to do LEDs who would likely purchase a PB if they realized how much they’d be able to easily code with it.

Definitely an untapped group of folks. I think perhaps this is already filtered group of responses given the topic.

Learning to code and making it easier are goals I’ve had for PB, so I’m very excited to see everyone here looking to learn!

1 Like

Perhaps, but I’d have expected a percentage who were JS fluent but wanted to learn PB specifics, and intentionally allowed folks to pick 2 answers, to cover those sort of overlaps.

Based on most of the vocal users (not just this poll), our percentage of JS fluent users on this forum is way way lower than it should be.

It’s definitely hard to size the number of people who are not on the forum because they got their needs filled with default patterns (either no need to customize them, or found the examples sufficient).

Then there’s probably people who know how to program and thus skipped reading this topic/voting. I didn’t vote because it said it was geared towards newbie programmers.

This poll had a high number of total responses compared to prior polls. I think time spent on content for them is really well spent.

3 Likes

I’ve got one project that I’m tinkering with, because I want to add sound to the Block Reflections pattern. When I started digging into the code, I’M LOST! I’ve always been code-adjacent, and have only half-assed started to learn coding before getting too busy to really learn well.

Working off a V2, but just ordered a V3 and pico.

I’m a tech writer for a living, so maybe I can offer some help in documenting the how-to?

2 Likes

Happy for all feedback as I go… Adding sound is absolutely not a 101 topic, because you need to understand so much first. That said, I recently discussed how to add sound to a pattern, in a very abstract way.

1 Like

Thanks for the link. I’ll take a look later after work today. My plan was to compare Blink Fade to the Sound version of Blink Fade, and see if I could figure it out. The art panel I’ve created looks fantastic with Block Reflections, and I’d love to add a sound element to it.

I wasn’t so much suggesting that sound should be in 101, just that my attempts to figure out sound made me realize how badly I need the 101!

1 Like

I wonder if this is partly a function of the age of the responders. I’m in my early 50’s. I got a CS degree back in the early 90’s using Fortran, Ada, Modula-2, C, and a little assembly. JavaScript didn’t exist. I got a job as a Unix System’s Admin and went that direction for many years… so add in shell scripting and Perl… but largely programing was never really used except to make a tool to do specific functions needed in my job. I then picked up some Python… but oddly never to Java nor JavaScript. Now I do software support of a large application but again no real programming… more customer managing. So for me I have been away from real coding for like 30 years… I learned some in school but then never really used it in a job so it was mostly forgotten. Leds bring me immense joy :slight_smile: but it’s a battle to get my brain to think programmatically. Sure I understand the basics(looping, conditions, variables, etc) well. I find it fascinating the way others are gifted in math knowledge or bit manipulation etc… which my brain takes way too long to follow along. I really appreciate the community here and the number of different ways you are all trying to teach/help us. I happened into this world(PB) by being a Jason Coon fan and seeing him mention PB in a couple projects. I was working thru the FastLED world… but am enjoying the instant “gratification” of the PB.

1 Like

I guess we need some demographics to confirm or refute that.

I’m in the same age range, so I started with BASIC way back…

I think given data like this:

JavaScript is now used by more than 16.4 million developers globally, says a survey of more than 19,000 coders — making it the world’s most popular programming language “by a wide margin”

And that’s not new, it’s been the most used language for many years now.

My feeling is that PB has a huge untapped audience of JS coders who would use it over WLED and FastLED (in C), Micropython (microcontrollers), or whatever options are available for a Pi (pretty much any you can think of), BUT few have heard of PB. The problem isn’t a lack of audience, it’s a marketing failure to reach the people most inclined.

1 Like

I would have to agree that the word has just not really gotten out about PB. I only happen onto it because I saw Jason mentioned it. “A happy little accident” as Bob Ross would say. I had no idea all that existed until I started actively looking/searching for what was out there in the DIY world of Leds and microcontrolers.

1 Like

I too am in my 50’s and have worked in tech for the last 30, but I’m interested in following along. I mostly code in shell, Perl, & Python, it’s been decades since I wrote anything in a compiled language. So I have a great grasp of programming, but not the specific stuff fundamental to writing for the PB.
Plus, my particular use case is a little different from a lot of people in that I’m using it to drive my faux Nanoleaf panels and I want to do stuff that’s unique to that kind of layout.

2 Likes

I’m pretty comfortable with whatever code is written in to modify and to extend. I keep seeing a lot here on the forums about pixelblaze and the learning curve, the difficulty etc but I’m still pretty lost at exactly what that is referring to. As far as I’ve skimmed (still working on the physical build side thus far) there’s mainly beforeRender and render (+render2d +render3d). Then I see the code heavy on math for various patterns.

What I hoped to find as a programmer myself (that doesn’t like to re-invent the wheel per-se), is an API documentation for either the pixelblaze core, or some higher level type abstraction someone has written to sit on top.

I know the core methods are documented and there are examples here it’s just not really what I was expecting. That’s just the honest truth as a developer coming into this without any idea what it was just a few days ago.

Ideally. I want to build upon the work of others an their patterns quickly, not figure out myself how to start from scratch.

1 Like

Is the written documentation on the PB language not enough for you as an API? What more do you want? Unsure what sort of abstraction would be helpful to you, as it’s already abstracted in the sense that @wizard hides the low level stuff already. We don’t have access to the pixel buffer (yet), as an example.

Serious questions, as I’m trying to figure out why so few people seem to have discovered the power of PB.

A large chunk of the base isn’t coders at all (or not comfortable with how to get started).

I keep hearing people complaining about the math (which is more about the nature of computer graphics, 2D and 3d, and so on…)
Between the many existing videos/articles from the likes of Inigo Quilez, Dan Shiffman, Grant Sanderson and many more amazing educators out there, I’m not planning on delving deeply into the math anytime soon, except specifically to understand how pieces of PB work (so mapping, for one example, and it’s really hard to discuss sin(), let alone function like wave() without discussing the math behind them)

I realize I’m the exception to the rule, but I usually find myself so… I’m a self taught computer geek, math savvy, and I devour videos/articles like the above. PB lies in the intersection of a number of my interests, and perhaps I’m just lucky enough to fall into it with enough background and grasp of concepts that I pulled it all together. Understanding where other people get stuck is important but non-obvious to me, as I’m not there.

It’s not that the current documentation or coding paradigm is wrong! - it’s just that it didn’t align with what I expected to find. And I don’t have anything like a perfect vision either! But that’s my feedback thus far, is that I was met with something different than I expected.

I expected to find something like this:

pb = init( 3dMap );
shape = pb->addElement( 'expanding-sphere', locationX, locationY, locationZ );
shape ->mapHue( inputPin, inputVoltagHigh, inputVoltageLow );
shape->then( shape->reverse() )->loop()
2 Likes

Hahah, you want objects? You want properties? Oh boy, I have some disappointing news for you… (grin)

I’ll be writing up more about this in the next lesson or two. 'Pixelblaze JSish" is actualy pretty clean, for what it does, and kudos to @wizard for his slow expansion adding many new language features, not merely for adding to esp32 based v3, but also backporting it to the esp8266 based v2. He’s been pretty clear on the limits of the language, and pushing them slowly. He’s added lots of array functions, and a transformation API, for example.

@gmcmicken, This is great feedback! Indeed a high level API like that might exist some day, and parts of that are out there in existing patterns.

I think something like this could make sense for a raster/buffer type system, where shapes are painted onto a canvas.

That 3rd line is interesting, where you tie a shapes hue to and analog input pin with some scaling. Elements of that are planned, like tying a slider UI control to a physical input, which could in turn control hue.

Your pseudo code kind of reminds me of some object/sprite/vector animation frameworks.

You already figured out that Pixelblaze is a bit different, very pixel focused on a lower level, and more about generative procedural textures than object animation. For LED art I think this makes sense, where the light is illuminating something, accenting it, giving it life. A counter-example for contrast would be a high res flat LED panel/wall where showing graphics, text, video, etc are the focus.

Somewhere in-between would be Pixelblaze with a 2D panel, but this still tends to be applied toward generative art.

We’ve talked about a raster canvas concept on the forums before, where a 2D buffer can be manipulated and drawn into, something like that could more easily support shapes, text, images, maybe video, and then taken and mapped back on to physical pixels (which don’t need to be in any regular configuration). Something like that could then have an animation framework layered on top to assist with moving things around in that canvas. Thats all future ideas stuff though.

I love hearing feedback like this, since it helps shape what it will be in the future.

1 Like

@wizard, you literally touched on one major subject I’ve come to realize really defines the line between leds and screens. You could make a massive led matrix, equivalent to a poor quality VGA screen (say 640x480), it’s slightly over 300,000 pixels… And use faster controllers than a PB… But at some point, you’ve left the LED “sphere” and crossed into a whole different territory that can do all sorts of wonderful things but you also lost the essence of what LED art is about. You nailed it above. It’s about illumination. The sheer limit of even a small 16x16 matrix or even a 64x64 panel (which at 4k pixels is already pushing the limits of “led space”) makes you think in very different ways, and items like the many projects we see here aren’t just “screen art”

That said, I love doing matrix patterns too.
But I see items in Coding Train or on Shadertoy that just wouldn’t work as a led pattern, despite being amazing as screen art. Some of my code attempts absolutely are inspired by trying to take something and seeing if I can make it work inside the firm limits of a 16x16 led matrix.

1 Like

So do I! And there is still something beautiful about an LED panel (either with some diffusion so pixels merge, or keeping them isolated as separate elements) displaying generative art, over what can be done on a proper screen.

2 Likes

I agree. Upon typing in “Led controller” in Google you are flooded with results for crappy controllers like “sp108”. Spent nearly $200 on these controllers over a period of several months before I found out about Pixel Blaze. PB is so much more than just a LED controller and it knocks out all the competition, by far.

1 Like

Great news, I missed the first round last year and look forward to another round.

Here’s a “category” for your poll that better describes me. I conceptually understand most of the programs, and can modify them for my needs, but I couldn’t write one from scratch without a lot of copying.

I’ve learned almost everything from the documentation and the many well documented examples (thank you!). Not being a programmer, one of my stumbling blocks now, is not understanding/remembering some of the syntax or operators, such as “==”, or what can, must, or must not be inside a function. I see nested functions…when are they needed or useful? Then there’s the math, which is way over my head, but I am quite content just playing with what other’s have written and shared. Some of my challenges are simply age memory related deficits. Nothing to do there except constant immersion. I’ve been away from PB coding for much of last year, but am ready to dive in again.

I really appreciate all the educational info that was added when v3 came out. Sometimes I’ll open up one of the earlier programs and be surprised to find tutorial comments that I don’t think were there before. Comments are a really great way for me to learn coding!

1 Like