Rotating UltraSonic Obstacle Sensor

An Obstacle sensor with Multiple industrial Applications.

Apr 9, 2020

5530 views

1 respects

Components and supplies

1

Ultrasonic Sensor - HC-SR04 (Generic)

1

Arduino UNO

1

Solderless Breadboard Full Size

1

Jumper wires (generic)

1

SG90 Micro-servo motor

Project description

Code

Processing IDE code

java

Welcome to Processing! Start by visiting http://processing.org/download and selecting the Mac, Windows, or Linux version, depending on what machine you have. Installation on each machine is straightforward: On Windows, you'll have a .zip file. Double-click it, and drag the folder inside to a location on your hard disk. It could be Program Files or simply the desktop, but the important thing is for the processing folder to be pulled out of that .zip file. Then double-click processing.exe to start. The Mac OS X version is also a .zip file. Double-click it and drag the Processing icon to the Applications folder. If you're using someone else's machine and can't modify the Applications folder, just drag the application to the desktop. Then double-click the Processing icon to start. The Linux version is a .tar.gz file, which should be familiar to most Linux users. Download the file to your home directory, then open a terminal window, and type: tar xvfz processing-xxxx.tgz (Replace XXXX with the rest of the file's name, which is the version number.) This will create a folder named processing-2.0 or something similar. Then change to that directory: cd processing-xxxx and run it: ./processing With any luck, the main Processing window will now be visible. Everyone's setup is different, so if the program didn't start, or you're otherwise stuck, visit the troubleshooting page for possible solutions.

Arduino IDE code

c_cpp

Copy this code on your Arduino IDE: ABOUT ARDUINO IDE: Arduino is a prototype platform (open-source) based on easy-to-use hardware and software. It consists of a circuit board, which can be programed (referred to as a microcontroller) and a ready-made software called Arduino IDE (Integrated Development Environment), which is used to write and upload the computer code to the physical board. The key features are − Arduino boards are able to read analog or digital input signals from different sensors and turn it into an output such as activating a motor, turning LED on/off, connect to the cloud and many other actions. You can control your board functions by sending a set of instructions to the microcontroller on the board via Arduino IDE (referred to as uploading software). Unlike most previous programmable circuit boards, Arduino does not need an extra piece of hardware (called a programmer) in order to load new code onto the board. You can simply use a USB cable. Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to program. Finally, Arduino provides a standard form factor that breaks the functions of the micro-controller into a more accessible package.

Processing IDE code

java

Welcome to Processing! Start by visiting http://processing.org/download and selecting the Mac, Windows, or Linux version, depending on what machine you have. Installation on each machine is straightforward: On Windows, you'll have a .zip file. Double-click it, and drag the folder inside to a location on your hard disk. It could be Program Files or simply the desktop, but the important thing is for the processing folder to be pulled out of that .zip file. Then double-click processing.exe to start. The Mac OS X version is also a .zip file. Double-click it and drag the Processing icon to the Applications folder. If you're using someone else's machine and can't modify the Applications folder, just drag the application to the desktop. Then double-click the Processing icon to start. The Linux version is a .tar.gz file, which should be familiar to most Linux users. Download the file to your home directory, then open a terminal window, and type: tar xvfz processing-xxxx.tgz (Replace XXXX with the rest of the file's name, which is the version number.) This will create a folder named processing-2.0 or something similar. Then change to that directory: cd processing-xxxx and run it: ./processing With any luck, the main Processing window will now be visible. Everyone's setup is different, so if the program didn't start, or you're otherwise stuck, visit the troubleshooting page for possible solutions.

Downloadable files

Circuit Diagram Arduino UNO

Circuit Diagram Arduino UNO

Image

Circuit Diagram Arduino UNO

Circuit Diagram Arduino UNO

Image

Comments

Only logged in users can leave comments

ParthSharma1405

0 Followers

0 Projects

0