The TinyShield 7 Segment Display Board contains two seven segment LEDs (Red LEDs) that can be set over the I2C (thus saving signals to do other tasks) by using aSemtech SX1506 I/O expander. Each of the segments, including the decimal indicator can be individually selected, and an easy to use library is provided to make it extremely easy to use.
See our Tiny Circuits Range Here.
Two Seven Segment LEDs, Colour Red
Ultra compact size and weight (smaller than a US Quarter!)
Square Version: 20mm x 20mm (.787 inches x .787 inches)
Max Height (from lower bottom TinyShield Connector to upper top of LED displays): 6.6mm (.26 inches)
Weight: 1.36 grams (.05 ounces)
Arduino pins A4 and A5 are used by this shield
Code: Select all
/* FILE: TinyDuino_7_Segment_Example
DATE: 14/10/15
VERSION: 0.1
REVISIONS:
14/10/15 Created version 0.1
This is an example of how to use the TinyCircuits TinyShield HCTICI0026 / ASD2020
Joystick adapter. The sketch will output the current state of the joysticks imputs
to the serial port. You will therefore require a USB adaptor shiled to run this test.
THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
REASON WHATSOEVER. */
/* include the standard wire library and the Tiny7Seg library */
#include <Wire.h>
#include "Tiny7Seg.h"
/* Create an instance of the library */
Tiny7Seg seg;
void setup()
{
Wire.begin();
seg.init();
}
void loop()
{
byte index;
/* Count from 0 to 99 */
for(index = 0; index < 100; index++)
{
seg.printInt(index);
delay(100);
}
/* Flash the decimal places */
for(index = 0; index <5; index++)
{
seg.setDecPoints(1,0);
delay(500);
seg.setDecPoints(0,1);
delay(500);
}
/* Wait a little and then start again */
delay(3000);
seg.setDecPoints(0,0);
}
The TinyCircuits 7 Segment library can be downloaded here: