Giter Club home page Giter Club logo

calliope-neopixel's Introduction

NeoPixel driver

Diese Bibliothek basiert auf der Neopixel Bibliothek von Microsoft (https://github.com/Microsoft/pxt-neopixel). Im Rahmen des Projektes SMILE (https://smile-smart-it.de), was das Ziel hat, Mädchen an die Informatik heranzuführen, wurde das Paket bearbeitet, um zusätzliche Funktionen zu erhalten und die Übersichtlichkeit und Bedienungsfreundlichkeit zu erhöhen.

Die Bibliothek stellt einen Treiber zur Verfügung, um verschiedene Neo Pixel LED Streifen an den Calliope mini anzuschließen, siehe: https://www.adafruit.com/category/168

Die einzelnen LEDs der Neopixel sind programmierbar, jede LED kann einzeln kontrolliert werden.

Benutzung

// Erstelle einen NeoPixel Treiber - spezifiere den Pin, die Anzahl der LEDs und den Typ des Neopixel Streifens 
// entweder RGB (GRB oder RGB Format) oder RGB+White.
let strip = neopixel.create(DigitalPin.P0, 24, NeoPixelMode.RGB);

// setze Pixel Farben
strip.setPixelColor(0, NeoPixelColors.White); // white
strip.setPixelColor(1, 0xff0000);     // red
strip.setPixelColor(2, 0x00ff00);     // green
strip.setPixelColor(3, NeoPixelColors.Blue);    // blue

// sende die Daten zum Neopixel Streifen
strip.show()

Nutze ||setBrightness|| , um die Helligkeit zu verringern (Default ist die Maximalhelligkeit).

Nutze ||shift|| oder ||rotate|| , um die Einstellung eines Pixels zu verschieben.

Nutze ||rotateBrightness|| , um die Helligkeit schrittweise zu verringern und wieder zu erhöhen.

Nutze ||showRainbow|| , um die Farben des Regenbogens auf dem ganzen Neopixel Streifen anzuzeigen.

Nutze ||showSymbol|| ,um ein vordefiniertes Symbol auf einer Neopixel Matrix anzuzeigen (eine Matrix ist hier definiert, als ein Streifen mit mindestens 64 LEDs. Damit die Symbole passend angezeigt werden, muss ein 8x8 Matrix verwendet werden.)

Unterstützte Geräte

  • PXT/calliope

Lizenz

MIT

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

calliope-neopixel's People

Contributors

marenste avatar

Watchers

James Cloos avatar

Forkers

james-calliope

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.