Indicador barra led 10 segmentos Vermelho 20 pinos
search
  • Indicador barra led 10 segmentos Vermelho 20 pinos
  • Indicador barra led 10 segmentos Vermelho 20 pinos

Indicador barra led 10 segmentos Vermelho 20 pinos

0,95 €
Quantidade
Entrega imediata

 

Política de segurança

 

Política de entrega

Gráfico de Barras LED
Número de pinos: 20
Número de LEDs: 10
Cores das barras: 10 vermelhas
Cada 2 pinos controla uma barra do gráfico de barras
Funciona com chip de driver de LED de gráfico de barras TS-459

sAMPLE CODE PARA ARDUINO
/*
10-bar LED array

Connect the LED array to pins 11-2 and through a 220R resistor to ground on the other side.
01/14/2010
*/

void setup ()
{
for (int loop = 2; loop {
pinMode (loop, OUTPUT); // Set the pin IO mode
digitalWrite (loop, LOW);
}
}

void loop ()
{
// The loop has to start at 2 because 1 isn't an IO pin.
// Go from right to left
for (int loop = 2; loop {
// Switch the LED on for 10 milliseconds
digitalWrite (loop, HIGH);
delay (10);
digitalWrite (loop, LOW);
delay (20);
}

// And from left to right again
for (int loop = 11; loop > 1; loop--)
{
digitalWrite (loop, HIGH);
delay (10);
digitalWrite (loop, LOW);
delay (20);
}
}

And the second one changes the loop to be:

void loop ()
{
// Start on LED 6 and go up to 10 (remember, shifted by 1)
for (int loop = 7; loop {
// Light the LED on the LHS of middle and the matching one on the RHS
// This will light LEDs 6-5, 7-4, 8-3, 9-2, 10-1 (shifted by 1)
digitalWrite (loop, HIGH);
digitalWrite (13 - loop, HIGH);
delay (10);
digitalWrite (loop, LOW);
digitalWrite (13 - loop, LOW);
delay (20);
}

// And back down to the middle again
for (int loop = 11; loop > 6; loop--)
{
digitalWrite (loop, HIGH);
digitalWrite (13 - loop, HIGH);
delay (10);
digitalWrite (loop, LOW);
digitalWrite (13 - loop, LOW);
delay (20);
}
}

704026
Novo