Skip to content
Snippets Groups Projects
Commit 4918589b authored by Neil Gershenfeld (test)'s avatar Neil Gershenfeld (test)
Browse files

wip

parent 4b463abe
No related branches found
No related tags found
No related merge requests found
Pipeline #10865 passed
#
# ring.RPi.GPIO.py
# Raspberry Pi RPI.GPIO ring oscillator test
#
# Neil Gershenfeld 3/21/21
#
# This work may be reproduced, modified, distributed,
# performed, and displayed for any purpose, but must
# acknowledge this project. Copyright is retained and
# must be preserved. The work is provided as is; no
# warranty is provided, and users accept all liability.
#
import RPi.GPIO as GPIO
pinout = 16
pinin = 18
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(pinout,GPIO.OUT)
GPIO.setup(pinin,GPIO.IN)
while (True):
if (GPIO.input(pinin) == GPIO.LOW):
GPIO.output(pinout,GPIO.HIGH)
else:
GPIO.output(pinout,GPIO.LOW)
#
# ring.gpiozero.py
# Raspberry Pi gpiozero ring oscillator test
#
# Neil Gershenfeld 3/21/21
#
# This work may be reproduced, modified, distributed,
# performed, and displayed for any purpose, but must
# acknowledge this project. Copyright is retained and
# must be preserved. The work is provided as is; no
# warranty is provided, and users accept all liability.
#
from gpiozero import LED
from gpiozero import Button
led = LED(23)
button = Button(24)
while (True):
if button.is_pressed:
led.on()
else:
led.off()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment