Changeset 1151 in t29-www for physical-computing


Ignore:
Timestamp:
Feb 28, 2017, 9:38:38 PM (7 years ago)
Author:
heribert
Message:

kleine Änderungen

Location:
physical-computing
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • physical-computing/TM1638_Lauftext/TM1638_Lauftext.ino

    r1144 r1151  
    11
    2 // Sketch "laufender Text" auf TM1638 (LED & Key)
     2// Mit diesem Sketch kannst du auf dem Modul LED & KEY einen Lauftext darstellen
    33
    44#include <TM1638.h>
    55
    6 TM1638  aktuellesModule(8, 9, 7);
    7 
    8 const char nachricht[] = "       AES SUPER AG        ";
    9 int base = 0;
     6TM1638 Module(8, 9, 7);   //(DIO, CLK, STB)
    107
    118void setup() {
    129}
    1310
     11const char nachricht[] = "        AES SUPER AG        ";  //8 Blank´s vor und hinter dem Text
     12int startIndex = 0;
     13
    1414void loop()
    1515{
    16   //bestimme Ausschnitt der Nachricht zum Anzeigen passend zum module.
    17   const char* pos = nachricht + base;
     16  //bestimme Ausschnitt der Nachricht zum Anzeigen passend zum Module.
     17 
     18  Module.setDisplayToString(&nachricht[startIndex]);
    1819
    19   if ( (pos >= nachricht) && ((pos + 8) < (nachricht + sizeof(nachricht)))) {
    20     aktuellesModule.setDisplayToString(pos);
    21   } else {
    22     aktuellesModule.clearDisplay();
    23   }
     20  startIndex++;
    2421
    25   base++;
    26 
    27   //Wenn das Ende der Nachricht erreicht ist, wieder von vorne anfangen.
    28   if (base == sizeof(nachricht) - 8) {
    29     base = -8;
     22  // Nachricht am Ende angekommen: Wieder von vorne anfangen.
     23 
     24  if (startIndex >= (sizeof(nachricht) - 8))
     25  {
     26    startIndex = 0;
    3027  }
    3128
     
    3330}
    3431
    35 /* Kurzinfo: "sizeof" kann den Speicherbedarf von Variablen bzw.Datentypen ermitteln
    36  *  "char" hat ähnliche Bedeutung wie int, byte usw. Um z.B. Buchstaben zu speichern
    37  *  benötigt man den Variablentyp char.
    38  */
  • physical-computing/index.php

    r1150 r1151  
    103103       
    104104        <?php $zaun_aes->printAnchor(); ?>
    105         Speziell für Schüler der AES: &nbsp;   <?php $zaun_aes->printMiniForm(); ?> &nbsp; <small>(Zuletzt aktualisiert am 23.2.2017)</small><br><br>
     105        Speziell für Schüler der AES: &nbsp;   <?php $zaun_aes->printMiniForm(); ?> &nbsp; <small>(Zuletzt aktualisiert am 28.2.2017)</small><br><br>
    106106
    107107        <?php $zaun_aes->start(); ?>
    108         ....für Victor: Am Montag (27.2.) findet die AG nicht statt.....<br><br>
    109108       
    110109        <a href="/physical-computing/ph6.pdf"> Physical-Computing Blatt 6 (PDF)</a> &nbsp; <small>Update Version 1.5</small><br>
    111         <a href="/physical-computing/ph7.pdf"> Physical-Computing Blatt 7 (PDF)</a> &nbsp; <br>
     110        <a href="/physical-computing/ph7.pdf"> Physical-Computing Blatt 7 (PDF)</a> &nbsp; <small>Update Version 1.1</small><br>
    112111        <br>
    113112        Hier noch die Sketches zur Anwendung des Moduls: LED & KEY <br>
Note: See TracChangeset for help on using the changeset viewer.
© 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