Hi Hannu, 2014-11-13 11:08 GMT+08:00 Hannu Vuolasaho <vuo...@msn.com>: > The driver can be used like this: > > 21 buffer: rgb > : rgb-test 21 0 do rgb i + c! loop rgb 21 ws2811.write ; > > $ff $ff $ff > $ff $ff 0 > $ff 0 $ff > 0 $ff $ff > $ff 0 0 > 0 $ff 0 > 0 0 $ff > rgb-test 5000 ms 21 ws2811.off
I tried your ws2811 driver with WS2812B LEDs. But there is a bug. For example, if you have three LEDs, you need to write twice to get the correct result: $ff $00 $00 $ff $00 $00 $ff $00 $00 grb-test $ff $00 $00 $ff $00 $00 $ff $00 $00 grb-test https://cpldcpu.wordpress.com/2014/01/14/light_ws2812-library-v2-0-part-i-understanding-the-ws2812/ says "The internal buffer is written to the PWM controller during the next reset." (ATmega328P)> 10 $00 $00 $00 $00 $00 $00 $00 20 grb-test led-off 1 ms the above line works. word led-off turns WS2811_BIT off thus reset the WS2812B led thus write the internal buffer (inside the LED) to output. BTW, we are making an component cabinet for resistors and at the mean time it can also play Conway's Game of Life, here's a gif: http://imgur.com/VPfzhh0 Now the low level hardware driver is not done by amforth. I want to use amforth to make the whole project more general purpose, for example, we can use Raspberry Pi to control the cabinet. Thanks. -- Best regards, Atommann ------------------------------------------------------------------------------ _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel