Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 66 - Ai Robogenius
P. 66

    else: If the object is at a safe distance (greater than or equal to 60 cm).

                         Ÿ  Serial.println("It  is safe to move forward."): Prints a message  to  the serial monitor
                             indicating it is safe.
                         Ÿ  digitalWrite(4, LOW): Turns OFF the Piezo buzzer.

                         delay(10): Pauses the program for 10 milliseconds to stabilise the sensor readings and improve
                         simulation performance.
                      After completing  all  the steps  and connecting the components,  your  Ultrasonic  Distance
                      Measurement System will measure the distance to an object and activate the Piezo buzzer if the
                      object is too close.

                                                        When distance is greater than 60 cm

                                                          When distance is less than 60 cm

                       ECOTECH     Smart homes use motion sensors to control lighting, turning lights ON only when needed to
                       ENERGY      reduce electricity usage.

                                     AI RoboGenius - VII
                     64

| 61 62 63 64 65 66 67 68 69 70 71 |