|
Arduino Pro MicroSparkfun
|
x 1 | |
|
HC-SR04 Ultrasonic Ranging Sensor Module |
x 1 |
|
Soldering Iron Wire Welding Lead Roll |
|
|
Soldering iron |
|
|
arduino IDEArduino
|
Ultrasonic distance sensor
Ultrasonic Distance Measure
Measure distances by connecting this device to your smartphone with an USB cable. It has an android app to show the measure. It can measure distances anywhere from 0.01 to 5 meters. Great of measuring 90 degree distances. As it has ultrasonic technology, it is not affected by lighting conditions like laser or camera measurement.
Assembling.
The assembling is very straight forward. First the Arduino Pro Micro board has to be soldered to the board. Then, you have to bend the ultrasonic sensor's pins so that it has a 90 degree angle. Now solder the ultrasonic sensor to its place. It should be stacked on top of the Pro Micro.
Programming.
I chose the Arduino Pro Micro because it is based around the ATmega 32U4. This chip has the ability to communicate as a keyboard to the computer.
The code is written on Arduino, so it has to be uploaded from the Arduino IDE. The board is called Arduino Micro on the IDE and it should appear under the Arduino AVR Boards section.
Upload the code and it's ready to use.
Enclosure.
If you have access to a 3D printer, you can print a custom enclosure for the device. It is a simple model, it doesn't require support structures to print.
Application.
To install the application, simply download the .apk file and open it. There is only support for Android devices.
The application has a simple design that can easily be understood.
/*
*
*
*/
#include <Keyboard.h>
long readUltrasonicDistance(int triggerPin, int echoPin)
{
pinMode(triggerPin, OUTPUT); // Clear the trigger
digitalWrite(triggerPin, LOW);
delayMicroseconds(2);
digitalWrite(triggerPin, HIGH);
delayMicroseconds(10);
digitalWrite(triggerPin, LOW);
pinMode(echoPin, INPUT);
return pulseIn(echoPin, HIGH);
}
void setup() {
Serial.begin(9600);
Keyboard.begin();
}
void loop() {
Serial.println(0.01723 * readUltrasonicDistance(3, 5));
Keyboard.print(0.01723 * readUltrasonicDistance(3, 5));
Keyboard.press(0x20);
Keyboard.releaseAll();
delay(500);
}
Ultrasonic distance sensor
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Inaki Iturriaga
- GPS Mobile Beacon Building a GPS Emergency Beacon: A DIY TutorialWelcome to our latest DIY project: creating a GPS Eme...
- Wireless RFID Card Copier. Wireless RFID Card CopierIn today's digital world, security and accessibility are of paramount impor...
- Piezo Alert System. Within the fast-evolving sphere of security tools and home automation, creativity often paves the wa...
- Wifi Weather Station - Sensors board WiFi Weather Station - Sensor unitIn our digital era, many electronics projects integrate diverse se...
- RC Receiver Build Your Own RC ReceiverHarnessing advanced electronics and precise control systems, the RC Receiv...
- Universal RC Controller Build Your Own Universal RC RemoteHarnessing the power of custom PCBs and wireless communication, th...
- Continuous GPS Tracker This compact and efficient tracker provides real-time location updates, making it ideal for surveill...
- Air Quality Monitor Welcome to our DIY tutorial on assembling an Air Quality Monitoring Device. This project is perfect ...
- Automatic Watch Winder Automatic Watch WinderIn the realm of luxury timepieces and watch aficionados, an automatic watch is...
- Handheld GPS Within the swiftly advancing realm of portable technology and travel essentials, innovation often sh...
- Dual Motor Controller for Model Robotics In the thrilling world of robotics and DIY engineering, innovation continues to soar to new heights....
- Altitude Indicator with Beeper for Rocketry Altitude Indicator for Model RocketryIn our ever-advancing technological landscape, countless projec...
- Wifi Weather Station - Display unit WiFi Weather Station - Display UnitIn this technologically advanced age, countless electronics proje...
- Positon Breakout Board Position Sensors Breakout Board In today's era of advanced technology, many electronics projects req...
- Ambient Sensors Breakout Board In today's world, electronics projects often require the integration of multiple sensors to collect ...
- Infrared Launch Controller IntroductionHave you ever wanted to remotely launch a rocket, drone or other device using infrared t...
- Altimeter Datalogger with Display. Building TutorialAltimeter Datalogger with Display.Components needed:BMP280 sensorI2C to 16x2 displa...
- Remote Igniter + 3D printed Case. Remote IR Igniter.Build an Infrared remote ignitor for model rocket testing and launching!This guide...
-
-
Helium IoT Network Sensor Development board | H2S-Dev V1.2
91 0 0 -
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
176 1 1