Elecrow Crowtail User manual

ContentContent
2020 ELECROW All Rights Reserved.
C
Instruction
Modules List
Crowtail
● Crowtail – Base shield
● Crowtail – Module
Lessons
● Lesson 1 – LED control
● Lesson 2 – Vibration detector
● Lesson 3 – Raining reminder
● Lesson 4 – Intelligent corridor light
● Lesson 5 – Breathing light
● Lesson 6 – Calculating light intensity
● Lesson 7 – Get current time
● Lesson 8 – LCD display
● Lesson 9 – Electric watch
● Lesson 10 – Temperature&Humidity detecting system
● Lesson 11 – PWM control
● Lesson 12 – Servo control
● Lesson 13 – Matrix display
● Lesson 14 – Get atmospheric pressure
● Lesson 15 – Digital compass
● Lesson 16 – IR control system
● Lesson 17 – ESP8266 TCP server
● Lesson 18 – Weather reminder
● Lesson 19 – Remote control system
● Lesson 20 – Polite automatic door
● Lesson 21 – Weather station
01
02
03
03
04
05
05
07
08
10
12
14
16
17
20
21
23
26
27
29
31
33
35
37
39
41
43

InstructionInstruction
Welcome to the Crowtail-Advanced kit for Arduino user guide. Do you already have some
knowledge of electronics and some programming skills. How do you continue to strengthen
your thinking, hands-on skills, programming and innovation capabilities? This kit will lead
you to a new stage! This kit contains 21 fun and creative tutorials, from simple to difficult,
leading you to gradually explore and discover modules and the fun of programming and to
constantly train your thinking and programming skills throughout the process to enhance
your ability to innovate and confidence. Through this kit, you will learn about digital signals,
analog signals, digital-to-analog conversion, automatic control systems, remote control
systems, display systems, WIFI, and more. You will find that programming can create more
fun, and continuously improve your ability, and finally let you create your own outstanding
works, and think and solve problems more comprehensively, meticulously, and confidently!
The Crowtail-Advanced kit for Arduino includes 22 electronic modules, each module has its
own feature and functions. Each module has been carefully selected from more than one
hundred Crowtail modules to provide deeper learning and creative guidance for those who
want a deeper understanding of hardware modules and programming knowledge. In the
process, it continuously stimulates the thinking ability and creativity of learners.
For the programming part, we will use the Arduino software to program. Arduino is an
easy-to-use open source electronic prototyping platform. It is one of the most popular open
source hardware in the world, including hardware (various models of Arduino board) and
software (Arduino IDE). This is the best choice for people who want to learn programming
and hardware knowledge! In short, you will explore what is the core of programming and
creation, and help you to have a more comprehensive thinking in the future to create your
own excellent works.
01

02
Modules ListModules List
● Crowtail - Base Shield x1
● Crowtail - Button x1
● Crowtail - LED(Red) x1
● Crowtail - LED(Green) x1
● Crowtail - Vibration Sensor x1
● Crowtail - RTC x1
● Crowtail - Temperature& Humidiy Sensor x1
● Crowtail - IR Receiver x1
● Crowtail - MOSFET x1
● Crowtail - Water Sensor x1
● Crowtail - LED Matrix x1
● Crowtail - 9G Servo x1
● Crowtail - Serial Wifi x1
● Crowtail - Rotary Angle Sensor x1
● Crowtail - 3-Axis Digital Compass x1
● Crowtail - PIR Sensor x1
● Crowtail - I2C LCD x1
● Crowtail - BMP180 Barometer x1
● Crowtail - Luminance Sensor x1
● DC motor x1
● Infrared Remote Control x1
● Battery case x1

03
Crowtail
Crowtail – Base Shield
Welcome to the world of Crowtail! Crowtail is a modulated, ready-to-use toolset, it takes a building
block approach to assemble electronics. It simplifies and condenses the learning process significantly.
In our Crowtail warehouse, there are over 150 Crowtail modules and Crowtail shields!
The Crowtail products are basic-functional modules that consist of a Base Shield and various modules
with standardized connectors, each Crowtail module has its specific functions, such as light sensing
and temperature sensing. It will satisfy all you need for your project!
Crowtail is a series of products that we made to solve the messy jumper wires when connecting
electronic circuits. It consists of a Base Shield and some basic Crowtail modules, which helps you
creating small, simple, and easy-to-assemble circuits.In other words, when you use Crowtail, your
electronic project will not be a messy wiring, instead it will be a simple and easy way to manage
electronic project!
The Crowtail-Base Shield is a standard IO expansion board for the Arduino. It regulates the IOs of
Arduino to the standard Crowtail interface, which can be sorted into 4 kinds: Analog (A), Digital (D),
UART (U) and IIC(I):
11 Digital I/O ports (D2~D12) that have a mark “D”. These ports can be used to read and
control digital Crowtail modules (Crowtail modules that have a mark “D”), such as the Button and
LEDs. Some of the digital I/O ports can also be used as PWM (pulse width modulation) outputs;
6 Analog ports (A0~A5) that have a mark of “A”. Besides the functional of digital, these A
ports can read the analog signal, such as a potentiometer or light sensor;
3 UART ports that have a mark of “U”. These interfaces can be used for UART communication
such as the WIFI module or Bluetooth module;
2 IIC ports that have a mark of “I”. These interfaces are for the IIC Communication, users can
utilize 2 IIC modules at the same time;
1
2
3
4
1
2
3
4

04
Crowtail – Modules
We make more than 100 kinds of electronic modules into Crowtail modules. They include a variety of
sensors, displays, inputs and outputs modules, communication types include I2C, UART, digital or
analog, which aim to provide more options to fully meet your electronic projects. All needs! All
modules can be used by simply connecting them to the Crowtail-Base shield using a Crowtail cable,
which is a huge improvement over the previously troublesome jumper connections.
Besides, there is also a 2x5 female connector of 5V and GND for customer usages. Users can
connect any electronic modules to the Base Shield with jumper wires easily.
Compared with the traditional way of carrying out electronic projects, Crowtail has a huge performance
benefit. All Crowtail has the standard 4 pin connectors. Your creative idea can be realize easier and
faster just by plug and play. In addition, you don’t need to debug the electronic circuits!
Connect Crowtail-Base shield with your Arduino.
Connect Crowtail-Base shield with your Crowduino.

05
The LED is the best choice to help you learn I/O
pins. What you need to do is connecting the LED
module to the Base Shield D ports, then download
the program to the Arduino. Besides the very
basic usage, you can make the LED blink with the
frequency you want, thus the brightness with
PWM. Actually, LED is the most popular used for
human interface. In this kit, we prepared two
colors of the LED, including red and green, so you
can create your own LED circuit!
This momentary button outputs logic HIGH signal
when pressed and logic LOW signal when released.
The logic high and logic low levels of the output can
be detected by the Arduino controller, and then you
can program your Arduino to do what you want after
detecting the two different signals.
For this lesson, we will use button and LED module
to make a button control.
Lesson 1 – LED Control
Lessons
Introduction
Crowduino UNO-SD/Arduino UNO x1
Crowtail – LED(Red) x1
Crowtail – Button x1
Crowtail – Cable x2
USB Cable x1
Required Parts
STEP1: Plug the Crowtail- Base Shield onto the
Arduino or Crowduino Board.
Hardware Connection
STEP2: Connect Crowtail-Button to Crowtail-Base
Shield D4 port and Crowtail-LED to D2 port. The
complete connection is as follows:
Open the P01_LED_Control with Arduino IDE
and upload it.

06
If you press the button, the LED will light on, and it will light off when you release the button. If it
doesn’t, make sure the LED and button are properly connected to the corresponding Crowtail-Base
Shield interface.
What will you see
1. Declare the variables for LED and button and assign values to them.
2. Define whether the module is output or input.
3. Read the value of the button.
4. If the button value read is HIGH(pressed), turn on the LED.
5. If the button value read is LOW(not pressed), turn off the LED.
Code overview
Code usage
A variable is a placeholder for a value that may change in your code.
Variables must be introduced or "declared" before using variables.
Here, we declare two variables that define which ports of the base shield
the module should connect to and a variable called ‘buttonState’ of type
int(integer) and assign it a value of 0 to record the status of the button.
Don't forget that variable names are case-sensitive!
Integer Variables
Input or Output
Before using one of the digital pins, you need to tell Arduino
whether it is an input (INPUT) or an output (OUTPUT).
We use a built-in "function" called pinMode() to make the pin
corresponding to the led a digital output.
Digital Input
We use the digitalRead() function to read the value on a digital pin.
Check to see if an input pin is reading HIGH(5V) or LOW(0V).
Returns TRUE(1) or FALSE(0) depending on the reading.
If/else Statements
The if / else statement allows your code to make corresponding choices
for different results, running a set of code when the logical statement in
parentheses is true, and another set of code when the logical statement
is false. For example, if the button is pressed, the LED will light on
and when the button is released, the LED will light off.
This is another logical operator. The "equal" symbol (==) can be confusing.
The two equal signs are equal to ask: “The two values are equal
to each other? “On the other hand, if you want to compare two values,
don't forget to add a second equal sign, because if it's just a "=",
it's an assignment method.
Is equal to
When you're using a pin as an OUTPUT, you can command it to be
HIGH (output 5 volts) or LOW (output 0 volts). When you set it to HIGH,
for digital output modules, it means work. When you set it to LOW,
for digital output modules, it means don't work. For example, the led will
light on(work) when it is set to HIGH and it will light off(don't work)
when it is set to LOW.
Digital Output

07
Lesson 2 – Vibration detector
Introduction
Crowduino UNO-SD/Arduino UNO x1
Crowtail – Vibration Sensor x1
Crowtail – LED x1
Crowtail – Base shield x1
Crowtail – Cable x2
USB Cable x1
Required Parts
STEP1: Plug the Crowtail-Base Shield
onto the Arduino or Crowduino Board.
Hardware Connection
STEP2: Connect Crowtail-Vibration
sensor to Crowtail-Base Shield D4 port
and Crowtail-LED to D2 port. The
complete connection is as follows:
Open the P02_Vibration_Detector with
Arduino IDE and upload it.
The Crowtail-Vibration Sensor is a high sensitivity non-directional
vibration sensor. When the module is stable, the circuit is turned
on and the output is low. When the movement or vibration occurs,
the circuit will be briefly disconnected and output high. At the
same time, you can also adjust the sensitivity according to your
own needs. It is widely used to report the theft alarm, intelligent
car, earthquake alarm, motorcycle alarm, etc.
In this lesson, we will use vibration sensor and LED to make a
vibration detector that you can use to detect earthquakes and
theft.
Put the Vibration sensor on the table or hold it in your hand and shake it. You will see the LED light
on as you shake. When you stop shaking, the LED will turn off.
What will you see
1. Declare the variables for vibration sensor and LED and assign values to them.
Code overview

08
2. Define whether the module is output or input.
3. Read the value of the vibration sensor.
4. If the value of the vibration sensor is LOW(shaked), turn on the LED.
5. If the value of the vibration sensor is HIGH(not shaked), turn off the LED.
Input or Output: pinMode(vibrationPin,INPUT); pinMode(ledPin,OUTPUT);
Before using one of the digital pins, you need to tell Arduino whether it is an input (INPUT) or an
output (OUTPUT). We use a built-in "function" called pinMode() to make the pin corresponding to the
led a digital output and the vibration sensor module as a input.
If/else Statements: if(logic statement) {code to be run if the logic statement is true}
else {code to be run if the logic statement is false }
The if / else statement allows your code to make corresponding choices for different results, running
a set of code when the logical statement in parentheses is true, and another set of code when the
logical statement is false. For here, if the vibration sensor is vibrating, the LED will light on and when
the vibration sensor is not vibrating, the LED will light off.
Digital Output: digitalWrite(ledPin, HIGH); digitalWrite(ledPin, LOW);
When you're using a pin as an OUTPUT, you can command it to be HIGH (output 5 volts) or LOW
(output 0 volts).
A variable is a placeholder for a value that may change in your code. Variables must be introduced or
"declared" before using variables. Here, we declare two variables that define which ports of the base
shield the module should connect to and a variable called “vibrationState” of type int(integer) and
assign it a value of 0 to record the status of the vibration sensor. Don't forget that variable names are
case-sensitive!
Integer Variables: int ledPin = 2; int vibrationPin = 4; int vibrationState=0;
Code usage
Lesson 3 – Raining reminder
Introduction
The water sensor detects water by having a series of exposed traces connected to ground and
interlaced between the grounded traces are the sensor traces. The sensor traces have a weak
pull-up resistor of 1 MΩ. The resistor will pull the sensor trace value high until a drop of water shorts
the sensor trace to the grounded trace. With the digital I/O pins of Crowduino/Arduino, you can
detect the amount of water induced contact between the grounded and sensor traces.

09
Crowduino UNO-SD/Arduino UNO x1
Crowtail – Base Shield x1
Crowtail – LED(Red) x1
Crowtail – Water Sensor x1
Crowtail – Cable x2
USB Cable x1
Required Parts
STEP1: Plug the Crowtail-Base Shield
onto the Arduino or Crowduino Board.
Hardware Connection
STEP2: Connect Crowtail-LED to
Crowtail-Base shield’s D4 and
Crowtail-Water sensor to D5 port.
The complete connection is as
follows:
Open the P03_Raining_Reminder
with Arduino IDE and upload it.
Do you have the experience of getting clothes wet by the rain? You
won't experience such a disaster again. In this course, we will use
water sensor and make a rain reminder, so that it can immediately
remind you to collect clothes when it starts to rain!
When you put the water drop on the sensor traces of the water sensor, the led will light on. When you
dry the water, the led will light off.
What will you see
1. Declare the variables for water sensor and LED and assign values to them.
2. Define whether the module is output or input.
3. Read the value of the water sensor.
4. If the value of the water sensor is LOW(water detected), led light on.
5. If the value of the water sensor is HIGH(no water detected), led light off.
Code overview
First, we declare two variables named ledPin and waterPin and assign them 4 and 5 respectively.
Integer Variables: int ledPin = 4; int waterPin = 5; int waterState = 0;
Code usage

10
Lesson 4 – Intelligent corridor light
Introduction
Crowduino UNO-SD/Arduino UNO x1
Crowtail – Base Shield x1
Crowtail – PIR Motion Sensor x1
Crowtail – LED(Green) x1
Crowtail – Cable x2
USB Cable x1
Required Parts
Crowtail - PIR Motion Sensor(Passive Infrared Sensor)
can detect infrared signals caused by motion. If the PIR
sensor notices the infrared energy, the motion detector is
triggered and the sensor outputs HIGH on its SIG pin. The
detecting range can be adjusted by a potentiometer
soldered on its circuit board, the max detecting range of it
up to 6 meters.
How about use PIR motion sensor and LED to make a
smart corridor light?
This means we can now use D4 and D5 ports for LEDs and water sensors.Then, declare a variable
named waterState to store the read water sensor value.
In the setup() function, we initialize the water sensor as an input to detect if there is water on the
water sensor and initialize the led to output to show you the result of the water sensor.
Input or Output: pinMode(ledPin, OUTPUT); pinMode(waterPin, INPUT);
Here, we use the if/else statement to execute the program that needs to be executed when the water
is detected or the water is not detected. If the water is detected, turn led on, otherwise, turn led off.
If/else Statements: if(logic statement) {code to be run if the logic statement is true} else
{code to be run if the logic statement is false }
Different from touch sensor and button, when water is detected, the state of the water sensor is
LOW, and the state of water not detected is HIGH. It means that led will light on when water sensor
value is LOW to remind us it is raining and light off when water sensor value is HIGH.
Is equal to: buttonState == HIGH

11
STEP1: Plug the Crowtail-Base Shield onto the Arduino or Crowduino Board.
Hardware Connection
STEP2: Connect Crowtail-LED to
Crowtail-Base shield’s D4 and Crowtail-PIR
motion sensor to D5 port. The complete
connection is as follows:
Open the P04_Intelligent_corridor_light with
Arduino IDE and upload it.
When you wave or walk within the range of the PIR motion sensor, the LED will turn on for 5 seconds.
If there is no movement of the object within the sensing range of the PIR motion sensor, the LED will
not light up.
What will you see
1. Macro definitions of PIR motion sensor pin and LED pin.
2. Define whether the module is output or input.
3. Create functions to turn LED on and turn LED off separately.
4. Create a boolean type object motion detection function that returns true when the object
moves, otherwise return false.
5. Determine the value returned by the object motion detection function in the loop() function to call
turnOnLED() and turnOffLED functions to turn the LED on or off.
6. Repeat loop() function.
Code overview
The prototype of the macro definition constant is #define [MacroName] [MacroValue]. What is the
difference between a macro definition constant and a variable? First, Macro-defined constants
cannot be changed while the program is running. Variables can be changed. Second, the variable
can be used inside the function defined by it, but the life cycle end when the function ends. The
macro defines the constant until the entire program runs, the life cycle ends.
Macro definition: #define LED 4 #define PIR_MOTION_SENSOR 5
Objects created with boolean types (including variables and methods) have only two values: true and
Boolean type: boolean isPeopleDetected(){}
Code usage

12
STEP1: Plug the Crowtail-Base Shield
onto the Arduino or Crowduino Board.
Hardware Connection
STEP2: Connect Crowtail-LED to Crowtail-Base
shield’s D3 and Crowtail-Rotary angle sensor to
A0 port. The complete connection is as follows:
Open the P05_Breathing_Light with Arduino
IDE and upload it.
false. By judging the returned value, we can easily execute the corresponding code according to the
difference of values.
Modular programming allows us to better manage and call our code, such as a module code problem,
we only need to modify the code inside the module, without modifying the code of the entire program.
In addition, modularizing the code allows us to implement functions with simpler logic.
Modular programming: void turnOnLED(){} void turnOffLED(){} boolean
isPeopleDetected(){}
Lesson 5 – Breathing light
Introduction
Crowduino UNO-SD/Arduino UNO x1
Crowtail – Base Shield x1
Crowtail – Rotary Angle Sensor x1
Crowtail – LED(Green) x1
Crowtail – Cable x2
USB Cable x1
Required Parts
This rotary angle sensor may also be known as potentiometer twig
that produces analog output between 0 and VCC (5V DC with
Crowduino) on its SIG pin. The angular range is 300 degrees with a
linear change in value. The resistance value is 10k ohms, perfect for
Arduino use. Some applications like smart light control, volume
control, only you can not think of things, no impossible things! For
this lesson, we will use rotary angle sensor and led to make a
breathing light, you can control the brightness of led like human
breathing!

13
When turning the knob on the rotary angle sensor, the brightness of the led will change. When you
turn to the limit in one direction, if the led is off, then if you turn to the limit in the other direction, the
brightness of the led is the maximum.
What will you see
1. Declare the pin of led and rotary angle sensor. Declare some constants to be used.
2. Initialize the serial monitor and initialize the rotary angle sensor to input and led to output.
3. Use getDegree() function to get the degrees of rotary angle sensor.
4. Print the degrees of rotary angle sensor and map the degrees as led brightness.
Code overview
Remap numbers from one range to another. That is, if the value is "fromLow", the mapped value will
be "toLow". If the value is "fromHigh", then the mapped value will be "toHigh". When "value" is from
other values from fromLow to fromHigh, it is also mapped to between toLow and toHigh in equal
proportions. So here we map the value of pmeterValue (between 0 and 1023) to gapValue (between
0 and 255). For example, if the value of pmeter is 200, after using the map() function, it will become
50 and be assigned to the variable: gapValue.
Arduino math function map():int gapValue = map(value, fromLow, fromHigh, toLow,
toHigh)
For analog pin, we use the analogWrite() function to write the value on an analog pin. Similar to
digitalWrite() function, it takes two parameters, but the second parameter is no longer only two high
and low states, it can be any number you want to write, and each value you write will give it the
corresponding state. But in fact, there is a premise, that is, the hardware must be able to divide so
many levels of effect. For example, most of the led are 256.
Analog Output: analogWrite(LED,brightness);
Serial print has two printing methods, one is Serial.print(), the other is Serial.println(). The difference
between them is that after “print” method prints the content, the information that needs to be printed
can continue to be displayed in this line, and println method will open a new line after printing the
content, that is, the information that needs to be printed can’t continue to be displayed in this line.
Serial.print() is used to print the string or variable that you want to output, If you want to output a
string, you need to wrap the string with " ". If you want to output the variable, just write the variable
name in parentheses.
Serial print: Serial.println("The angle between the mark and the starting position:");
Serial.println(degrees);
Code usage

14
Crowduino UNO-SD/Arduino UNO x1
Crowtail – Base Shield x1
Crowtail – Luminance Sensor x1
Crowtail – Cable x1
USB Cable x1
Required Parts
STEP1: Plug the Crowtail-Base Shield
onto the Arduino or Crowduino Board.
Hardware Connection
STEP2: Connect Crowtail-Luminance Sensor to
Crowtail-Base shield’s A0 port. The complete
connection is as follows:
Open the P06_Calculating_Light_Intensity
with Arduino IDE and upload it.
Lesson 6 – Calculating light intensity
Introduction
Crowtail - Luminance Sensor using APDS-9002 as lumens Sensor,
provide the linear transform lumen intensity for the output voltage
levels. And APDS-9002 spectrum and human eye is extremely close
to. It is very suitable for the field of AI applications.
In this lesson, we will use Crowtail-Luminance Sensor to obtain the
light intensity and print it in serial monitor.
We use the analogRead() function to read the value on an analog pin. analogRead() takes one
parameter, the analog pin you want to use, A0 in this case, and returns a number between 0 (0 volts)
and 1023 (5 volts), which is then assigned to the variable sensor_value.
Analog Input: int sensor_value = analogRead(ROTARY_ANGLE_SENSOR);
Unlike void function (), an integer function will return a number after running, and this number is an
integer number. In short, this integer function() will return an integer number each time it is run.
Integer function: int getDegree(){}

15
Open the serial monitor, you will see the monitor is printing the voltage and luminance. When you
block the luminance sensor with your hand, you will see that the voltage and luminance detected by
the luminance sensor is significantly reduced.
What will you see
1. Create two arrays for use in the FmultiMap() function.
2. Initialize the serial monitor in the setup() function and set its baud rate to 9600.
3. Use the readAPDS9002Vout() function to get the voltage read by the luminance sensor.
4. Use the FmultiMap() function to get the real measurement point and more accurate data from the
sensor.
5. Use the readLuminance() function to get the luminance of the luminance sensor.
6. In the loop() function, print the voltage and luminance of the luminance sensor and then repeat.
Code overview
Its prototype is: Array name[].Arrays are a form of programming that organizes a set of elements of
the same type in an unordered form for ease of processing. Here we create two arrays and they will
be used in FmultiMap() function. float means that the array we created is floating point, not integer.
Pay attention to VoutArray[], it will act _in array in FmultiMap() function, so it should have increasing
values.
Array: float VoutArray[] = {} float LuxArray[] = {}
Unlike void function (), a float function will return a number after running, and this number is a floating
point number. In short, this float function () will return a floating point number each time it is run.
“analogpin” is the parameter of the function, it will be passed to the function, "uint8_t" is an unsigned
character that declares that each element in the array occupies 8 bits of storage.
Float function(): float readAPDS9002Vout(uint8_t analogpin){}
The prototype of the function is: float FmultiMap (float val, float * _in, float * _out, uint8_t
size).FmultiMap () is a function can be applied to the detection of sensors that do not change
linearly. Since I only need floating point numbers, the function returns a floating point number.
The parameters are the int val which comes from the analogRead() function, an array of input
values and an array of corresponding output values and a parameter to indicate the size of the
array's used. NOTE: the input array must be a monotone increasing array of values. You can see
more uses of this function here “https://playground.arduino.cc/Main/MultiMap/”.
FmultiMap function(): float FmultiMap(){}
Code usage

16
Crowduino UNO-SD/Arduino UNO x1
Crowtail – Base Shield x1
Crowtail – RTC x1
Crowtail – Cable x1
USB Cable x1
Required Parts
Open the downloaded folder “Crowtail-
Advanced kit for Arduino demo code”,
navigate to the folder lib-> RTC, and add
RTC to the Arduino library. Open the
P7_Get_Current_Time with Arduino IDE and
upload it.
STEP2: Connect Crowtail-RTC to Crowtail-Base
shield’s I port. The complete connection is as
follows:
STEP1: Plug the Crowtail-Base Shield onto the Arduino or Crowduino Board.
Hardware Connection
Lesson 7 – Get current time
Introduction
This tiny RTC module is based on the clock chip DS1307
which communicates with microcontrollers with I2C
protocol. The clock/calendar provides seconds, minutes,
hours, day, date, month and year information. The end of
the month date is automatically adjusted for months with
fewer than 31 days, including corrections for leap year.
Besides, this module is really low power consumption, it
can serve you more than a month with a CR1220 battery.
If you want to make your own electronic watch, you need
to generate the correct time, so in this lesson, let's take a
look at how to use RTC to get the time.
Open the serial monitor of the Arduino IDE and you will see that the monitor is printing out your local
time.
What will you see
1. Import I2C library and RTC standard library.
Code overview

17
Lesson 8 – LCD display
Introduction
Crowtail-I2C LCD includes LCD1602 and MCP23008 modules. Unlike ordinary LCDs, which require
2. Initialize the serial port to set the baud rate to 9600, initialize the Wire library and the real time clock.
3. Determine if the RTC is running and initialize the time in the chip with the current date and time.
4. Get current date and time information saved by RTC.
5. Print the preliminary year, month, day, hour, minute and second information in the decimal output.
Arduino communicates with the real-time clock through the I2C bus. In order to use this bus, the
compiler must be notified to join the library. In addition, we also need to import the RTC library to get
the time.
Import library: #include <Wire.h> #include "RTClib.h"
“now()” is another function of RTC_DS1307. It returns a DateTime instance and saves the current
date and time information. After running this statement, we can know the current month through
now.month() and get the current minutes through now.minute(). And then years, days, hours and
seconds.
RTC_DS1307's now() function: DateTime now = RTC.now();
Serial.print() is used to print the string or variable that you want to output, it receives two parameters,
the first is the transmitted value, the second is the format of the transfer, DEC is the decimal, and
OCT is the octal, and HEX is the hexadecimal. If you want to output a string, you need to wrap the
string with " ". If you want to output the variable, just write the variable name in parentheses.
Serial print: Serial.print(now.year(), DEC); Serial.print('/');
The meaning of this statement is to create an instance, RTC_DS1307 is a class in RTClib.h, RTC is to
create an instance of RTC_DS1307 class, this instance includes some related functions and variables.
Instance: RTC_DS1307 RTC;
Initialize the serial monitor and set the baud rate to 9600 to initialize the I2C bus and real-time clock.
Initialization: Serial.begin(9600); Wire.begin(); RTC.begin();
Initialize the RTC chip with the current date and time.
Initialize the RTC chip: RTC.adjust(DateTime(__DATE__, __TIME__))
Code usage

18
Crowduino UNO-SD/Arduino UNO x1
Crowtail – Base Shield x1
Crowtail – I2C LCD x1
Crowtail – Cable x1
USB Cable x1
Required Parts
STEP2: Connect Crowtail-I2C LCD to Crowtail-Base shield’s I port. The complete connection is as
follows:
Open the downloaded folder “Crowtail-Advanced kit for Arduino demo code”, navigate to the folder
lib-> LiquidCrystal, and add LiquidCrystal to the Arduino library. Open the P08_LCD_Display with
Arduino IDE and upload it.
STEP1: Plug the Crowtail-Base Shield onto the Arduino or Crowduino Board.
Hardware Connection
many pins, the Crowtail-I2C LCD only needs 4 pins to
control everything. It's very popular where display is
needed.
Here, we will use Crowtail-I2C LCD to display our first
greeting.
You will first see the LCD light up and display the greeting "hello world" on the first line. After a
second, the second line of the LCD will display "good bye" and finally the LCD will go out.
What will you see
Table of contents
Popular Control Unit manuals by other brands

SPX FLOW
SPX FLOW Power Team A operating instructions

Contec
Contec CONPROSYS Series manual

Follett
Follett Ice Manager Operation and service manual

COMEM
COMEM MB 103 instruction manual

3Com
3Com CoreBuilder 9000 ATM Interface Module quick start guide

Continental Hydraulics
Continental Hydraulics A Design Series Service manual