So looks like, clearly, we have a group who needs to start from near zero, and a larger group who might have a bit of knowledge but needs grounding so they don’t feel so lost with PB.
No shame here, the poll shows you aren’t alone, and I’ll work on a set of “lessons” that walks thru the basics of PB language/functionality.
I’m so happy to see someone take on the challenge of teaching average, mere mortals how to create basic patterns. I have three degrees: BS EE 1970, COM SCI 1995 from Iowa State University and an MBA from Stanford 1977. Maybe because I’m 74 and never programmed or designed professionally but I find this approach using JavaScript very non-intuitive. Where are the FOR loops, how do I turn on one or more LEDs for exactly 1s and what color is .2458?
If you can start at the beginning and work up to just the basics like chasing and stacking LEDs, I would be eternally grateful. Forget the cosine(cosine(tangent(sine + 1)) + 2).
So JavaScript is actually not the issue here… We have for loops, but unless you understand how the PB ‘engine’ works, it’ll actually work against you trying to just “make it do stuff”.
Turning an led on for exactly one second is actually quite hard in PB, but we can get very close to it, most of the time.
And as for the color of .2458, it’s a shade of green-yellow. (And yes, I had to go figure that out, but I actually used a nonPB website to do so, because I understand how some other people measure color differently than PB does. And then I goofed it as I thought the quickly googled website I used was using 256 values, but it uses 360)
I’ll explain all of these and more… And we’ll avoid the sine and cosine stuff till you understand why we use them and how.
I’ve done plenty of coding (quite literally decades ago), often in assembler, sometimes in C. I am mostly a hardware guy. So I get the basics, but I would benefit from something at the “how to turn an idea into code” level, and assuming no real knowledge of JavaScript. Of course, I will also learn from more basic stuff. In the meantime I am able to enjoy hacking around with my own ideas and learning from other posts on this forum.
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.
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.
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?
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.
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!
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 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.
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.
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.
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.
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.
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.
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.