from machine import Pin
import time
import random
print("Bluetooth Simulation Started")
print("Waiting for mobile connection...")
time.sleep(2)
print("Mobile Connected Successfully!")
TOTAL_SLOTS = 5
available_slots = 3 # example value
while True:
temperature = random.randint(20, 35)
humidity = random.randint(40, 80)
gas_level = random.randint(100, 500)
if available_slots > 0:
parking_status = "Available"
else:
parking_status = "Full"
message = "Temp: " + str(temperature) + " C | "
message += "Humidity: " + str(humidity) + " % | "
message += "Gas: " + str(gas_level) + " ppm | "
message += "Parking: " + parking_status
print("Sending Data via Bluetooth...")
print(message)
time.sleep(2)