Leeland Heins
Published © GPL3+

Esquilo Air & 5161AS 1 Digit 7 Segment LED Tutorial

This is a simple example setup to show how to hook a 5161AS 1 digit 7 segment LED display to an Esquilo Air.

BeginnerProtip1 hour6,801
Esquilo Air & 5161AS 1 Digit 7 Segment LED Tutorial

Things used in this project

Hardware components

Esquilo Air
Esquilo Air
×1
Breadboard (generic)
Breadboard (generic)
×1
5161AS 1 digit 7 segment LED display
×1
Resistor 221 ohm
Resistor 221 ohm
×1
Male/Male Jumper Wires
It is nice to make them color coordinated. I used: 2 black, 1 red, 2 white, 2 blue, 1 orange, 1 green, 1 yellow
×10

Story

Read more

Schematics

Esquilo & 5161AS wiring diagram

Esquilo Air & 5161AS 1 digit 7 segment LED wiring diagram

LCD_5161AS.nut

Library for 5161AS 1 digit 7 segment LED on the Esquilo Air.

Code

LCD_5161AS_demo.nut

Plain text
Demonstration code of the 5161AS 1 digit 7 segment LED on the Esquilo Air.
//
// LED 5161AS demo
//
// 20161214 Leeland Heins
//
require("GPIO");

// Load the library.
dofile("sd:/LED_5161AS.nut");

// Instantiate our class.
local led = LED_5161AS();

// Turn on all LED segments
led.all_on();

delay(500);

// Turn off all LED segments
led.all_off();

delay(500);

local i;

// Display hex digits 0-f and blink decimal point between
for (i = 0; i < 16; i++) {
    led.digit(i);

    delay(500);

    led.blink_dp();

    delay(500);

    led.blink_dp();
    
    delay(500);
    
    led.blink_dp();
    
    delay(500);
    
    led.blink_dp();
}

delay(500);

led.all_off();

LCD_5161AS.nut

Library for the 5161AS 1 digit 7 segment LCD on the Esquilo Air.

Credits

Leeland Heins

Leeland Heins

4 projects • 0 followers
Hardware & Software H4x0r

Comments