Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

5x faster updating of LPD8806 strips without hardware SPI

Digitalledstrip Lrg-4

Speeding up LPD8806 show() without hardware SPI @ Michael Noland’s Blog.

Hi, I made a method to update LPD8806 strips about 5x faster than the current library on GitHub. It’s about the same speed as the hardware SPI implementation, but can be used when those pins are dedicated to other hardware (e.g., Ethernet boards).

It requires that the clock and data pin assignments are known at sketch.

If you’re using LPD8806 LED strips and you can’t use the hardware SPI port (e.g., when using an Ethernet board), there are two other options in the Adafruit library: the default mode and ‘slowmo’ mode. The default mode is decent, but the flexibility of being able to choose the pins at runtime comes with a cost. However, you can still get a decent speedup by defining your pin usage at compile time in a replacement show() function.


This tutorial is interesting because its the first time we’ve seen the use of compile-time templates to set interface pins via a sketch. Traditionally, Arduino users use digitalWrite() or digitalRead() to interface with the pin registers. Hardk0re hackers sometimes like to use pointers to the registers which still allows for flexible pin numbering in the sketch but this technique takes it to the next level!


Digital Addressable RGB LED with PWM waterproof flexi strip. These LED strips are fun and glowy. There are 32 RGB LEDs per meter, and you can control each LED individually! Yes, that’s right, this is the digitally-addressable type of LED strip. You can set the color of each LED’s red, green and blue component with 7-bit PWM precision (so 21-bit color per pixel). The LEDs are controlled by shift-registers that are chained up down the strip so you can shorten or lengthen the strip. Only 2 digital output pins are required to send data down. The PWM is built into each chip so once you set the color you can stop talking to the strip and it will continue to PWM all the LEDs for you

Built in 1.2 MHz high speed 7-bit PWM for each channel – that means it can do 21-bit color per LED (way more than the eye can easily discern). Once you set the brightness level for the LEDs, your microcontroller can go off and do other things, no need to continuously update it, or clock it. The best part is that compared to the WS2801 which can only run one LED at a time, this chip can drive 2 RGB LEDs which means the price stays the same as the older HL1606 strip, nice!

The strip is made of flexible PCB material, and comes with a waterproof sheathing.

You can cut this stuff pretty easily with wire cutters, there are cut-lines every 2.5″/6.2cm (2 LEDs each). Solder to the 0.1″ copper pads and you’re good to go. Of course, you can also connect strips together to make them longer, just watch how much current you need! We have a 5V/2A supply that should be able to drive 1 or more meters (depending on use)

They come in 5 meter reels with a 4-pin JST SM connector on each end, and are sold by the meter! If you buy 5m at a time, you’ll get full reels. If you buy less than 5m, you’ll get a single strip, but it will be a cut piece from a reel which may or may not have a connector on it.

Digital Addressable RGB LED with PWM waterproof flexi strip!


We are angry, frustrated, and in pain because of the violence and murder of Black people by the police because of racism. We are in the fight AGAINST RACISM. George Floyd was murdered, his life stolen. The Adafruit teams have specific actions we’ve done, are doing, and will do together as a company and culture. We are asking the Adafruit community to get involved and share what you are doing. The Adafruit teams will not settle for a hash tag, a Tweet, or an icon change. We will work on real change, and that requires real action and real work together. That is what we will do each day, each month, each year – we will hold ourselves accountable and publish our collective efforts, partnerships, activism, donations, openly and publicly. Our blog and social media platforms will be utilized in actionable ways. Join us and the anti-racist efforts working to end police brutality, reform the criminal justice system, and dismantle the many other forms of systemic racism at work in this country, read more @ adafruit.com/blacklivesmatter

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Join 20,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


Maker Business — To make it through a tough business cycle, layoffs should be a last resort

Wearables — Microphone protection

Electronics — Sizzlin’ Chip Test

Python for Microcontrollers — Python on Microcontrollers Newsletter: Make: The Rise of Python, CLUE, CircuitPython 6 and more! #Python #Adafruit #CircuitPython @circuitpython @micropython @ThePSF

Adafruit IoT Monthly — BLE Store Capacity Indicator, Aquarium Automation, and more!

Microsoft MakeCode — Virus Destroyer!

EYE on NPI — Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — NewProducts 8/6/2020 Feat. #Adafruit #ST25DV16K I2C #RFID #EEPROM #Breakout – STEMMA QT / Qwiic!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



2 Comments

  1. I suggest you take a look at the digitalWriteFast() library, as it is all pre-processor macros for direct port poking using Arduino pin numbering. Includes fail safes for misuse and support for must Arduino platforms. It’s been around for a while now.

    2 years ago I took a look at various methods for changing a pin, and this library is as fast as direct port access, because it compiles to direct port access.

  2. Link for library: http://code.google.com/p/digitalwritefast/downloads/list

Sorry, the comment form is closed at this time.