Close
0%
0%

AT

We are helping people who have troubled memory clean. We are using ultrasonic senors and light to sense and tell a person where they cleaned

Similar projects worth following
Overview:
The point of the machine is when a person walks within a certain distance of it, Bright lights will flash to let them know they are within range

We are using an Ultra-Sonic sensor to detect when somebody is with in 50cm. When somebody is within 50cm Neo-Pixel LED will turn on to grab the cleaners attention and let them know they are done cleaning the section. The Hazzah Feather board is what we are using to let the Ultra-Sonic sensor and Neo-Pixel LED to talk to each other. A bread board is used to make the wiring more simple and neat.

Frantic Allis.stl

Box Design

Standard Tesselated Geometry - 58.09 kB - 04/22/2025 at 21:41

Download

Rickety Mantis.pdf

Business Logo

Adobe Portable Document Format - 47.22 kB - 04/21/2025 at 22:22

Preview

  • 1
    Setting Up Code

    Copy this Code into Arduino:

    const int trigPin = 12;
    const int echoPin = 13;
    const int ledPin = 16;

    int minDistance = 10;  // Minimum distance for LED on (cm)
    int maxDistance = 30;


    //define sound velocity in cm/uS
    #define SOUND_VELOCITY 0.034
    #define CM_TO_INCH 0.393701

    long duration;
    float distanceCm;
    float distanceInch;

    void setup() {
      Serial.begin(115200); // Starts the serial communication
      pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
      pinMode(echoPin, INPUT); // Sets the echoPin as an Input
      pinMode(ledPin, OUTPUT);
    }

    void loop() {
      // Clears the trigPin
      digitalWrite(trigPin, LOW);
      delayMicroseconds(2);
      // Sets the trigPin on HIGH state for 10 micro seconds
      digitalWrite(trigPin, HIGH);
      delayMicroseconds(10);
      digitalWrite(trigPin, LOW);

      int distance;



        // Reads the echoPin, returns the sound wave travel time in microseconds
      duration = pulseIn(echoPin, HIGH);
        // Calculate the distance
      distanceCm = duration * SOUND_VELOCITY/2;
        // Convert to inches
      distanceInch = distanceCm * CM_TO_INCH;
        // Prints the distance on the Serial Monitor
      Serial.print("Distance (cm): ");
      Serial.println(distanceCm);
      Serial.print("Distance (inch): ");
      Serial.println(distanceInch);
      distance = duration * 0.034 / 2;
        if (distanceCm >= minDistance && distanceCm <= maxDistance) {
        digitalWrite(ledPin, HIGH); // Turn LED on
      } else {
        digitalWrite(ledPin, LOW);  // Turn LED off
      }

      delay(1000);
    }

  • 2
    Create box to put machine in

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates