You are on page 1of 1

1.

Initialize:
- Set up Arduino Uno microcontroller.
- Connect three sensors: smoke sensor, sound sensor, and IR sensor.
- Establish connection with the cloud server.

2. Define Thresholds:
- Smoke Density Threshold = 20
- Sound Decimal Threshold = 900

3. Main Loop:
loop:
a. Read sensor data:
- Read smoke level from smoke sensor.
- Read sound level from sound sensor.
- Check if vehicle is offside using IR sensor.

b. Check for accidents:


- If smoke level exceeds Smoke Density Threshold:
- Display "Accident detected: Smoke level above threshold."
- If sound level exceeds Sound Decimal Threshold:
- Display "Accident detected: Sound level above threshold."
- If vehicle is offside:
- Display "Vehicle offside detected."

c. Upload data to cloud server:


- Send sensor data to the cloud server.

d. Wait for 15 seconds:


- Delay 15 seconds before looping again.

You might also like