Your shopping cart is empty!
7 Segment Display Clock Red LED Number 1 Digit ANODE 0.56
Product Code: LED Number
Availability: In Stock
Stock Ready: Kuala Lumpur
Availability: In Stock
Stock Ready: Kuala Lumpur
Price:
RM0.80
Description :
Display digits, dots and characters, Your basic 7-segment LED, displaying character “ 0,1,2,3,4,5,6,7,8,9,b,d,E and … …” .
Specification :
- Single Digit
- Red Color
- Common Anode
- Consists of 10 pins, which 2 of them are common anode pins.
1 | Make the following 9 connections:
|
Sample code
// show the digit 1 on a Common Anode 7-segment LED display
int segA = 7;
int segB = 6;
int segC = 4;
int segD = 2;
int segE = 1;
int segF = 9;
int segG = 10;
int segDP = 5;
void setup() {
pinMode(segA, OUTPUT);
pinMode(segB, OUTPUT);
pinMode(segC, OUTPUT);
pinMode(segD, OUTPUT);
pinMode(segE, OUTPUT);
pinMode(segF, OUTPUT);
pinMode(segG, OUTPUT);
pinMode(segDP, OUTPUT);
}
void loop() {
// this is for a Common Anode display where a LOW turns on a segment
// displays the digit 1
digitalWrite(segA, HIGH); // turn off LED
digitalWrite(segB, LOW); // turn on LED
digitalWrite(segC, LOW);
digitalWrite(segD, HIGH);
digitalWrite(segE, HIGH);
digitalWrite(segF, HIGH);
digitalWrite(segG, HIGH);
digitalWrite(segDP, HIGH);
}
For a Common Anode display, a LOW signal turns on the LED, and a HIGH signal turns off the LED.
Write a review
Your Name:
Your Review: Note: HTML is not translated!
Rating: Bad Good
Enter the code in the box below:
Related Products (5)