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.