# Set up GPIO pins
GPIO.setmode(GPIO.BCM)
PIR-pin = 17
BUZZER_PIN = 23
BUTTON_PINS = [24, 25, 26] # BiKE, CAR, TRUCK Buttons
# Set up PIR sensor and buzzer
GPIO.SETUP(PIR_PIN, GPIO.IN)
GPIO.SETUP(buzzer_pin, gpio.OUT)
# Set up buttons
for pin in BUTTON_PINS:
GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
#Fess and vihicle counts
fees = {"Bike": 9.50, "Car": 18.75, "Truck": 37.00}
vehicle_counts = {"Bike": 0, "Car": 0, "Truck": 0,}
total_fee = 0
try:
while True:
# check PIR sensor
if GPIO.input(PIR_PIN):
print("vehicle detected!")
GPIO.output(BUZZER_PIN, GPIO.HIGH)
time.sleep(1)
GPIO.output(BUZZER_PIN, GPIO)
# Wait for button press
while True:
if not
GPIO.input(BUTTON_PINS[0]): # BIKE BUTTON
vihicle