Easy Ultraonic Sensor on Uno

by malik_ahmed_mounir in Circuits > Arduino

116 Views, 1 Favorites, 0 Comments

Easy Ultraonic Sensor on Uno

ab9679d4-6ce8-4c7c-bd78-fd84d6afafaf.jpg

What one man con dream, other men can make true

We often no too often, hear this, though it means a lot. I'm pretty sure that a lot of you want to do an Ultrasonic Sensor project with Senor HC-SR04, without scams or stealing away your personal information, so I'm here to stop that.

Supplies

15cb90a3-9404-47fd-be96-6e8f8a5b1de1.jpg
a14e6441-4f69-4bf8-a034-0cc63c28dd61.jpg

You will need as follows:

  1. Arduino UNO
  2. Ultrasonic sensor HC-SR04
  3. 4 Male-to-male wires
  4. A breadboard
  5. Arduino IDE

Insert the Basic Stuff

39ab7479-9ef2-40b0-b32a-0e5941ace6bc.jpg

Put the breadboard on the ground and put the Ultrasonic sensor on the Breadboard. For example, put it on pins 30a,31a,32a and 33a.

Wiring

FZ8NPF1LHT57CIU.jpg

Attach as following:

  • GND to GND
  • VCC to 5v
  • Trig to pin 8
  • Echo to pin7

Writing the Code

Open IDE and open this code