WS2812B_STM32_Libmaple | WS2812B library for Arduino STM32

 by   rogerclarkmelbourne C++ Version: Current License: No License

kandi X-RAY | WS2812B_STM32_Libmaple Summary

kandi X-RAY | WS2812B_STM32_Libmaple Summary

WS2812B_STM32_Libmaple is a C++ library typically used in Internet of Things (IoT), Arduino applications. WS2812B_STM32_Libmaple has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

WS2812B (Neopixel) library for Arduino STM32 (Libmaple core). Written by Roger Clark www.rogerclark.net, from first principals. This library uses SPI DMA to control a strip of WS2812B (NeoPixel) LEDS. It should be generally compatible with the Adafruit NeoPixel library, except I have not had chance to implement one or two of the lesser used functions. Connect Data In of the strip to SPI1 MOSI. This library has only been tested on the WS2812B LED. It may not work with the older WS2812 or other types of addressable RGB LED, becuase it relies on a division multiple of the 72Mhz clock frequence on the STM32 SPI to generate the correct width T0H pulse, of 400ns +/- 150nS SPI DIV32 gives a pulse width of 444nS which is well within spec for the WS2812B but is probably too long for the WS2812 which needs a 350ns pulse for T0H. The library uses SPI to send the mark/space encoded data to the LED's. Each mark/space squarewave is generated by 3 bits of data A pixel 0 value is achieved by sending the bit pattern 100 A pixel 1 value is achieved by sending the bit pattern 110. Where the duration of each bit is 444nS Hence 100 generates a mark space value of 444/888nS and 110 generates a mark space value of 888/444nS. This method results in the smallest storage requirement and the fastest send times, however because the 8 bit pixel channel data is encoded in 24 bits, (3 bytes) the values required in each of the 3 bytes to represent a specific value is not easy to generate. The bit pattern in the 3 bytes is 88877766 65554443 33222111. For speed of operation the values reqired for each byte for each of the 256 possible values is held in 3 separate 256 byte LUTS which were pre-computed by this function (which generates the full 24 bit pattern for a given input value (0-255). The STM32F103 has plenty of flash space (either 64 or 128k), so I used 256 byte LUTs even though the number of unique values in each LUT is only 8,4 and 8 bytes respectively. However to use small LUTS requires shifting and masking of the input data, and the code was written with a preference for speed over binary size. The encoded pixel buffer is 2 bytes longer than the actual encoded data. The first and last encoded bytes are all zeros. This is because the SPI hardware seems to preload MOSI with its output value before the start of the DMA transfer, which causes the first encoded pulse to be around 50ns longer than the subsequent bits, (around 490 or 500ns) This had the effect of causing the first LED to always think the MS bit of the green channel was set to High. So having the first encoded byte of zeros, is a work-around , as although the first encoded bit is still 490nS wide its a logic zero and is therefore not visible, becuase the default state is of the SPI when not transmitting data is logic zero The last byte was also set to all zeros, as occasionally MOSI seemed to be left set to logic high on completion of the SPI DMA send. Adding these 2 bytes does slightly slow down the transfer, as it add 444ns * 8 = just over 3.5uS to both end. But the WS2812B theoretically requires a reset time of more than 50uS between transmissions, so 3.5uS can be part of that time. In reality the WS2812B seems to only need around 6uS of reset time, so for all practical purposes, there no delays are needed at all in the library to enforce the reset time, as the overead of the function call and the SPI DMA setup plus the 3.5uS gives the enough reset time.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              WS2812B_STM32_Libmaple has a low active ecosystem.
              It has 50 star(s) with 15 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 4 have been closed. On average issues are closed in 328 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of WS2812B_STM32_Libmaple is current.

            kandi-Quality Quality

              WS2812B_STM32_Libmaple has 0 bugs and 0 code smells.

            kandi-Security Security

              WS2812B_STM32_Libmaple has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              WS2812B_STM32_Libmaple code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              WS2812B_STM32_Libmaple does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              WS2812B_STM32_Libmaple releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of WS2812B_STM32_Libmaple
            Get all kandi verified functions for this library.

            WS2812B_STM32_Libmaple Key Features

            No Key Features are available at this moment for WS2812B_STM32_Libmaple.

            WS2812B_STM32_Libmaple Examples and Code Snippets

            No Code Snippets are available at this moment for WS2812B_STM32_Libmaple.

            Community Discussions

            Trending Discussions on Internet of Things (IoT)

            QUESTION

            Display data from two json files in react native
            Asked 2020-May-17 at 23:55

            I have js files Dashboard and Adverts. I managed to get Dashboard to list the information in one json file (advertisers), but when clicking on an advertiser I want it to navigate to a separate page that will display some data (Say title and text) from the second json file (productadverts). I can't get it to work. Below is the code for the Dashboard and next for Adverts. Then the json files

            ...

            ANSWER

            Answered 2020-May-17 at 23:55

            The new object to get params in React Navigation 5 is:

            Source https://stackoverflow.com/questions/61859411

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install WS2812B_STM32_Libmaple

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/rogerclarkmelbourne/WS2812B_STM32_Libmaple.git

          • CLI

            gh repo clone rogerclarkmelbourne/WS2812B_STM32_Libmaple

          • sshUrl

            git@github.com:rogerclarkmelbourne/WS2812B_STM32_Libmaple.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link