-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First version of the gertboard. (#1)
- Loading branch information
Marco Bakera
committed
Aug 12, 2017
1 parent
3bcdff6
commit 4e36d7c
Showing
5 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Gertboard | ||
========= | ||
|
||
Das Gertboard ist ein vielfältiges Erweiterungsboard für den Raspberry | ||
Pi. Es vereint verschiedene Komponenten auf einer Platine. Ein | ||
ausführliche Beschreibung befindet sich in den | ||
Handbuch | ||
[Gertboard_UM_with_python.pdf](doc/Gertboard_UM_with_python.pdf). Eine | ||
deutsch Übersetzung befindet sich in | ||
[Gertboard-Handbuch_deutsch.pdf](doc/Gertboard-Handbuch_deutsch.pdf). | ||
|
||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import RPi.GPIO as GPIO | ||
import time | ||
|
||
led_pin = 25 | ||
btn_pin = 24 | ||
o | ||
GPIO.setmode(GPIO.BCM) | ||
GPIO.setup(led_pin, GPIO.OUT) | ||
GPIO.setup(btn_pin, GPIO.IN) | ||
|
||
led_on = False | ||
while True: | ||
if GPIO.input(btn_pin): | ||
print("Button pressed") | ||
led_on = not led_on | ||
GPIO.output(led_pin, led_on) | ||
time.sleep(0.01) |