Waterproof Ultrasonic Sensor A02YYUW with Arduino, ESP32, & ESP8266

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 15

  • @IamEqualtoall
    @IamEqualtoall Год назад +1

    Great video! I like the comparison and you do a great job with a tutorial❤❤❤

    • @ElectroniClinic
      @ElectroniClinic  Год назад +1

      I am glad, you liked it. And thank you for the comment.

  • @shakerileiwat4341
    @shakerileiwat4341 Год назад +1

    Great as always 👍👍👍
    Thank you

  • @t1d100
    @t1d100 Год назад

    If this sensor was used inside of a portable water tank and the tank was placed on ground that was not level, how would that effect the reading?

  • @azam2821
    @azam2821 11 месяцев назад +1

    NICE

  • @TeacherP_
    @TeacherP_ 9 месяцев назад

    I am using the code but I am getting an error :"softwareserial does not name a type"

  • @t1d100
    @t1d100 Год назад

    Can you use this to DIY a "fish finder?" Would the 450cm distance limit change in water? That would not be nearly deep enough. The 60* viewing angle would be really wide, for a fish finder.

    • @ElectroniClinic
      @ElectroniClinic  Год назад

      I didn't check this underwater

    • @saladulasaikrishna1542
      @saladulasaikrishna1542 10 месяцев назад

      If possible can you check it under water and please let me know the reading. I have used JSNSR04T sensor and placed in water, the readings is maximum number (782). @@ElectroniClinic

    • @alfem
      @alfem 6 месяцев назад

      I use a similar sensor for water tank level measurement. Ultrasonic waves rebounds on water surface.

  • @Thuliolima2008
    @Thuliolima2008 Год назад +1

    Very good

    • @ElectroniClinic
      @ElectroniClinic  Год назад

      Thanks

    • @nagendrasinghthakur9585
      @nagendrasinghthakur9585 3 месяца назад

      #include
      // Define pins for ultrasonic sensor
      const int trigPin = 14;
      const int echoPin = 12;
      // Define LCD pins
      const int rs = 35, en = 34, d4 = 32, d5 = 25, d6 = 26, d7 = 27;
      LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
      void setup() {
      // Initialize serial communication
      Serial.begin(9600);
      // Set up the ultrasonic sensor pins
      pinMode(trigPin, OUTPUT);
      pinMode(echoPin, INPUT);
      // Set up the LCD number of columns and rows
      lcd.begin(16, 2);
      // Print initial message to LCD
      lcd.print("Distance:");
      }
      void loop() {
      // Variables for the duration of the ultrasonic pulse and the distance
      long duration;
      int distance;
      // Send a pulse to the trigger pin
      digitalWrite(trigPin, L);
      delayMicroseconds(2);
      digitalWrite(trigPin, H);
      delayMicroseconds(10);
      digitalWrite(trigPin, L);
      // Measure the duration of the echo pulse
      duration = pulseIn(echoPin, HIGH);
      // Calculate the distance (in cm)
      distance = duration * 0.034 / 2;
      // Print distance to serial monitor
      Serial.print("Distance: ");
      Serial.print(distance);
      Serial.println(" cm");
      // Display distance on LCD
      lcd.setCursor(0, 1); // Set cursor to second line
      lcd.print(" "); // Clear previous distance
      lcd.setCursor(0, 1); // Set cursor to second line
      lcd.print(distance); // Print current distance
      // Example if-else conditions based on distance
      if (distance

  • @aliemlek
    @aliemlek Год назад +1

    👍👍👌👌