Hello phcbot please help
Upgrade to a smarter Gmail
Secure, fast & organized email
You do not have permission to view the full content of this post. Log in or register now.
If you're having trouble loading, visit the You do not have permission to view the full content of this post. Log in or register now..
Primary
codes to test
Prince Baylon
Prince Baylon
to me
0 minutes ago
Details
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
# Relay 1
GPIO.setup(25, GPIO.OUT)
# Push Button
GPIO.setup(23, You do not have permission to view the full content of this post. Log in or register now.)
# Sensor
GPIO.setup(22, You do not have permission to view the full content of this post. Log in or register now.)
# Reader
GPIO.setup(6, You do not have permission to view the full content of this post. Log in or register now.)
print('Please swipe your card')
try:
while True:
button=GPIO.input(23)
sensor=GPIO.input(22)
reader=GPIO.input(6)
if credit==1:
if button==1:
GPIutput(25, GPIO.LOW)
time.sleep(1)
if sensor==GPIO.LOW:
GPIutput(25, GPIO.HIGH)
time.sleep(1)
finally:
GPIO.cleanup()
Upgrade to a smarter Gmail
Secure, fast & organized email
You do not have permission to view the full content of this post. Log in or register now.
If you're having trouble loading, visit the You do not have permission to view the full content of this post. Log in or register now..
Primary
codes to test
Prince Baylon
Prince Baylon
to me
0 minutes ago
Details
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
# Relay 1
GPIO.setup(25, GPIO.OUT)
# Push Button
GPIO.setup(23, You do not have permission to view the full content of this post. Log in or register now.)
# Sensor
GPIO.setup(22, You do not have permission to view the full content of this post. Log in or register now.)
# Reader
GPIO.setup(6, You do not have permission to view the full content of this post. Log in or register now.)
print('Please swipe your card')
try:
while True:
button=GPIO.input(23)
sensor=GPIO.input(22)
reader=GPIO.input(6)
if credit==1:
if button==1:
GPIutput(25, GPIO.LOW)
time.sleep(1)
if sensor==GPIO.LOW:
GPIutput(25, GPIO.HIGH)
time.sleep(1)
finally:
GPIO.cleanup()