Getting ready

We will use Raspberry Pi with Windows IoT Core installed on it. You can follow the recipe Install Windows IoT Core on Raspberry Pi from this chapter to install it.

The ultra sonic sensor that we will be using for this practical has the following four pins:

  • VCC (V)
  • GND (G)
  • Echo
  • Trigger

Voltage divider

 

The ECHO output is of 5v. The input pin of Raspberry Pi GPIO is rated at 3.3v. So to convert the 5v to the unprotected 3.3v input pin we use the voltage divider.  

we use a voltage divider circuit using 1kΩ for R1 and a 2kΩ resistor to bring down the voltage to 3.3V.

 

Connecting Raspberry PI with sensors

  • Connect the 5v (P2) to VCC (V) pin of Sensor
  • GND (P6) into negative rail of the breadboard
  • GPIO23 (P16) to Trigger
  • GPIO24 (P18) into rail & link 1kΩ resistor 
  • Connect 1kΩ resistor with a rail connected with 1kΩ
  • Link 2kΩ with Ground  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.240.21