[Tutorial] Raspberry Pi - Relays mit Python steuern

By @ittv1/21/2018rasperry

In diesem Video zeigen wir, wie man ein Relay mit einem Raspberry Pi steuert. Für die Steuerung der GPIOs wird Python verwendet.

Links:
• Raspberry Pi*: http://amzn.to/2wbDadE
• Breadboard*: http://amzn.to/2xYtZSy
• Kabel*: http://amzn.to/2hoZLxh
• DHT22*: http://amzn.to/2xo9Ge1
• Relay*: http://amzn.to/2xkTb4Q
• Breadboard*: PowerSupply: http://amzn.to/2fh9THv
Befehle:
sudo -i
apt-get update
apt-get install python-dev
apt-get install python.rpi.gpio

nano gpio.py
-----Script-----
#!/usr/bin/python
import time
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)
GPIO.setup(22, GPIO.OUT)
GPIO.output(22, GPIO.LOW)

time.sleep(10)

GPIO.output(22, GPIO.HIGH)
GPIO.cleanup()
---Script Ende---

Du möchtest uns Unterstützen?
Amazon*: http://amzn.to/2fgzUHa
Prime*: http://amzn.to/2ffIF46
Blitzangebote*: http://amzn.to/2xmjSq1

Viel Spaß beim Anschauen ;)

  • Dies sind Affiliate-Link und du bezahlst nicht mehr für das Produkt, aber unterstützt uns ein klein wenig, wenn du vor deinem Einkauf auf einen der Links klickst.

▶️ DTube
▶️ IPFS
5

comments