TLE / ICT Q3 LESSON 2

Cards (6)

  • LCD1602 can display 2 lines of characters in 16 columns. It can display numbers, letters, symbols, ASCII code and so on. As shown in the following is a monochrome LCD1602 display screen:
  • The connection of Arduino UNO board and LCD1602 is shown below. And use a rotary potentiometer to adjust the contrast of LCD1602.
  • DHT11 is a compound temperature & humidity sensor, and the output digital signal has been calibrated inside. DHT11 uses customized single-line communication protocol, so we can use the library to read data more conveniently.
  • Ultrasonic ranging module use the principle that ultrasonic will reflect when it encounters obstacles. Ultrasonic module integrates a transmitter and a receiver. The transmitter is used to convert electrical signals (electrical energy) into sound waves (mechanical energy) and the function of the receiver is opposite.
  • Start counting the time when ultrasonic is transmitted. And when ultrasonic encounters an obstacle, it will reflect back. The counting will end after ultrasonic is received, and the time difference is the total time of ultrasonic from transmitting to receiving. Because the speed of sound in air is constant, and is about v=340m/s. So we can calculate the distance between the module and the obstacle: S=vt/2.
  • Output a high-level pulse in Trig pin lasting for least 10us. Then the module begins to transmit ultrasonic. At the same time, the Echo pin will be pulled up. When the module receives the returned ultrasonic, the Echo pin will be pulled down. The duration of high level in Echo pin is the total time of the ultrasonic from transmitting to receiving, s=vt/2, which is used to operate the HC-SR04 in Arduino.