File Exchange

image thumbnail

Mapping Your Surroundings Using MATLAB and Arduino

version 1.0.0.1 (20.6 KB) by Dan Doherty
Learn how to use MATLAB and Arduino to map your surroundings

47 Downloads

Updated 13 Sep 2016

View License

Learn how to use MATLAB and Arduino to map your surroundings. By rotating an ultrasonic sensor on a servo motor, MATLAB is able to display the location of any obstacle in a given environment.
Hardware Used:
Arduino Uno
Servo Motor
HC-SR04 Ultrasonic Sensor
USB A to B Cable
https://www.youtube.com/watch?v=iaF81W-l6Xg

Cite As

Dan Doherty (2019). Mapping Your Surroundings Using MATLAB and Arduino (https://www.mathworks.com/matlabcentral/fileexchange/58434-mapping-your-surroundings-using-matlab-and-arduino), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (12)

Ali Khan

Can we change the Digital pin defined in Matlab script to any other pin of Arduino or it is not possible with the current libraries?

can the servo motor runs continuously???

Wallis Wong

can i use this in arduino mega 2560???

WASSWA PAUL

The Arduino source 'Ultrasonic/Ultrasonic.h' for libraries 'JRodrigoTech/HCSR04' cannot be found.
Install the 3P library source first and try again.

What am I supposed to do in order to make it work?

Mo Zohrabi

Where can i find the code?

Help me!Error using HCSR04Example (line 25)
Cannot program board Uno (COM4). Please make sure the board is supported and the port and board
type are correct.

Thak you very much that is a great project. I'm having the following error in the code: Cannot program board Uno (COM3). Please make sure the board is supported and the port and board type are correct.' I'll appreciate any help.

Greg Drayer

Great job guys putting this together. Looking forward to see the rest of the projects. Is there a tag that we all can filter through to look at these new examples?

Updates

1.0.0.1

Adding the YouTube link to the description

1.0.0.1

Updated license

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Legacy HC-SR04 Add-On Library for Arduino

Communities