Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import RPi.GPIO as GPIO # Change to another lib. or use pure python!
- import serial
- import time, sys
- import datetime
- P_BUTTON = 24 # Button, adapt to your wiring
- def setup():
- GPIO.setmode(GPIO.BOARD)
- GPIO.setup(P_BUTTON, GPIO.IN, GPIO.PUD_UP)
- SERIAL_PORT = "/dev/ttyUSB0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement