39
Crowduino UNO-SD/Arduino UNO x1
Crowtail – Base Shield x1
Crowtail – IR Receiver x1
Crowtail – MOSFET x1
Crowtail – LED(Green) x1
Crowtail – 9G Servo x1
Crowtail – Cable x3
Infrared Remote Control x1
Battery Case x1
DC Motor x1
USB Cable x1
Required Parts
STEP2:
Connect Crowtail-9G Servo, Crowtail-MOSFET, Crowtail-LED and Crowtail-IR Receiver to
Crowtail-Base shield’s D2, D3, D4 and D5 port. The complete connection is as follows:
STEP1:
Plug the Crowtail-Base Shield onto the Arduino or Crowduino Board.
Hardware Connection
Lesson 19 – Remote control system
Introduction
Have you ever been troubled by the need to turn off the fans yourself? Have you ever been troubled
by the need to open the door yourself? Have you ever bothered to get up at night and turn on the
light in the toilet? You must have thought that if you could use a simple remote control to control all of
them!
Let's get started, we will use IR receiver, Infrared remote control, DC motor, Servo, MOSFET, LED to
make a remote control system.
The “pin” represents the pin of the DHT sensor connected to the Arduino. The “type” represents the
type of the DHT sensor. Our Crowtail–Temperature & Humidity Sensor uses DHT11. The “count” is
an optional parameter. “LiquidCrystal lcd(0)” is to create an instance of LCD, which is connected to
0(I2C address).
Before to use serial monitor, dht and lcd, we need to initialize them. Here, we initialize the baud rate of
serial monitor is 9600 and we set up the LCD’s number of rows and columns.
Initialize : Serial.begin(9600); dht.begin(); lcd.begin(16, 2);
The role of is isnan() to determine whether the number in the brackets is a number. Isnan() is a short
of “is not a number”, if the number in the parentheses is not a number, it returns TRUE, otherwise it
returns FALSE.
Isnan(): if (isnan(t) || isnan(h)) {}
Содержание Crowtail
Страница 48: ......