From 3d9b5e33e9ebf4690cebfefc8c2de06ead6bf0e7 Mon Sep 17 00:00:00 2001 From: Andrea Manni Date: Mon, 13 Feb 2017 19:03:02 +0100 Subject: [PATCH] Common, sequenze --- libraries/common/common.cpp | 5 ++--- libraries/common/examples/sequenza/sequenza.ino | 2 +- libraries/common/keywords.txt | 1 + libraries/common/library.properties | 9 +++++++++ 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 libraries/common/library.properties diff --git a/libraries/common/common.cpp b/libraries/common/common.cpp index 7f05627..e696ff4 100644 --- a/libraries/common/common.cpp +++ b/libraries/common/common.cpp @@ -112,6 +112,8 @@ void RGBLed::Off () { ///////////////////////////////////// // Lampeggiatore // Constructor +// +// Esempi incrementali: https://lab.piffa.net/sketchbook_andrea/multitasking/ Lampeggiatore::Lampeggiatore(int pin) { ledPin = pin; @@ -175,19 +177,16 @@ void Lampeggiatore::Blink(long up, long down, long drift ) { void Lampeggiatore::High() { // Accende il LED - digitalWrite(ledPin, HIGH); } void Lampeggiatore::Low() { // Spegne il LED - digitalWrite(ledPin, LOW); } void Lampeggiatore::Swap() { // Inverte lo stato del LED - digitalWrite(ledPin, !digitalRead(ledPin)); } diff --git a/libraries/common/examples/sequenza/sequenza.ino b/libraries/common/examples/sequenza/sequenza.ino index bb9b46b..8a319d4 100644 --- a/libraries/common/examples/sequenza/sequenza.ino +++ b/libraries/common/examples/sequenza/sequenza.ino @@ -24,7 +24,7 @@ byte pins[] = { // PIN dei LED che compongono la sequenza Sequenza seq = Sequenza(pins,sizeof(pins)); // Array dei PINs, quanti elementi compongono l'array void loop() { - seq.Update(200); // Passa al segmento suciessivo ogni 200ms + seq.Update(200); // Passa al segmento successivo ogni 200ms }; diff --git a/libraries/common/keywords.txt b/libraries/common/keywords.txt index 1ef357b..4e2d133 100644 --- a/libraries/common/keywords.txt +++ b/libraries/common/keywords.txt @@ -28,3 +28,4 @@ lSet KEYWORD2 lum KEYWORD2 Sequenza KEYWORD1 Update KEYWORD2 +calibraTrim KEYWORD2 diff --git a/libraries/common/library.properties b/libraries/common/library.properties new file mode 100644 index 0000000..8f17f8a --- /dev/null +++ b/libraries/common/library.properties @@ -0,0 +1,9 @@ +name=Common: oggetti comuni non blocking +version=1.0 +author=Andrea Manni +maintainer=Andrea Manni +sentence=Vari oggetti e funzioni per la gestione delle luci. +paragraph=Elementi di base per lampeggi, fade e sequenze di luci tramite codice non blocking. Realizzati durante i corsi di Arduino di Andrea Manni su piffa.net . +category=Display +url=https://piffa.net +architectures=* -- 2.39.2