I thought i would start small and just make it so when i press a button it prints hello world or something but none of the tutorials work or they are only for leds this is my current setup but any help would be amazing
and my code is
but even my code dosent work.
Code: Select all
import RPi.GPIO as GPIO import time from subprocess import call GPIO.setmode(GPIO.BCM) GPIO.setup(18,GPIO.IN,pull_up_down=GPIO.PUD_UP) while True: input = GPIO.input(18) if(input == False): print "IT works" time.sleep(0.2)