Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Param Aggarwal
Published © MIT

Mapping A Room Wh Ultrasonic Distance Sensors

I attempt to map the shape of my room using four HC-SR04 Ultrasonic distance sensors and a magnetic compass to measure the heading.

BeginnerFull instructions provided2 hours27,967
Mapping A Room Wh Ultrasonic Distance Sensors

Things used in this project

Hardware components

Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×4
SparkFun Tilt Compensated Compass Breakout - LSM303DLMTR
×1
Pro Micro - 5V/16MHz
SparkFun Pro Micro - 5V/16MHz
×1

Software apps and online services

Arduino IDE
Arduino IDE
Processing IDE

Story

Read more

Schematics

Connections

You need to connect the compass on the I2C bus of the Arduino. Connect the trigger and echo pins to the pins of your choice and simply configure them in code.

Code

Code on Github

Contains both the Arduino code as well as Processing.

Credits

Param Aggarwal

Param Aggarwal

2 projects • 9 followers
Living at the intersection of React & React Native based apps, along with Arduino and ESP8266 based hardware.

Comments