diff options
author | u_haenger <u_haenger@web> | 2016-10-29 14:49:14 +0200 |
---|---|---|
committer | Charly Root <root@www-static.glb.internetputzen.com> | 2016-10-29 14:49:14 +0200 |
commit | 04908ea1c239e74ee3694fc2fedbde89b623916e (patch) | |
tree | 7bdc668b1a71d74120addb5393776771c0187bcb | |
parent | c9e28d84f85afa69c36b77cccb17354ad9f9f18e (diff) |
-rw-r--r-- | _Raspberry_Pi___42____42__Blink__42____42___.mdwn | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/_Raspberry_Pi___42____42__Blink__42____42___.mdwn b/_Raspberry_Pi___42____42__Blink__42____42___.mdwn index 5f35dd68..80d6f537 100644 --- a/_Raspberry_Pi___42____42__Blink__42____42___.mdwn +++ b/_Raspberry_Pi___42____42__Blink__42____42___.mdwn @@ -32,25 +32,27 @@ Bild von adafruit.com ##LED mit Python-Interpreter steuern -import RPi.GPIO as GPIO ## Import GPIO library +<pre> +import RPi.GPIO as GPIO ## Importiere GPIO Bibliothek import time ## Damit man Warten kann -GPIO.setmode(GPIO.BOARD) ## Use board pin numbering -GPIO.setup(7, GPIO.OUT) ## Setup GPIO Pin 7 to OUT +GPIO.setmode(GPIO.BOARD) ## Nutze BOARD PIN-Nummerierung +GPIO.setup(7, GPIO.OUT) ## PIN 7 soll ein Ausgang sein GPIO.output(7,True) ## Schalte GPIO pin 7 an GPIO.output(7,False) ## Schalte GPIO pin 7 an GPIO.cleanup() ## Um das ganze sauber zu beenden - +</pre> ## Kleines Blink-Programm <pre> -import RPi.GPIO as GPIO ## Import GPIO library -import time ## Import 'time' library. Allows us to use 'sleep' +import RPi.GPIO as GPIO ## Importiere GPIO Bibliothek +import time ## Damit man Warten kann + +GPIO.setmode(GPIO.BOARD) ## Nutze BOARD PIN-Nummerierung +GPIO.setup(7, GPIO.OUT) ## PIN 7 soll ein Ausgang sein -GPIO.setmode(GPIO.BOARD) ## Use board pin numbering -GPIO.setup(7, GPIO.OUT) ## Setup GPIO Pin 7 to OUT ##Define a function named Blink() def Blink(numTimes,speed): |