I am new to this. Have dabbled in some sketch but I am a newb.
I use win10
I have a Gemma m0
But the problem I am having is when I use the code provided for a project when I open it in makecode it throws error on the set strip line. I have tried rebuilding by hand. I had this working a week ago. I don’t think it has anything to do with the Gemma because I cannot get it to work in the visualizer/virtual model.
All I wanted to do was change the pixel count from 30 to 60 on the strip setup under start. Any ideas? Here is the file I am using to get this tested out. It worked with 30 on the Gemma I had it loaded on from where I was playing with the device bfore I wired it up. I also tried to upload with a spare Gemma I have and although the Gemma works the code will not upload because of the error. https://maker.makecode.com/29855-53175-12460-49135
I have been plugging away at this for hours today. Probably more than 6.
I also have an Adafruit Circuit Playground Express. I was able to use that Microsoft MakeCode For Circuit Playground Express to make a very similar code for it. It went very easy.
For some reason the Microsoft MakeCode.com just will not allow me to set up a neopixel strip. I feel somewhat puzzled. As I was able to test the code but now I am unable to edit it without getting the error.
Anyway thanks if anyone can point me in the right direction.
It has something to do with this here.
I was able to use this with java and make it work. I just need to understand why exactly.
Its an error in the 3rd statement somehow. I have learned a little with this. Just want to understand more.
This is what I came up with in Java from the github link that someone from Adafruit found for me. Just posting for others to see. I can only post one image in a post at this time so I will reply again with what it looks like in blocks.
Great work reporting this bug! I wish the bug reports I got at work were this detailed and well described. I would say your username is not an accurate description of your ability to code (most of which is solving problems like this one).
Thanks, I think I understand it was lacking the mode RGB designator but not sure why. does this have more to do with the website and how it incorporates libraries for functions?
is there a guide to building blocks
I would like to modify an animation or make a new one. I like the rainbow effect that is a animation. But I am interested in changing the order at which the pixels travel. The way I had to wrap my strip around the ears (mickey ear project from adafruit) to make it look like I think it should made the animation play the wrong way on one strip. IMO
I would like to also possible make one of the other animations like the blue or green chase in maybe some other colors. I feel like if I could edit the animations I could tailor them a little to something I am wanting.
I could then use this to possibly make some new animations to add to the library? is that what you all call the pre made blocks repository? I know there is a huge neopixel library for strand animations but I don’t know how to bring anything I am looking for into this makecode environment. Which for now is what I am using for this project. In the future I may look into writing this in circuitpython or something.
But for now if I could just edit the animations themselves it would be super cool.
Sorry I ramble.
I removed the posts because they weren’t accurate in light of Peli’s post. I was going to write an edit but the sysyem said I’d already made too many posts on this topic. At any rate… with the correct links (provided by Peli) the creation of the animations looks very straight forward. I’m pleased you found the explanations helpful
After digging into the links you gave me Peli, I realize most of the pixels are set with math. Which would mean I would somehow have to declare some constant for pixels 30-60 to be reversed so that when 30 is pulled it would actually activate 60. ect ect. Which I would also have to do for my own code also.
We also support “ranges”, see the range(0, 30) function. It returns a sub-strip instance and you can run animation/set color on those as needed. So you can use ranges to partition a long strip into various sections.