The XKC-007Y's terminal board is a 4-pin single-row pin package, power pin VCC, control end trig, receiver echo, ground GND, pin definition as shown in Table 3-4. XKC-007Y and microcontroller using I/O port communication, when the microcontroller to the control end of the ultrasonic module trig to send a high-level signal, the control panel automatically produces 8 40KHz square wave signal and return, while automatically detecting whether there is a signal return If there is a signal return, the PC8 port from high level to STM32F103 is sent through the receiver echo, assuming that the duration of the level on the PC8 pin is t, the distance of ultrasonic range is L, and ultrasonic distance measurement can be calculated by publicizing 3-1.
正在翻译中..