Authorized Online Retailers:


1 Overview

In this lesson, we’ll learn how to use HC-SR04 Ultrasonic sensor to measure distances and send data to remote browser.

2 Hardware Preparation

Arduino UNO 1
Ethernet Shield W5100 1
USB Cable 1
HC-SR04 Ultrasonic sensor module 1
Jumper wires Several
Breadboard(Optional) 1

3 Hardware connection

Connect the HC-SR04 with UNO as following diagram:

4)Software Installation

Download the sketch file from

unzip the file and double click the w5100-lesson10.ino file, load the sketch into Arduino IDE.

Open your Serial Monitor, you can see your router will assign an IP address to your Arduino   as following:

In above example, is the IP address of my Arduino.
Now put an obstacle in front of the sensor and  use another computer or your cell phone’s  browser to visit url :
Your browser will show following result which tells you the distance between sensor and obstacle: