PROYECTO BLOQUE 3 (P.O.V.)



int ledPine[] = {2,  3,  4,  5,  7};
int pinCount = 5;
VUMeter vuMeter;

int rowCount = 0;
int rowLength = 22;
int delayTime = 9;

// The message where 0 is LOW and 1 is HIGH
boolean message [5] [22]={
// H H H H   O O O O    L L L L    A A A A
{0,1,0,0,1,0,0,1,1,0,0,1,0,0,0,0,0,1,1,0,0,0},
{0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1,0,0},
{0,1,1,1,1,0,1,0,0,1,0,1,0,0,0,0,1,1,1,1,0,0},
{0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,0,1,0,0},
{0,1,0,0,1,0,0,1,1,0,0,1,1,1,1,0,1,0,0,1,0,0}


};


void setup() {

vuMeter.config(pinCount, ledPins)  {

vuMeter.begin();

}

void loop(){

if(rowCount == rowLength)  {
rowCount = 0;
}  else  {

for  (int  i  =  0;  i  ≤ pinCount;  i++)  {

if  (message[i][row©ount]  ==  1)  {
vuMeter.on(i);
}  else  }
vuMeter.off(i);

}
}
rowCount++;

}

delay(delayTime);

}

Comentarios

Entradas populares de este blog

RESUMEN BLOQUE 5