Bargraph Segment LED Module (SHB10R) [D024]



https://www.youtube.com/watch?v=-Qtzp6CA7Cc


*GitHubhttps://github.com/rdiot/rdiot-d024.git


* Specs

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


Forward Current (Per Segment): 25mA

Max Reverse Voltage: 5v

10 segment bar

Color: Super Bright Red

Industrial standard size

Low power consumption

Categorized for luminous intensity 


* Contents

- Connect

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


- Key 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);

}

'3) Actuator > LED' 카테고리의 다른 글

12V 4W 48 COB LED Lamp Light [D078]  (0) 2016.09.19
Arrow Indicator 14 SMD LED Blue [D077]  (0) 2016.09.19
Magic Cup Light Module (KY-027) [D020]  (0) 2016.09.18
RGB LED Module SMD (KY-009) [D008]  (0) 2016.09.18
RGB LED Module DIP (KY-016) [D007]  (0) 2016.09.18
Posted by RDIoT
|

Magic Cup Light Module (KY-027) [D020]



https://www.youtube.com/watch?v=yrBU-JRPk8M


*GitHub : https://github.com/rdiot/rdiot-d020.git


* Specs

Magic Light Cup modules are easy to Interactive Technology Division developed a can and ARDUINO interactive modules, PWM dimming principle is to use the principle of two modules brightness changes. Mercury switches provide a digital signal that triggers the PWM regulator, through the program design, We can see the light like two cups filled with the effect of shuffling back and forth.


* Contents

- Connect

G ----- GND

+ ----- X

S ----- D10

L ----- D11


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

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

 

int pinLed = 11;

int pinInput = 10;

 

int stateA = 0;

int brightness = 0;

int oldBrightness = 0;

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  pinMode(pinLed, OUTPUT);

  pinMode(pinInput, INPUT);  delay(1000);

  digitalWrite(pinInput, HIGH);

 

  lcd.clear();

}

 

void loop()

  lcd.setCursor(0,0);

  lcd.print("D020:Magic Cup Light");

 

  stateA = digitalRead(pinInput);

 

  if (stateA == HIGH && brightness < 255)

    brightness++;

  if (stateA == LOW && brightness >0)

    brightness--;

  if (oldBrightness != brightness)

  {

    lcd.setCursor(0,1);

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

  }

  oldBrightness = brightness;

  analogWrite(pinLed, brightness);

  delay(10); 

}

'3) Actuator > LED' 카테고리의 다른 글

Arrow Indicator 14 SMD LED Blue [D077]  (0) 2016.09.19
Bargraph Segment LED Module (SHB10R) [D024]  (0) 2016.09.19
RGB LED Module SMD (KY-009) [D008]  (0) 2016.09.18
RGB LED Module DIP (KY-016) [D007]  (0) 2016.09.18
RGB LED (BL-L515) [D006]  (0) 2016.09.18
Posted by RDIoT
|

RGB LED Module SMD (KY-009) [D008]



https://www.youtube.com/watch?v=XQI3KhjrwfY


*GitHubhttps://github.com/rdiot/rdiot-d008.git


* Specs

Using 5050 full color LED with max current of 20mA

Forward Voltage : Red 1.80V (2.4 max), Green,Blue 2.8V (3.6V)

RGB trichromatic limiting resistor to prevent burnout

through the PWM adjusting three primary colors can be mixed to obtain different colors

with a variety of single-chip interface

Operating voltage: 5V

LED drive mode: common cathode driver


* Contents

- Connect

B ----- D9

R ----- D11

G ----- D10

- ----- 3.3V or 5V 


- Key Code

int B = 9; // OUTPUT PIN blue

int R = 11; // OUTPUT PIN red

int G = 10; // OUTPUT PIN green

 

void setup()

{

 Serial.begin(115200); 

 Serial.println("Arduino Examples - RGB LED");

 pinMode(R, OUTPUT);

 pinMode(G, OUTPUT);

 pinMode(B, OUTPUT);

}

 

void loop()

 // RED

 digitalWrite(R, LOW);

 digitalWrite(G, HIGH);

 digitalWrite(B, HIGH);

 delay(1000);

 

 // GREEN

 digitalWrite(R, HIGH);

 digitalWrite(G, LOW);

 delay(1000);

 

 // BLUE

 digitalWrite(G, HIGH);

 digitalWrite(B, LOW);

 delay(1000);

 

 // RED + GREEN = YELLOW

 digitalWrite(B, HIGH);

 digitalWrite(R, LOW);

 digitalWrite(G, LOW);

 delay(1000);

 

 // RED + BLUE = MAGENTA

 digitalWrite(B, LOW);

 digitalWrite(R, LOW);

 digitalWrite(G, HIGH);

 delay(1000);

 

 // GREEN + BLUE = CYON

 digitalWrite(B, LOW);

 digitalWrite(R, HIGH);

 digitalWrite(G, LOW);

 delay(1000);

 

 // RED + GREEN + BLUE = WHITE

 digitalWrite(B, LOW);

 digitalWrite(R, LOW);

 digitalWrite(G, LOW);

 delay(1000);

 

 // ALL OFF

 digitalWrite(B, HIGH);

 digitalWrite(R, HIGH);

 digitalWrite(G, HIGH);

 delay(1000);

}

'3) Actuator > LED' 카테고리의 다른 글

Bargraph Segment LED Module (SHB10R) [D024]  (0) 2016.09.19
Magic Cup Light Module (KY-027) [D020]  (0) 2016.09.18
RGB LED Module DIP (KY-016) [D007]  (0) 2016.09.18
RGB LED (BL-L515) [D006]  (0) 2016.09.18
7 color flash LED Module (KY-034) [D010]  (0) 2016.09.18
Posted by RDIoT
|