Updates to my PIC12F683 NeoPixel WS2812B Christmas decoration idea including a change from line to dot mode, fixing an out-by-one error and revealing a programming technique using the flags that will knock some less flexible programmers of their perches!
Very late to the party, but minus 5 style points for not changing the comments to match! And minus 1 for using a PIC in the first place. LOL
Are you decrementing or decorating? 😉
Not annoyed by you using a flag you know isn't set. I am annoyed that you use subroutine calls when you could have written it all in line.
You're right, I do hate the thing you mean. It works, so that's something. But as you say, it's just waiting to break when you later want to change something, i.e. it's fragile code.
That's the single worst way i've ever seen anyone present code.
….. had to check what century I'm in…. doc Brown would have destroyed his time machine in disgust
Project suggestion : Christmas tree Youtube sub counter (go binary if you really need to but I'm interested with what you come up with 🙂
Thanks for sharing 😀👍. Funny to see you go into assembler mode. Those ware the bad old days..
How fast, no delay?
Why don’t you set a variable to flag the number of pixels, then use some math in the rest of the code to automatically calculate the correct count values based upon it… would be pretty easy, then you would just have a single variable to set the number.
I just keep wondering. How do you spell munge? It's a wonderful word/phrase, yet I don't know how to spell it. As for the Assembler/Compiled debate, I can't program in Assembly, I keep trying to learn and Julian's wonderful videos are helping me, yet I've never found that using Great Cow Basic to be any slower than Assembly in any of my designs compared to the 'legacy' Assembly versions I'm updating. Perhaps I'm just not in need of anything too time critical, but GCB do suggest that their compiled Basic is optimised well during compilation and I have no reason to doubt that claim. I also find that the MPLAB IPE near (totally!) impossible to understand, the GCB IDE suits my thought process much better – it's simpler – like me…
I seem to remember Ben Heck showing a software option to use a different power source other than the programmer to supply power? Might be wrong
My biggest horror as a programmer is your lack of global defines for things like number of lights and direction 😀
powerbanks? usb? bah. you should do a bigclive and wire them all up to a fake, metal christmas tree with a bunch of capacitative droppers. don't go near your presents, kids!
My experience with usb ports on modern laptops/desktops is that they will temporarily disable ports using too much current – assuming that is done by the usb host controller.
Don't put comments in your code. If the code isn't obviously understandable then rewrite your code.
At first glance it looks like a really inefficient way of programming such a simple effect…