Grundkenntnisse Programmierung 5 (Tür Sicherheitssystem)

Aus HSHL Mechatronik
Zur Navigation springen Zur Suche springen

Autor: Justin Frommberger

goto

Springt im Programmfluss zu einem bestimmten, benannten Punkt.


[Quelltext 1: goto.ino]

Anfang:

goto Anfang; // Springt zu dem Anfang


Keypad(makeKeymap(userKeymap), row[], col[], rows, cols)

Keypad ist eine Bibliothek, um Matrix Style Keypads mit dem Arduino nutzen zu können.


[Quelltext 2: goto.ino]

const byte rows = 4; //vier Reihen
const byte cols = 3; //drei Spalten
char keys[rows][cols] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'#','0','*'}
};
byte rowPins[rows] = {5, 4, 3, 2}; // Verbindet die Reihen Pinouts des Keypads
byte colPins[cols] = {8, 7, 6}; //Verbindet die Spalten Pinouts des Keypads
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, rows, cols);



→ zurück zur Übersicht: Projekte