Distance Sensor & Sound Sensitive Sensor

Introduction: Distance Sensor & Sound Sensitive Sensor

If you ever need it

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Gather the Required Components

  • Sharp 2YOA21
  • I2C(Raspberry Pi 3 & Arduino Uno)
  • 7" Raspberry Pi Touch Screen
  • Sound sensitive Sensor
  • 1 LED Light
  • Resistor (10K)
  • +- 25 cables
  • 2 Ethernet cables
  • 1 Router

Software: required,

Arduino IDE

Windows 10

Visual Studio Community 2015 update 3

Universal Windows Platform installed (option comes together with the Visual Studio installer)

Windows 10 IoT Core Dashboard

For information on how to set up your Pi to be ready visit


Step 2: Connecting the Raspberry Pi to the 7" Touch Screen

Watch the video for the steps to connect your Raspberry Pi to your display


Step 3: Fritzing Diagram

Connect your circuit in the following order

Arduino Uno to Sharp 2YOA21 Sensor

Analog Pin 0 -> Vout

5 -> VCC

Ground -> GND

Arduino Uno to RGB LED

Digital Pin 12 -> G(Green)
Digital Pin 13 -> R(Red)

Ground -> GROUND

Arduino Uno to Sound Sensitivity Sensor

Analog Pin 3 -> AO


5V -> VCC

Digital Pin 2 -> DO

Arduino Uno to Red LED

Digital Pin 7 -> (-) Cathode

5V -> 10K Resistor -> (+)Anode

Step 4: Programming the Arduino

Attached along is the Arduino code that I have done up,

Within it includes the code for the distance sensor, the sound sensitive sensor and the how to send the data to Pi

Step 5: Programming the Pi to Receive the Data From the Arduino & Display

Attached along are codes that allows you to receive data from the Arduino and display on the 7" touch screen

Do remember to install the reference WinRtXamlToolKit.Controls.Gauge.UWP from nuget otherwise your code wouldn't work!

Step 6: Finish!

Plug the cables in the correct places, do the code accordingly, and the device should perform exactly how you want it to!

Step 7:

Be the First to Share


    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge



    3 years ago

    Welcome to instructables! Thanks for sharing :)