In fact, when the microcontroller start or reset, the default for all input pins I/O. That is, if the beard is connected to the microcontroller I/O pin, the pin will automatically as the input. As input, if the voltage on the I/O pin is 5V, the corresponding bits in the corresponding I/O register are stored 1; if the voltage is 0V, the storage is 0. The proper circuit can be achieved by a beard to achieve the effect: when the beard is not met, the voltage on the I/O pin is 5V; when the beard is touched, the I/O pin is 0. Then, the microcontroller can read the corresponding data, analysis, processing,Control the movement of the car. I/O pin P1.4 or P1.7 on the is 5V. I/O pin P1.4 or P1.7 on the is 0V, when the touch of an object is touched.
正在翻譯中..
![](//zhcntimg.ilovetranslation.com/pic/loading_3.gif?v=b9814dd30c1d7c59_8619)