Advertisement
silver2row

and updates on old ideas...

Nov 15th, 2021
936
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. import RPi.GPIO as GPIO # Change to another lib. or use pure python!
  2. import serial
  3. import time, sys
  4. import datetime
  5.  
  6. P_BUTTON = 24 # Button, adapt to your wiring
  7.  
  8. def setup():
  9.     GPIO.setmode(GPIO.BOARD)
  10.     GPIO.setup(P_BUTTON, GPIO.IN, GPIO.PUD_UP)
  11.  
  12. SERIAL_PORT = "/dev/ttyUSB0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement