PB3 won't go past loading screen, now stuck in wifi setup

As far as electronics go, 4.85 is bad, 4.98 is acceptable, 5.05V is optimum.

LED strips don’t care so much, many of them will work at 4.5V, but microcontrollers won’t.

Having said that, many microcontroller (like the PB) work at 3.3V, and the supplied 5V is regulated down to 3.3V, the 5V is only used to supply/drive the LED strip. That’s 3.3V minus nothing though, if it goes below that for even a microsecond, you get a reset - which is what the capacitor is for.

By the way, JavaScript was invented by Demons in Hell to torment people who know real programming languages (like c).

Fortunately, the PB isn’t really using JavaScript, so it’s easy to program, and you don’t need to get into the madness of actual JavaScript.

4 Likes

(ROFL @Nick_W … I’ve always thought that about Javascript too.)

Let’s not hate on JavaScript too bad, I don’t want to discourage people from learning it on the way to making beautiful pixels. Fortunately you don’t need to learn the JavaScript-isms to make good use of a Pixelblaze.

I also wanted to add that both LEDs and Pixelblaze will be happy with a solid 4.5v.

Below that, some LEDs can drop in brightness somewhat, and colors can start to shift. Some addressable LEDs work well down to 3V. Pixelblaze itself needs about 3.2V. However, sudden changes of a volt or more can cause issues and the regulators might have a hard time keeping up.

You can run a Pixelblaze and LEDs straight from a 3.7v lipo battery btw, if you aren’t too particular about exact color/brightness. This will usually be much more stable than those 5v battery packs which internally boost a lipo to 5v.

1 Like

That’s good to know. I was wondering about using 3.7v in some hoops and hadn’t played with that yet. Knowing it should work helps.

1 Like

I’ve run dotstars and neopixels from 3.7V lipo battery’s with 3.3V microcontrollers directly (no buffer chip), and they work fine.

You can just about run them at 5V with a 3.3V mc directly as well, but you are on the edge of not triggering correctly. There is a trick I have used of putting a power diode in line with the 5V supply to the LED’s to give a little more signal headroom.

Most strips have disclaimers about potentially not working properly at these voltages though.

Should not be an issue with PB as the buffer chip boosts the signal voltage to the supply voltage.

Okayokayokay so this is another place where I get lost. So i have to make a render3D, and then put a render2D below it, but if there’s a render3D it just shows that and not the 2D after it in the code.

I’m feeling increasingly dumb now, because I spent longer than I care to admit trying to add that bit of code into any pattern anywhere, and then try to do anything with it at all, I’ve not managed to make any noticeable difference at all. I think that’s the hardest part of learning so far is what to do when nothing does anything.

I am immensely grateful for all of the support, but I think it’s time to go get some base understanding of how to talk to a computer effectively.

Also, is the following tutorial the norm, or are there really decent places to learn?

Do people use things like skillshare, etc?

Aiming for the 3D render is somewhat ambitious when you’re still learning to code!

Do you learn best by tinkering, video, or reading?

If tinkering, play with the included “An Intro to Pixelblaze Code” pattern. If video could be something like this, and reading is a good fit for the recommended subset of Codecademy JavaScript.

1 Like

You know, I thought it would be more digestible to try and use my array as a 2D wrapped plane but I think with the way I have my array built/mapped it feels much simpler to operate in 3D. If nothing else, I can make things do things when I ask them to, and then learn from what that does.

I’m going to try all approaches! None of my work for the day has appeared yet, so I’m going to check out your video now, but I think in the long run I’m going to climb the coding hill, because this isn’t nearly the only project I ever want to use that’s going to require it. I honestly don’t know how I’ve avoided it to this point in my life. It would even make my video editing career easier to be able to write/modify animation scripts.

It’s just the only answer is self-improvement :slight_smile: Not that i’m leaving until I feel like I’ve been trained and coming back or anything, but it’s definitely going to be a focused effort on my part, where I dedicate some of my LED playtime to learning a lesson, and then some of the time applying what I’ve learned to try and internalize it. I really like it here, maybe it’s just because it’s the first forum I’ve been active on in quite some time, but I missed this - whatever it is that’s happening here.

And I really do mean it when I say it, the pixelblaze community is really the magic sauce here. SO MUCH HELP - even If I don’t yet understand the help that’s being offered. I’ve only been here a few weeks and I have no idea what I’m doing, but it’s really really been motivating to see so many other successes and lessons learned by others, and the group effort that goes into some projects. I can’t wait to understand enough that I’m able to help someone else when they get stuck.

Oh, and @jeff - the intro to pixelblaze code pattern was really helpful! My friend Jesse and I worked through it one night and it was a huge eye opener, even on a first pass through! I won’t say that it really made me understand the architecture of code, but it did help me find the variables that I want to play with in other people’s patterns.

2 Likes

90% of understanding 2D and 3D is grasping how it all works, and 10% is just math.

If you have a good 2D map, learning how it all works is doable, and there is a lot of example code.

3D has much less code examples and literally adds another dimensions to the problems.

If you haven’t played with https://tixy.land, check it out, that abstracts a lot of the math/methods to a bare minimum. I ported tixy to a PB pattern, so you can use tixy “lines” (yes, every tixy display is ONE line long). Once you “get it”, understanding PB specifics would be the next step.

Yeah, big focus on the grasping how it all works!

I think if I was working with a 2d map on a 2d array, it would feel simpler than working with 3d, but the part thats difficult to wrap my head around is using the snippet from the wizard to remap the circumference of my array (some formula posted above) as X and Z as Y, to make my helix think that it’s a plane.

Converting (probably not the right term) maps and arrays is definitely above my pay grade at the moment!

@popcapps ,

Have you seen Writing Your First Pattern?

I’d then also recommend my programming KITT video, if only so that you can give me critical feedback on a scale of 10 - “ooh I get it” to 0 - “this is just like Every Programming Tutorial” and I’ll know I’ve fallen in the same trap as many other developers that try making tutorials :laughing:

Is that a high score, @Wizard?

This is the first time it’s frozen since I added a capacitor. I found a 500 mf 6 volt cap in my collection and threw it in and it seems to handle most of what I throw at it.

To be fair, I’ve been throwing what I assume are ridiculous formulas at it all night, and had just changed this from index*pow to index/pow. This was also the first time I modified h in this pattern. I assume that adds some sort of multiplier to the amount of math that’s happening at any given millisecond.

h = atan(index*(pow(e,bass)))

it really doesn’t like that. if you change that back and forth it definitely stalls out for a second or two.

I do have to point out that I haven’t been met with only dead ends when it comes to playing around, and when speaking specifically in a 3D sense, I’m starting to see some sense in some things - but it’s really easy to get caught up in the negatives.

I’ll post a video tomorrow, but wanted to share the first result I’ve actually gotten at a point that the PB has lost itself, and that it’s not all negative in the coding aspect, just a steep curve in places.

1 Like

I suspect the math. Keep in mind, the esp32, while faster than the esp8266 of v2, is still only a middling processor, even if it is dual core (which have to be explicitly used, it’s not automatically going to use the second core). Doing things like power (and I have no idea how big/small the “bass” variable was) is going to be work.

I look forward to seeing your code.

1 Like

The thing is, it’s not the amount of “work” that’s involved in the math, it’s the fact that Pixelblaze is a real time system ie asynchronous.

With this type of system, you can’t spend too long doing any one thing, as it stalls all the other things that are supposed to be happening in the background.

If you stall it too long (with something like a busy loop, or some extreme maths), there is a watchdog timer which will kick in and reboot the device (this is to reset the device if it locks up, but a stall looks like a lock up).

I don’t know what the watchdog timer is set for, but it’s not long. With the old esp8266, if you stalled the main loop for more than 50mS it would reboot. The esp32 should be more forgiving, because it has two cores, so you can stall one without stalling the whole device.

So the takeaway here is that it’s not power draw, but the amount of time a calculation takes which could be a problem. Don’t try and do extreme maths which will take more than a few mS or so to calculate.

2 Likes

Also, if you’re using a Pixelblaze 3, make very sure you’re using the latest firmware - v3.16 at this writing.

Before the update, my PB3s had all kinds of intermittent networking weirdness that occasionally interfered with loading and saving patterns. Everything’s been working smoothly since the update though.

1 Like

12 is “SW_CPU_RESET” so I imagine a crash. Might be a divide by zero lurking in atan somewhere. Did that cause things to forget settings?

1 Like

To be fair, in my head, all of this math is fairly extreme. Yours and @Scruffynerf’s descriptions seem to fit the bill for what’s happening. I’m learning that swapping multiplication for division is a good way to confuse this thing.

@wizard If I remember correctly, it went through the normal process of forgetting things temporarily, but generally speaking, it all came back once I actually disconnected power and let it chill for a second.

I haven’t turned in on in a few days because it started displaying my map, like skewed, even if I re-paste my map code from my archive doc. I’m gonna go turn it on and see if it’s still doing that.

I’m a consummate professional at using things incorrectly and finding what doesn’t work!

1 Like

BTW @wizard your KITT pattern video is hugely helpful! I’d watched it a few times before I even got the PB and a couple more again after your request, and I have to say that you and Jeff are excellent at describing what you’re doing.

If I find a chance, I’ll give you a more detailed analysis of what I remember being one or two spots where I just had to have faith that what you were typing would work.

Between your Kitt video and @jeff’s, where he gives a description of the wave timings and their use, I’m sure I’ll have another couple hundred views before I don’t need to return to the video each time I want to use something from it.

1 Like

@wizard - disregard that bit about my map - it’s showing up perfectly fine now on an RGB 3 axis sweep - I think It was just really heat soaked the other day when it started messing up