1. Platz Enermax Casecon Contest
Date of registration: Mar 12th 2012
Location: München
Occupation: Maschinenbautechniker
Source code |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
/* Arduino Tutorial 1.1 - Taster by Scynd 2015 http://www.scynd.de/tutorials/arduino-tutorials.html */ // Konstanten const int tasterPin = 2; // Pin Nummer des Tasters const int ledPin = 3; // Pin Nummer der LED des Arduinos // Variablen int tasterStatus = 0; // Variable für den Taster Status void setup() { pinMode(ledPin, OUTPUT); // LED Pin wird als Ausgang gesetzt pinMode(tasterPin, INPUT); // Taster Pin wird als Eingang gesetzt } void loop() { // Lesen des Status des Taster Pins tasterStatus = digitalRead(tasterPin); // Prüfen ob der Taster gedrückt ist // Wenn der TasterState HIGH ist... if (tasterStatus == HIGH) { digitalWrite(ledPin, HIGH); // schalte die LED an } // Wenn nicht... else { digitalWrite(ledPin, LOW); // schalte die LED aus } } |
This post has been edited 20 times, last edit by "Scynd" (Apr 25th 2016, 11:46am) with the following reason: Das Tutorial wurde überarbeitet, einige Kommentare passen nun vielleicht nicht mehr ganz.
Fühlt sich wohl hier
Date of registration: Oct 5th 2011
Occupation: Elektroniker für Geräte und Systeme
1. Platz Enermax Casecon Contest
Date of registration: Mar 12th 2012
Location: München
Occupation: Maschinenbautechniker
Fühlt sich wohl hier
Date of registration: Oct 5th 2011
Occupation: Elektroniker für Geräte und Systeme
Lebt hier!
Date of registration: Oct 25th 2013
Name: Jafar Al-Mansoor
Location: Köln
Occupation: Schüler, bald professioneller Casemodder :P
"Mein Name ist George - Der George"
Date of registration: Mar 17th 2010
Location: Da wo der Berch wohnt
Occupation: Inginöööör und Freundinbeschäftiger
Users who thanked for this post:
Tamlem (07.11.2013)
Wenn I Murksen muss... Aaarrgh..
Date of registration: Jul 18th 2009
Name: Patrick Betz
Location: Simbach bei Landau a. d. Isar
Occupation: Kraftfahrer (Gelernter Schreiner)
Lebt hier!
Date of registration: Oct 25th 2013
Name: Jafar Al-Mansoor
Location: Köln
Occupation: Schüler, bald professioneller Casemodder :P
Wenn I Murksen muss... Aaarrgh..
Date of registration: Jul 18th 2009
Name: Patrick Betz
Location: Simbach bei Landau a. d. Isar
Occupation: Kraftfahrer (Gelernter Schreiner)
Wohnt hier!
Date of registration: Apr 4th 2012
Name: Patrick K.
Location: Irgendwo in der tiefen Eifel
Occupation: Schüler
Fühlt sich wohl hier
Date of registration: Jan 31st 2012
Location: Weißenthurm
Occupation: Fachinformatiker Fachrichtung Systemintegration
1. Platz Enermax Casecon Contest
Date of registration: Mar 12th 2012
Location: München
Occupation: Maschinenbautechniker
Users who thanked for this post:
Paladin (05.09.2015)
Wenn I Murksen muss... Aaarrgh..
Date of registration: Jul 18th 2009
Name: Patrick Betz
Location: Simbach bei Landau a. d. Isar
Occupation: Kraftfahrer (Gelernter Schreiner)
Users who thanked for this post:
Scynd (06.09.2015)
© 2011-2014 We-Mod-It.com | Das Forum von Moddern für Modder | © Design by Jama