Pss Raspberry Pi Better - Smart
Tired of playing the "is there a spot?" guessing game every time you pull into your driveway or garage? What if your car could tell you—before you even turn the corner—exactly which spot is free?
def get_distance(): GPIO.output(TRIG, False) time.sleep(0.2) GPIO.output(TRIG, True) time.sleep(0.00001) GPIO.output(TRIG, False) smart pss raspberry pi
GPIO.setmode(GPIO.BCM) GPIO.setup(TRIG, GPIO.OUT) GPIO.setup(ECHO, GPIO.IN) GPIO.setup(17, GPIO.OUT) # Green LED GPIO.setup(27, GPIO.OUT) # Red LED Tired of playing the "is there a spot
