#include #define SER_Pin 5 // dataPin #define RCLK_Pin 7 // lacthPin #define SRCLK_Pin 6 // clockPin #define NUM_REGISTERS 3 //Aquí se definen cuántos registros de desplazamiento hay en la cadena... //Inicializar el registro de desplazamiento usando la libreria "Shifter" Shifter shifter(SER_Pin, RCLK_Pin, SRCLK_Pin, NUM_REGISTERS); void setup(){ } void loop(){ //Ejemplos de sentencias que admite la libreria "Shifter": //shifter.clear(); //Desactiva todas las salidas de todos los registros de desplazamiento de la cadena //shifter.write(); //send changes to the chain and display them //delay(100); //shifter.setAll(HIGH); //Activa todas las salidas de todos los registros de desplazamiento de la cadena //shifter.write(); //send changes to the chain and display them //delay(500); shifter.setPin(0, HIGH); //set pin 0 in the chain (first pin, firt register) HIGH shifter.write(); //send changes to the chain and display them //notice how you only call write after you make all the changes you want to make delay(300); shifter.setPin(7, HIGH); //set pin 14 in the chain (six pin, second register) HIGH shifter.write(); //send changes to the chain and display them //notice how you only call write after you make all the changes you want to make delay(300); shifter.setPin(14, HIGH); shifter.write(); //send changes to the chain and display them //notice how you only call write after you make all the changes you want to make delay(300); shifter.setPin(15, HIGH); shifter.write(); //send changes to the chain and display them //notice how you only call write after you make all the changes you want to make delay(300); shifter.setPin(20, HIGH); shifter.write(); //send changes to the chain and display them //notice how you only call write after you make all the changes you want to make delay(300); shifter.setPin(0, LOW); //set pin 0 in the chain (first pin, firt register) HIGH shifter.write(); //send changes to the chain and display them //notice how you only call write after you make all the changes you want to make delay(300); shifter.setPin(7, LOW); shifter.write(); //send changes to the chain and display them //notice how you only call write after you make all the changes you want to make delay(300); shifter.setPin(14, LOW); //set pin 14 in the chain (six pin, second register) HIGH shifter.write(); //send changes to the chain and display them //notice how you only call write after you make all the changes you want to make delay(300); shifter.setPin(15, LOW); shifter.write(); //send changes to the chain and display them //notice how you only call write after you make all the changes you want to make delay(300); shifter.setPin(20, LOW); shifter.write(); //send changes to the chain and display them //notice how you only call write after you make all the changes you want to make delay(300); //shifter.setPin(0, LOW); //set pin 0 in the chain (first pin, firt register) LOW //shifter.setPin(1, LOW); //shifter.setPin(2, LOW); //shifter.setPin(14, HIGH); //set pin 14 in the chain (six pin, second register) LOW //shifter.setPin(15, HIGH); //shifter.write(); //send changes to the chain and display them //notice how you only call write after you make all the changes you want to make //delay(500); }