Menu

WS2812 LED Demonstration Code - really cool device!

Anobium
2016-08-17
2019-12-27
<< < 1 2 (Page 2 of 2)
  • Peter

    Peter - 2017-11-27

    Well, I can but it's just the WS2812 bitbanging demo code with the following changes:
    - config for 16F18346 (FEXTOSC_OFF, and using PORTA.5 for the output)
    - removing the code for speed control with the pot
    - removing the code for the switch
    - timer setup for 16 bit (not 8 bit)

     

    Last edit: Peter 2017-11-27
  • Peter

    Peter - 2017-11-27

    This snippet might be more useful to others - a very cut down version of the demo code which sets 3 LEDs to a static Red/Yellow/Green.

    I think the only difference between the PL9823 and the WS2812 is that the colours are in RGB format, whereas I think the WS2812 is GRB format.

    MainCode:
    
    WS2812_Init
    'Ensure minimum delay has happended as the timing is critical
    'The delay is maintained by the timer0 Interrupt
    wait while timeoutocurred =  0
    intoff
    
    'Send the data - either to the CLC or bit banging
    WS2812SendData ( 0x00FF00 )
    WS2812SendData ( 0xFFFF00 )
    WS2812SendData ( 0xFF0000 )
    
     
    • Anobium

      Anobium - 2017-11-27

      Thank you!

      Ordered some devices from eBay!

       
  • stan cartwright

    stan cartwright - 2017-12-02

    They look pretty. Nice videos.
    Seems they use their own high speed serial signal. Mentioned on picaxe forum but picaxe too slow for the high speed bit bang stuff.
    Would a 328p at 16MHz be capable of running WS2812?
    Are they solderable? ie not coated plastic.

     
  • Mario Zandel

    Mario Zandel - 2019-08-13

    Hi all. I have a new project in mind. After some research I see it can be done with arduino, But I would prefer trying to do it with GCB. It is a topical project with the Ninja franchise being so popular, although I want to use it for dog agility, with wireless triggers. Massive 7 Seg timer using WS2812B Led strips:
    https://www.youtube.com/watch?v=WUU8AQsf2Zw
    Do you think it can be done?

     
    • Anobium

      Anobium - 2019-08-13

      Oh yes. You can port the Ardunio code, but, you will find it easier to use the 7-Segment library as the basis then simply replace the calls to the 7-Segment to the WS2812B.

      And....We are here to help.

       
  • Mario Zandel

    Mario Zandel - 2019-08-13

    @ Anobium Thanks for the fast reply. I probably wasnt clear in my post. I didnt want to use the arduino code, just pinch the hardware and build the code completely with GCB. I gather a 32 bit dev board or similar would be the go? Any ideas of what would be best (and probably easiest ) to use? I have the leds on order and have written the program to cut out the acrylic while I wait for what I need to arrive. Great demo on youtube by the way...

    Marz.

     

    Last edit: Mario Zandel 2019-08-13
  • Anobium

    Anobium - 2019-08-13

    32 bit dev board

    What do you mean by a 32 bit dev board ?

    And, the video is excellent.

     
  • Mario Zandel

    Mario Zandel - 2019-08-13

    Aannobium. Development board or the like?

    Marz.

     
    • Anobium

      Anobium - 2019-08-13

      What board you thinking of?

       
  • Mario Zandel

    Mario Zandel - 2019-08-13

    @Annobium I realy havent a clue. I havent used these faster chips. I came from the Picaxe world. Do you have any suggestions?
    Marz.

     
  • Mario Zandel

    Mario Zandel - 2019-08-13

    Would something like this 16 bit board be enough for a controller board? :
    Microchip PIC24F Curiosity Development Board 16-bit
    Marz.

     
  • bed

    bed - 2019-08-13

    Hi Mario, as far as my knowledge lasts, the 24F Family is not supported by GreatCow.
    But I'm pretty sure some of the bigger 18F or the big Mega schould powerfull enough for this job as well.
    Btw: a fantastic Video with some good Explaination for litte tricks in the sense of diffusion.
    A great Idea to use ws2812 or this purpose.

     
  • Mario Zandel

    Mario Zandel - 2019-08-13

    @Bed I was going to use shift registers and LEDs, but this looks way cooler and lots of extra tricks that would make it look even better.

     
    • bed

      bed - 2019-08-13

      using the ws2812 stripes for that is ingenious. I thought about a cool living room table where you can play mill or checkers, but I didn't get the idea with the RGB stripes. I'm a little stupid ;-)

       
<< < 1 2 (Page 2 of 2)

Log in to post a comment.