LTS-546AWC - Single Digit LED

LTS-546AWC - Single Digit LED © GPL3+

This is a simple library for the common anode LTS 546AWC single digit display. Allows to turn on off segments and display digits.

  • 1,409 views
  • 0 comments
  • 5 respects

Components and supplies

About this project

Arduino UNO is connected to the 8 segments (7 + decimal dot) of the single digit led, digital output. The LTS-546AWC is a common anode led digit so turning to LOW displays the segment.

Software is embedded in a simple library for convenience. No external libraries used.

In the circuit every segment is connected to Arduino pins with a 220 Ohm resistor to reduce current. The system is powered with 5V voltage.

Video in: https://photos.app.goo.gl/puo7Ue49bqayRntx9

Code

Example sketch using the libraryArduino
This example, using the library liblts546awc provided for this project, displays every segment of LTS-546AWC, and then numbers in ordinal and reverse order
/*
  Liblts546awc.ino
  Example arduino skectch for library liblts546awc
  
  The library controls one digit element LED
  Type common anode
  Model LTS-546AWC but pins are easily adaptable to layout
  Turns on and off a light emitting diode(LED) connected to digital pin
  Layout is with 3 or 8 common anode
  The circuit:
  - Common anode 3 (+5V)
  - Resistor 220Ohm for every led input
  - Arduino pins from 2 (A) to 8 (G) and 9 = DP (decimal point)
  - Displays segments snd numbers in direct and reverse order
  created april 2019
  by Riccardo G Corsi
  last modified 27 apr 2019
  This example code is in the public domain.
*/

include "liblts546awc.h"
LTS546AWC ledModule = LTS546AWC();


void setup() {
   ledModule.begin();
  // initialize LED pin HIGH to turn off
   ledModule.clearAll();
}

void loop() {
    ledModule.diag();     
    ledModule.clearAll();
    count();
    ledModule.clearAll();
    reverse();   
    delay(2*digitDelay);           
}


void count() {
  for (int i = 0; i < 10; i++) {
    ledModule.setDigit(i);
    delay(digitDelay);
  }             
}

void reverse() {
  for (int i = 9; i >= 0; i--) {
    ledModule.setDigit(i);
    delay(digitDelay);
  }             
}
GitHub repository
Library LTS546AWC

Schematics

LTS-546AWC Arduino connection
Connection of arduino pins to led display. Connections from Arduino:
ledPinDP = 9; // the number of the LED pin decimal point
ledPinG = 8; // the number of the LED pin segment G
ledPinF = 7; // the number of the LED pin segment F
ledPinE = 6; // the numero of the LED pin segment E
ledPinD = 5; // the segment of the LED pin segment D
ledPinC = 4; // the number of the LED pin segment C
ledPinB = 3; // the number of the LED pin segment B
ledPinA = 2; // the number of the LED pin segment A
Lts546awc bb 7zpnycz38g

Comments

Similar projects you might like

Programming 4 Digit 7 Segment LED Display

by SAnwandter1

  • 134,067 views
  • 35 comments
  • 104 respects

Bluetooth control led with lcd led status display real time.

Project tutorial by Youssef Sabaa

  • 26,575 views
  • 4 comments
  • 51 respects

LED Emergency Lights using WS2812 RGB LED Module

Project tutorial by bigboystoys13

  • 14,014 views
  • 7 comments
  • 33 respects

LED as a Light Sensor

Project tutorial by WolfxPac

  • 9,761 views
  • 9 comments
  • 23 respects

LED Color Sequencer

Project tutorial by Team thefantasticode.Group

  • 7,556 views
  • 14 comments
  • 27 respects

Programming 8x8 LED Matrix

by SAnwandter1

  • 203,380 views
  • 40 comments
  • 187 respects
Add projectSign up / Login