Categories

Newsletter

LED Bar Graph: Red

This single color LED bar graph is comprised of 10 red LEDs. Useful for battery meters, sound bars and other projects where visual measurements are key.

More details

Availability: SHIPS TODAY

Last Updated: 11/21/2024

Tinkersphere

TS2435

$1.75

These 10 segment bar graph LEDs have many uses. With a compact footprint, and simple hookup, they are easy for prototyping or finished products. Essentially, they are 10 individual red LEDs housed together.

Features:

  • LED Bar Graph
  • Number of pins: 20
  • Number of LEDs: 10
  • Size: 0.98 x 0.39 x 0.59 inches (2.5 x 1.0 x 1.5 cm)
  • Forward voltage: 2.1V typ
  • Brightness: 14mcd typ
  • Forward Current (Per Segment): 25mA
  • Max Reverse Voltage: 5v
  • 10 segments
  • Colors of bars:
    • 10 Red
  • Every 2 pins controls one bar of the bar graph
  • Works with TS-459 Bar Graph LED Driver chip

- Arduino Pin Connection

1 ----- D2 - R220 - GND

2 ----- D3 - R220 - GND

3 ----- D4 - R220 - GND

4 ----- D5 - R220 - GND

5 ----- D6 - R220 - GND

6 ----- D7 - R220 - GND

7 ----- D8 - R220 - GND

8 ----- D9 - R220 - GND

9 ----- D10 - R220 - GND

10 ----- D11 - R220 - GND

- Arduino Code

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,20,4); // LCD2004

int segPins[] = { 2,3,4,5,6,7,8,9,10,11 };

int idxBar = 0;

int minVal = 50;

int maxVal = 350;

int delayTime = 200;

byte digitsFill[10][10] = {

{1,0,0,0,0,0,0,0,0,0},

{1,1,0,0,0,0,0,0,0,0},

{1,1,1,0,0,0,0,0,0,0},

{1,1,1,1,0,0,0,0,0,0},

{1,1,1,1,1,0,0,0,0,0},

{1,1,1,1,1,1,0,0,0,0},

{1,1,1,1,1,1,1,0,0,0},

{1,1,1,1,1,1,1,1,0,0},

{1,1,1,1,1,1,1,1,1,0},

{1,1,1,1,1,1,1,1,1,1}

};

void setup()

{

lcd.init(); // initialize the lcd

lcd.backlight();

lcd.print("start LCD2004");

for (int i=0; i<11; i++)

{

pinMode(segPins[i], OUTPUT);

}

delay(1000);

lcd.clear();

}

void loop()

{

lcd.setCursor(0,0);

lcd.print("D024:Bargraph LED");

idxBar = map(analogRead(A0), minVal, maxVal, 0, 9);

lcd.setCursor(0,1);

lcd.print("analog=" + (String)analogRead(A0) + " ");

for(int j=0; j<10; j++)

{

digitalWrite(segPins[j], digitsFill[idxBar][j]);

lcd.setCursor(0,2);

lcd.print("idxBar="+(String)idxBar+" ");

}

delay(delayTime);

}

No customers have asked questions about this product yet.