User manual
Export 03.11.2017 Copyright by Joy-IT 8
3
1.2 Code-Example
You can nd a Code-Example next, which is demonstrang the sensors funconality.
Please completely transfer the code to your Raspberry Pi.
Joy-IT® Ultrasonic Disance Sensor
Distance Sensor Voltage Translator
VCC
Trig B1
Echo B2
GND GND
Voltage Translator Raspberry Pi
5.5V 5V (Pin 3)
3.6V 3.3V (Pin 1)
A1 GPIO17 (Pin 11)
A2 GPIO27 (Pin 13)
GND GND (Pin 6)
Distance Sensor Raspberry Pi
VCC 5V (Pin 2)