
41
Crowduino UNO-SD/Arduino UNO x1
Crowtail – Base Shield x1
Crowtail – LED Matrix x1
Crowtail – Button x1
Crowtail – 9G Servo x1
Crowtail – Cable x2
USB Cable x1
Required Parts
STEP1:
Plug the Crowtail-Base
Shield onto the Arduino or
Crowduino Board.
Hardware Connection
Lesson 20 – Polite automatic door
Introduction
Have you ever been doing your own thing and suddenly been asked by your parents to open the
door? This is definitely a very annoying thing, and I am determined to change it! So in this course,
we will use Crowtail-LED Matrix, Crowtail-9G Servo and Crowtail-Button to make a simulated
automatic door opening for the door of our house. Of course, this door will be very polite to visitors.
binary number, then we operate 0x1111 and results.value(also need to convert hexadecimal number to
binary number) to get the result. So we use results.value and 0xFFFF operation. When result.value is
0xFFFF (press the original button), resultCode is 0xFFFF. When result.value is not 0xFFFF (press the new
button), resultCode is results. value.
Switch statement is similar to if/else statement, it is a judgment selection code. Its function is to
control the flow of processes. When the quantity expressed by the variable expression matches the
constant in one of the case statements, the statements following the case statement are executed,
and the statements in all subsequent case statements are executed in turn, unless a break; statement
is found out of the switch statement. . If the amount of the constant expression does not match the
constants of all case statements, the statements in the default statement are executed.
Switch case statement: switch(variable){case constantExpression1:statement1;break;
case constantExpression2:statement2:break; default:statement2;break;}
Summary of Contents for Crowtail
Page 48: ......