PDA

View Full Version : Dynamic NeoPixel Demo



Dave
- 16th January 2015, 12:25
Well Over the holidays I was in Florida with my family and during that time my daughter was designing a wearable Arduino / NeoPixel article of clothing. It was to be a belt that would scroll messages. Well her and I went our own ways as far as designing the thing. What I did was somewhat based on the work of Michel Jasmin who wrote an article here. I however wanted the messages to be dynamic in nature meaning they should be able to be changed while the system is up and running and not only during compile time. The attached code and include file are a complete system for building a scrolling display using the popular WS2812B (NeoPixels) with a couple of test display modes. I have tested the code to 1008 series connected pixels with 100% success. That many pixels do draw a bit of power so if you are doing to build a portable unit, you will need a car battery..... The display was designed as displaying any number of 5 x 7 characters. However I made the matrix for 6 x 7 so as to leave 1 collum between each character. 1008 pixels would then yield 24 characters per display. I was doing to build a top hat with a scrolling display for new years but didn't have time to get the hat. The design is for the same number of pixels per row x 7 rows. the rows are to be connected in series starting from the left to the right. This is easy if the display is in the configuration of a circle, as I mentioned in the hat design. That was the start of each row from the top down to the bottom is mearly offset as far as the wiring goes. I also designed the input to use a Bluetooth connected device to enter the mode, messages, and color levels for the display, as well as the scrolling speed of each mode. The Bluetooth device I used was an HC-03 running at 38,400 baud. The PIC I used was an 18F26K22 as it afforded enough memory and 2 USARTs. This came in handy during debug and bootloading. I have to admit though, there are a butt load of extra pins not used as the entire project only needed 5 pins. 2 for each comm port and 1 for the NeoPixel strip. Well enough of me talking about it. Enjoy... and Happy NewYear...

MichelJasmin
- 26th January 2015, 04:30
Great work Dave! 1008 pixels, wow! I like how you converted in ASM the bit testing for the "bit banging" part.
But you cannot just post some code, we want proof! Show the video! It's easy: there's a thing called "the Internet" and there's a place named "YouTube"... ;)

Just before Christmas I designed a Christmas tree ornament and sent the Gerber files to Dirty Cheap PCB (http://dirtypcbs.com/view.php?share=2798&accesskey=821333b19bdb19fdd134b0636d9e4dfb). It was a fun project and the result is nice:

http://www.youtube.com/watch?v=Nbdoj_q6xEI

Dave
- 15th February 2015, 20:29
Well Michel, I'm not much of a UTUBE type of guy. I wouldn't even know where to start...

retepsnikrep
- 18th May 2020, 06:53
Great work by you two guys, I have been studying your code and I hope you are both still watching the thread.

I'm repurposing some of the code for a coffee table top Conway's 'life' simulator.
I'll be using 256 led matrixes or a 1024 led matrix for the giant version.

I notice some of the code mentions recompiling for ASM64 instead of 32?

I could not find the older 'NeoPixelASM32' bas file, is/was that available?

Also I see it mentions code development on a 12F1840 etc, is that code available to have a look at.

Many thanks Peter

Ioannis
- 18th May 2020, 09:57
Have a look here:

http://www.picbasic.co.uk/forum/showthread.php?t=19597&p=129840#post129840

Ioannis

retepsnikrep
- 18th May 2020, 10:07
I've seen all that thanks.

Sadly it doesn't help with my specific questions about the earlier work they did.

I'm interested in the 32mhz code and the 12F1840 code.

MichelJasmin
- 19th May 2020, 20:54
I've seen all that thanks.

Sadly it doesn't help with my specific questions about the earlier work they did.

I'm interested in the 32mhz code and the 12F1840 code.

See attached file for my 32MHz include file. The 12F1840 will not handle your big matrix with my example because of the memory limitation for arrays. You need a 18F which can handle arrays over multiple banks. It's a PICBasic's limitation.

8863