Giter Club home page Giter Club logo

nano_every_ws2812b's Introduction

CI_WS2812B

Arduino Nano Every (ATmega4809) core-independent driver for WS2812B addressable RGB LEDs (aka NeoPixels). No bit-banging, the communication protocol is handled by hardware peripherals, saving lots of CPU cycles.

Installation

This library can be installed from the Arduino IDE's library manager, just search on Nano Every WS2812B. You can also copy this folder with all its files into the 'libraries' folder of the 'Sketchbook' folder:

[path]/[to]/Sketchbook/libraries/Nano_Every_WS2812B

Usage

RC delay circuit

Connect pin D4 (PC6) of the Arduino Nano Every to the anode (left) of diode D1. Connect DIN pin of the WS2812B LED (string) to the cathode (right) of D1. Don't forget to connect the +5V power supply too.

RC delay circuit

With this circuit the Arduino Nano Every can run at its normal clock speed of 16 MHz (and not 20 MHz as advertised by Arduino). Without this circuit the MCU must be slowed down about 25%. This can be achieved by defining MCU_SLOW_DOWN at the top of the file Nano_Every_WS2812B.h.

About

This library is based on Microchip's application note Core Independent Nightlight Using Configurable Custom Logic on ATtiny1617 which explains how it works. However, the ATtiny1617 (@ 20 MHz) is a bit different from the ATmega4809 and the Nano Every pinning & clock frequency (16 MHz) plus the timer constraints imposed by the Arduino API required adapting the code in sometimes rather subtle ways. An oscilloscope is practical for debugging the output signal in case you have problems.

Peripherals used: SPI, TCB2 (TIMERB2), and LUT1 and LUT2 of the CCL.

Board: Arduino Nano Every (ATmega4809)

Developped on Arduino IDE 1.8.15

NOTE

If the CPU is slowed down, adjust baud rates and delay times accordingly!

nano_every_ws2812b's People

Contributors

clemensatelektor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

thijses

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.