Ausgabe auf 4 Digit LED auf SMD Shield

Dependencies:   SAA1064 mbed

Das Digit Display ist eine 4-stellige 7-Segment Anzeige, ist auf dem SMD Shield integriert und wird mittels I2C Bus angesprochen.

Die Ansteuerung erfolgt mittels der SAA1064 Library.

Anwendungen

  • Anzeige von Messwerten, Zeit etc.
Committer:
marcel1691
Date:
Sat Apr 25 16:15:58 2015 +0000
Revision:
0:471ded06b4cc
Ausgabe auf 4 Digit LED auf SMD Shield

Who changed what in which revision?

UserRevisionLine numberNew contents of line
marcel1691 0:471ded06b4cc 1 /** Ausgabe auf 4 Digit LED auf SMD Shield
marcel1691 0:471ded06b4cc 2 */
marcel1691 0:471ded06b4cc 3 #include "mbed.h"
marcel1691 0:471ded06b4cc 4 #include "SAA1064.h"
marcel1691 0:471ded06b4cc 5
marcel1691 0:471ded06b4cc 6 // 4 Digit
marcel1691 0:471ded06b4cc 7 SAA1064 display;
marcel1691 0:471ded06b4cc 8
marcel1691 0:471ded06b4cc 9 int main()
marcel1691 0:471ded06b4cc 10 {
marcel1691 0:471ded06b4cc 11 for ( int i = 0; i < 10; i++ )
marcel1691 0:471ded06b4cc 12 {
marcel1691 0:471ded06b4cc 13 printf( "%d\n", i );
marcel1691 0:471ded06b4cc 14 display.write( i, i+1, i+2, i+3 );
marcel1691 0:471ded06b4cc 15 wait( 0.2 );
marcel1691 0:471ded06b4cc 16 }
marcel1691 0:471ded06b4cc 17
marcel1691 0:471ded06b4cc 18 for ( int i = 0; i < 10000; i++ )
marcel1691 0:471ded06b4cc 19 {
marcel1691 0:471ded06b4cc 20 printf( "%d\n", i );
marcel1691 0:471ded06b4cc 21 display.writeInt( i );
marcel1691 0:471ded06b4cc 22 wait( 0.1 );
marcel1691 0:471ded06b4cc 23 }
marcel1691 0:471ded06b4cc 24 }