Explorar el Código

Add MIT license

main_ledos
PaulStoffregen hace 7 años
padre
commit
b217bce3c8
Se han modificado 4 ficheros con 54 adiciones y 3 borrados
  1. +22
    -0
      WS2812Serial.cpp
  2. +23
    -0
      WS2812Serial.h
  3. +8
    -2
      examples/BasicTest/BasicTest.ino
  4. +1
    -1
      readme.md

+ 22
- 0
WS2812Serial.cpp Ver fichero

@@ -1,3 +1,25 @@
/* WS2812Serial - Non-blocking WS2812 LED Display Library
https://github.com/PaulStoffregen/WS2812Serial
Copyright (c) 2017 Paul Stoffregen, PJRC.COM, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#include "WS2812Serial.h"


+ 23
- 0
WS2812Serial.h Ver fichero

@@ -1,3 +1,26 @@
/* WS2812Serial - Non-blocking WS2812 LED Display Library
https://github.com/PaulStoffregen/WS2812Serial
Copyright (c) 2017 Paul Stoffregen, PJRC.COM, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#ifndef WS2812Serial_h_
#define WS2812Serial_h_


+ 8
- 2
examples/BasicTest/BasicTest.ino Ver fichero

@@ -1,3 +1,9 @@
/* WS2812Serial BasicTest Example

Test LEDs by turning then 7 different colors.

This example code is in the public domain. */

#include <WS2812Serial.h>

const int numled = 64;
@@ -9,8 +15,8 @@ const int pin = 1;
// Teensy 3.5: 1, 5, 8, 10, 20, 26, 32, 33, 48
// Teensy 3.6: 1, 5, 8, 10, 20, 26, 32, 33

byte drawingMemory[numled*3];
DMAMEM byte displayMemory[numled*12];
byte drawingMemory[numled*3]; // 3 bytes per LED
DMAMEM byte displayMemory[numled*12]; // 12 bytes per LED

WS2812Serial leds(numled, displayMemory, drawingMemory, pin, WS2812_GRB);


+ 1
- 1
readme.md Ver fichero

@@ -15,7 +15,7 @@ more time to draw the next frame.

WS2812Serial controls a single LED strip, using only 1 pin. While any number of
LEDs may be connected, in practice 1 pin is best for small projects with less
than 500 to 1000 LEDs. OctoWS2811 offers 8 parallel outputs for large projects.
than 600 LEDs. OctoWS2811 offers 8 parallel outputs for large projects.

Non-blocking performance does come with a cost. 15 bytes of memory are required
per LED, rather than the usual 3 bytes with [FastLED](http://fastled.io/) or

Cargando…
Cancelar
Guardar