source: t29-www/physical-computing/TM1638_Lauftext/TM1638_Lauftext.ino @ 1151

Last change on this file since 1151 was 1151, checked in by heribert, 7 years ago

kleine Änderungen

File size: 600 bytes
Line 
1
2// Mit diesem Sketch kannst du auf dem Modul LED & KEY einen Lauftext darstellen
3
4#include <TM1638.h>
5
6TM1638 Module(8, 9, 7);   //(DIO, CLK, STB)
7
8void setup() {
9}
10
11const char nachricht[] = "        AES SUPER AG        ";  //8 Blank´s vor und hinter dem Text
12int startIndex = 0;
13
14void loop()
15{
16  //bestimme Ausschnitt der Nachricht zum Anzeigen passend zum Module.
17 
18  Module.setDisplayToString(&nachricht[startIndex]);
19
20  startIndex++;
21
22  // Nachricht am Ende angekommen: Wieder von vorne anfangen.
23 
24  if (startIndex >= (sizeof(nachricht) - 8))
25  {
26    startIndex = 0;
27  }
28
29  delay(200);
30}
31
Note: See TracBrowser for help on using the repository browser.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License