CH2 G12G WB

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

Chapter 2

Microcontrollers II
Section 1 : Algorithm description techniques

Aim

This section will introduce you to computational thinking and problem-solving principles. Writing
algorithms is one of the important steps of computational thinking. In grade 11, you learned
how to use flowcharts to represent an algorithm. This section introduces another algorithm
description technique called pseudocode. You will learn how to construct pseudocode to
represent an algorithm and plan the solutions to your problem to avoid any mistakes when
writing code.

Learning outcomes

• Recap on the different types of algorithm descriptions.


• Formulate pseudocodes to correctly apply basic programming concepts.

Prior knowledge
• Arduino code structure
• Using flowcharts

My STREAM focus

Section 1
Chapter 2

25
Copyright © Ministry of Education – United Arab Emirates
Key vocabulary

WORD MEANING PICTURE

process of finding solutions to difficult or


problem - solving complex problems by performing a sequence
of actions

computational
thought process for problem solving
thinking

process you need to follow when solving a


algorithm
problem

visual representation of the sequence of the


flowchart
process

method used to communicate design problems


pseudocode using statements; these statements use words
very similar to everyday English
Section 1
Chapter 2

26
Copyright © Ministry of Education – United Arab Emirates
Activity 2.1.1
a. Match the steps of the “Snake and Ladder” game algorithm in Column A with the
symbols of a flowchart in Column B.

Column A Column B

Indicate that the game has


ended

Printing a message that one of


the players has won the game

Indicate the beginning of the


game

Check if the player’s coin has


landed on a snake or bottom
of the ladder or last block of
the game

Indicate the sequence of the


game

Rolling the dice and moving


the player’s coin to the top
of the ladder or the tail of the
snake

b. Draw the flowchart for the “Snake and Ladder” game algorithm given above.
Section 1
Chapter 2

27
Copyright © Ministry of Education – United Arab Emirates
Activity 2.1.2
Study the algorithm given below, then answer the following questions.
Step 1: Start
Step 2: Accept the length of the two line segments as L1 and L2
Step 3: If L1 and L2 are equal, then display ‘Line Segments are equal’
Step 4: If L1 and L2 are not equal, then display ‘Line Segments are not equal’
Step 5: Stop

Draw the flowchart for the given Write the Arduino code for the given
algorithm. algorithm.
Section 1
Chapter 2

28
Copyright © Ministry of Education – United Arab Emirates
Activity 2.1.3
Construct pseudocode to represent the following algorithm.
Step 1: Create a variable called sum and set it equal to zero
Step 2: Look at each of the elements in the list
Step 3: Add the element to the sum
Step 4: Continue until you reach the end of the list
Step 5: return the sum

Pseudocode

Section 1
Chapter 2

29
Copyright © Ministry of Education – United Arab Emirates
Activity 2.1.4
The following flowchart represents an algorithm used to control temperature. First,
construct pseudocode for the algorithm, then write the Arduino code to solve the
problem.

Pesudocode Arduino Code


Section 1
Chapter 2

30
Copyright © Ministry of Education – United Arab Emirates
Activity 2.1.5
Write the Arduino code for the following pseudocode.
BEGIN
READ a,b
IF (a>b) THEN
DISPLAY a is greater
ELSE
DISPLAY b is greater
END IF
END

Arduino code

Section 1
Chapter 2

31
Copyright © Ministry of Education – United Arab Emirates
Key skills
I don’t I’m an
Learning outcome (Please tick the box to show your understanding I understand.
understand. expert.
of the skills below).

Recap on the different


I can compare between flowcharts
types of algorithm
and pseudocodes.
descriptions.

Formulate pseudocodes I use pseudocodes to describe


to correctly apply basic a process, system, or computer
programming concepts. algorithm.

Teacher’s comment:
Section 1
Chapter 2

32
Copyright © Ministry of Education – United Arab Emirates
Section 2 : Control structures

Aim

In grade 11, you were introduced to the sequence and selection (if/if-else) control structures.
This section will introduce you to the third type of control structures, the iteration (loop) control
structures, namely for and while repetition statements. This section explains when to use the
iteration control structures, how they work, and the Arduino syntax to implement them.

Learning outcomes

• Apply basic control structures when writing a computer program.

Prior knowledge
• Arduino code structure
• Algorithm description techniques

My STREAM focus

Key vocabulary

WORD MEANING PICTURE


Section 2

repeats the process/set of instructions as long


repitition
a condition remains true
Chapter 2

33
Copyright © Ministry of Education – United Arab Emirates
Activity 2.2.1
Draw the flowchart of an algorithm that prints the factorial of an integer number selected
by the user. Then, write the Arduino code to solve the problem using while-loop.

Hint: The factorial of a given integer is the multiplication of all positive integers less than
or equal to the given integer. For example, the factorial of 4 is 4 × 3 × 2 × 1 .

Flowchart Arduino Code


Section 2
Chapter 2

34
Copyright © Ministry of Education – United Arab Emirates
Activity 2.2.2
Construct the psuedocode for an algorithm that prints the sum of all odd numbers
between 1 to 50. Then, write the Arduino code to solve the problem using while-loop.

Hint:
• Integer that are divisible by 2, are even numbers.
• Integer that are not divisible by 2, are odd numbers.

Psuedocode Arduino Code

Section 2
Chapter 2

35
Copyright © Ministry of Education – United Arab Emirates
Activity 2.2.3
Draw the flowchart of an algorithm that prints the multiplication table of a number. Then,
write the Arduino code to solve the problem using for-loop. The multiplication table
should be printed in the following format.
2X1=2
2X2=4
2X3=6
2X4=8
2 X 5 = 10
2 X 6 = 12
2 X 7 = 14
2 X 8 = 16
2 X 9 = 18
2 X 10 = 20

Flowchart Arduino Code


Section 2
Chapter 2

36
Copyright © Ministry of Education – United Arab Emirates
Activity 2.2.4
A leap year occurs once every four years. A year is a leap year if the following conditions
are satisfied:
• year is multiple of 400.
• year is multiple of 4 and not multiple of 100.

Construct the pesudocode for an algorithm that prints all leap years between two given
years selected by the user. Then, write the Arduino code to solve the problem.

Hint: You have to use relational and boolean operators to check whether a year is leap
year or not.

Psuedocode Arduino Code

Section 2
Chapter 2

37
Copyright © Ministry of Education – United Arab Emirates
Student reflection

List three things you have learned and two things you have enjoyed.
Three things I have learned:
1-
2-
3-

Two things I have enjoyed:


1-
2-

Key skills
I don’t I’m an
Learning outcome (Please tick the box to show your understanding I understand.
understand. expert.
of the skills below).

I can apply while-loop repetition


statements in programming.
Apply basic control
structures when writing a
computer program.
I can apply for-loop repetition in
programming.

Teacher’s comment:
Section 2
Chapter 2

38
Copyright © Ministry of Education – United Arab Emirates
Section 3: Analogue signals

Aim

In grade 11, you learned how to read and generate digital signals. In this section, you will learn
the difference between analogue and digital signals. You will learn how to read the analogue
signals on Arduino using analogue input statements. You will also learn how to use pulse width
modulation (PWM) to generate analogue signals for simple electrical devices.

Learning outcomes

• Differentiate between digital and analogue signals.


• Read and generate analogue signals with a microcontroller-based board.

Prior knowledge
• Identify the fundamentals of Arduino programming.
• Use breadboards for building electronic circuits.
• Identify basic electronic components.
• Read and generate digital signals in Arduino.
• Create simple functions in Arduino.

My STREAM focus

Section 3
Chapter 2

39
Copyright © Ministry of Education – United Arab Emirates
Key vocabulary

WORD MEANING PICTURE

a continuous signal that has infinite numbers to


analogue signal
represent it

PWM
(Pulse Width a technique for generating an analogue signal
Modulation) using digital means

the time needed for one cycle of a signal to be


time period (T)
completed

the number of complete cycles per second;


frequency (f)
measured in the unit of hertz (Hz)

the ratio between the on time divided by the


duty cycle(D)
time period
Section 3
Chapter 2

40
Copyright © Ministry of Education – United Arab Emirates
Activity 2.3.1
Write a code to control the brightness of an LED. The brightness of the LED should start
from zero, then gradually increase by 60% after every second until it reaches the maximum
brightness.

Section 3
Chapter 2

41
Copyright © Ministry of Education – United Arab Emirates
Activity 2.3.2
Run the given Arduino code, the modify it to gradually dim the brightness of the LED,
from maximum brightness to zero. Each iteration, the brightness should decrease by a
decrement of 10.
Arduino code:
int LED = 9 ;
void setup() {
// put your setup code here to run once:
}
void loop() {
// put your main code here to run repeatedly:
for (int i = 0; i <= 255; i+=5) {
analogWrite(LED, i);
delay(1000);
}
}

In this activity you want the brightness of the LED to gradually decrease.
So, you are not dealing with it as a digital on/off device but as an analogue
Note output device. Therefore, you are using the analogWrite function. For
the analogWrite function, you don’t need to call the pinMode function.
Section 3
Chapter 2

42
Copyright © Ministry of Education – United Arab Emirates
Activity 2.3.3
Consider the following code:
int potReading;
int potentiometer = 12;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
// put your main code here, to run repeatedly:
potReading = analogread(potentiometer);
Serial.println(“The potentiometer value is:”);
Serial.println(potReading);
delay(1000);
}

void loop() {
}

1. Identify the two technical errors in the code above.

Error Correction

2. The code for reading the potentiometer’s value is written inside the setup function.
What do you expect the result would be after executing that code?
Section 3
Chapter 2

43
Copyright © Ministry of Education – United Arab Emirates
Activity 2.3.4
We want to make an LED blink by sending a signal from digital pin 13 on the Arduino board.
Which of the following connections is correct? Circle the correct answer.

(a) (b)
Section 3

(c) (d)
Chapter 2

44
Copyright © Ministry of Education – United Arab Emirates
Activity 2.3.5
Which of the connections below meets the design given in the circuit below? Circle the
correct answer.

(a) (b)

Section 3
Chapter 2

(c) (d)

45
Copyright © Ministry of Education – United Arab Emirates
Activity 2.3.6

List the pins that can be used with the function ‘analogWrite’ to provide variable voltage
on Arduino Leonardo.
Section 3
Chapter 2

46
Copyright © Ministry of Education – United Arab Emirates
Activity 2.3.7

Write a code that controls the brightness of an LED. The LED should display three different
brightness intensities (0, 40%, 100%) with one second for each stage. Build the following
circuit to test and evaluate the system.

Note: We take percentages from the maximum limit for the ‘analogWrite’ function =
255.
0% = 0 * 255 = 0
40% = 0.40 * 255 = 102
100% = 1.00 * 255 = 255

Section 3
Chapter 2

Note: The resistor’s value is 100Ω.


47
Copyright © Ministry of Education – United Arab Emirates
Activity 2.3.8

Study the Arduino code given below.

The Arduino code


int LED = 8;
void setup() {
pinMode(LED, OUTPUT);
}

void loop() {
for(int brightness = 0 ; brightness < 255 ; brightness +=5){
analogWrite(LED, brightness);
delay(50);
}

for (int brightness = 255 ; brightness > 0 ; brightness -=5){


analogWrite(LED, brightness);
delay(50);
}
}

Based on the code, what is the expected result of the system?


Section 3
Chapter 2

48
Copyright © Ministry of Education – United Arab Emirates
Activity 2.3.9

Write the Arduino code for a system that consists of one potentiometer and four LEDs. As
the potentiometer’s knob position changes, the number of LEDs that are on changes (see
the table below). Use the following breadboard diagram to build and test the system.

Potentiometer’s reading Number of turned ON LEDs


[0-256] one LED
[257-512] two LEDs
[513-770] three LEDs
{771-1023] four LEDs

Note: All Resistors are 100Ω.

Section 3
Chapter 2

49
Copyright © Ministry of Education – United Arab Emirates
Extra space
Section 3
Chapter 2

50
Copyright © Ministry of Education – United Arab Emirates
Student reflection

List three things you have learned and two things you have enjoyed.
Three things I have learned:
1-
2-
3-

Two things I have enjoyed:


1-
2-

Key skills
I don’t I’m an
Learning outcome (Please tick the box to show your understanding I understand.
understand. expert.
of the skills below).

Differentiate between I can describe the function of PWM


digital and analogue signals in electric circuits using
signals. Arduino.

Read and generate


analogue signals with a I can use Arduino to read and
microcontroller-based generate analogue signals.
board.

Teacher’s comment:

Section 3
Chapter 2

51
Copyright © Ministry of Education – United Arab Emirates
Section 4 : Sensors and actuators

Aim

The aim of this section is to explore the different types of sensors and actuators that can be
programmed using Arduino. Sensors are used to detect changes in the surrounding environment,
while actuators are used to add mobility to the system and to perform certain actions. In this
section, you will study IR sensors, ultrasonic sensors and servo and DC motors. The content
explains how these components work, their equivalent circuitry, and how to control them using
Arduino.

Learning outcomes

• Distinguish between the types of motors and actuators.


• Demonstrate the proper use/operation of motors.
• Distinguish between the types of sensors.

Prior knowledge

• Use breadboards for building electronic circuits.


• Identify basic electronic components.
• Introduction to Arduino.
• Fundamentals of Arduino programming.

My STREAM focus
Section 4
Chapter 2

52
Copyright © Ministry of Education – United Arab Emirates
Key vocabulary

WORD MEANING PICTURE

electric device that converts electrical energy


DC motor into mechanical energy using a direct current
power source

electric device that allows you to control the


L298N motor driver
speed and direction of two DC motors

infrared sensor, an electric device that


IR sensor emits infrared radiation to detect certain
characteristics of the surrounding environment

acoustic sensor that uses sound waves to


Ultrasonic sensor
measure the distance to an object

Section 4
Chapter 2

53
Copyright © Ministry of Education – United Arab Emirates
Activity 2.4.1
Consider the following code:
int PWM_value = 150;
int motor = 3;
void setup() {
// put your setup code here, to run once:
pinMode(motor, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
analogWrite(motor,PWM_value);
delay(100);
}
Modify the code to make the motor run faster.
Section 4
Chapter 2

54
Copyright © Ministry of Education – United Arab Emirates
Activity 2.4.2
1. Explain the parameters of the map function.

No Explanation

2. Write a code to manipulate the brightness of an LED using a potentiometer.

Section 4
Chapter 2

55
Copyright © Ministry of Education – United Arab Emirates
Activity 2.4.3
The following tables show the connections between the motor driver module and the
Arduino microcontroller for both motors A and B.

Motor driver pin (Motor A) Arduino Pin


7 (enable pin) 3
8 11
9 10

Motor driver pin (Motor B) Arduino Pin


10 9
11 6
12 (enable pin) 5

1. Complete the circuit below to show how two DC motors can be controlled by Arduino
using an L298N motor driver.
Section 4
Chapter 2

56
Copyright © Ministry of Education – United Arab Emirates
2. Analyse the following code, then modify it to rotate the motors in the opposite direction.

Modified code:

Section 4
Chapter 2

57
Copyright © Ministry of Education – United Arab Emirates
Activity 2.4.4
Modify the code shown to control the DC motors to turn left.

//speed of motors between 0 and 255, if you, like you can change it
int pwm_speedA = 255;
int pwm_speedB = 240;
void setup()
{
Serial1.begin(9600);
//pins for motor controller
pinMode(9, OUTPUT);
pinMode(6, OUTPUT);
pinMode(5, OUTPUT);

pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(3, OUTPUT);
}
void loop()
{
//turning right
//DC Motor A Turned on
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
analogWrite(3, pwm_speedA);

//DC Motor B turned off


digitalWrite(9, LOW);
Section 4

digitalWrite(6, LOW);
analogWrite(5, 0);

}
Chapter 2

58
Copyright © Ministry of Education – United Arab Emirates
Activity 2.4.5
Edit the given code to control the shaft rotation of a servo motor using a potentiometer.
The hardware connection is shown below:

#include <Servo.h> //include Servo library


Servo myservo; // create servo object to control a servo
int potpin = 0; // analogue pin used to connect the potentiometer
int val; // variable to read the value from the analogue pin
int motor_position; // variable to control the PWM value of the motor

void setup() {
// attaches the servo on pin 9 to the servo object
________________________________________
}

void loop() {
// read the value of the potentiometer
val = _____________________________________
// scale it to use it with the servo (value between 0 and 180)
motor_position = map(val, 0, 1023, 0, 180);
Section 4

// sets the servo position according to the scaled value


_____________________________________________________
// wait for the servo to get there
Chapter 2

delay(15);
}

59
Copyright © Ministry of Education – United Arab Emirates
Activity 2.4.6
Edit the Arduino code given in the previous activity to restrict the movement of the motor
between 10o and 120o.
Hint: You need to edit the map function.
// scale it to use it with the servo (value between 10 and 120)

Edit the Arduino code given in the previous activity to reverse the direction of rotation of
the motor. Instead of going from 10o to 120o, it should go from 120o to 10o.
Hint: You need to edit the map function.
// scale it to use it with the servo (value between 120 and 10)
Section 4
Chapter 2

60
Copyright © Ministry of Education – United Arab Emirates
Activity 2.4.7
Consider the following code:

#define IR_sensor1_pin 3 // left sensor


#define IR_sensor2_pin 5 // middle sensor

#define motor_in1 12 // left motor


#define motor_in2 13 // left motor
#define en 11 // left motor - Enable

int sensor1;
int sensor2;

void setup()
{
pinMode(IR_sensor1_pin, INPUT);
pinMode(IR_sensor2_pin, INPUT);

pinMode(motor_in1, OUTPUT);
pinMode(motor_in2, OUTPUT);
pinMode(en, OUTPUT);
}

void loop(){
sensor1 = digitalRead(IR_sensor1_pin);
sensor2 = digitalRead(IR_sensor2_pin); Section 4

if ((sensor1 == HIGH) && (sensor2 == LOW)) {


digitalWrite(motor_in1, HIGH);
digitalWrite(motor_in2, LOW);
Chapter 2

analogWrite(en, 255);
delay(20);
}
61
Copyright © Ministry of Education – United Arab Emirates
else{
digitalWrite(motor_in1, LOW);
digitalWrite(motor_in2, LOW);
analogWrite(en, 0);
delay(20);
}
}

Analyse the code. What will happen after executing it?


Section 4
Chapter 2

62
Copyright © Ministry of Education – United Arab Emirates
Activity 2.4.8
Create a cardboard holder to mount three IR sensors. As each sensor passes over a black
line, an LED should turn ON. What would happen if the sensors were placed too close to
one another?
Use the diagram below as a reference.

Section 4
Chapter 2

63
Copyright © Ministry of Education – United Arab Emirates
Activity 2.4.9
The code below was written to program a regular digital IR sensor. The code does the
following:
• When an obstacle is detected: an LED turns ON and a message is displayed on the
serial monitor.
• When no obstacle is detected: an LED turns OFF and a message is displayed on the
serial monitor.
If you use the TCRT5000 sensor instead, how would the system respond when you use the
same code?
int LED = 13;
int isObstaclePin = 7;
int isObstacle = HIGH;
void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);
pinMode(isObstaclePin, INPUT);
}
void loop() {
isObstacle = digitalRead(isObstaclePin);
if (isObstacle == LOW) {
Serial.println(“OBSTACLE!!, OBSTACLE!!”);
digitalWrite(LED, HIGH);
}
else {
Serial.println(“clear”);
digitalWrite(LED, LOW);
}
delay(200);
}
Section 4
Chapter 2

64
Copyright © Ministry of Education – United Arab Emirates
Activity 2.4.10
Create a simple collision detection system. If the distance is less than 50cm, then an LED
should start blinking ON and OFF to alert the driver.

Section 4
Chapter 2

65
Copyright © Ministry of Education – United Arab Emirates
Activity 2.4.11

Write Arduino code for a system that measures the distance using an ultrasonic sensor.
Then, prints a message on the serial monitor describing the distance to the object as per
the table given below.

Distance in [cm] Message to display


[2 - 20] ‘Very close’
[21 – 50] ‘Close’
[51 – 100] ‘Median’
]101 – 150] ‘Far’
[151 or more] ‘Very far’

Use the following breadboard diagram to build and test the system.
Section 4
Chapter 2

66
Copyright © Ministry of Education – United Arab Emirates
Extra space

Section 4
Chapter 2

67
Copyright © Ministry of Education – United Arab Emirates
Student reflection

List three things you have learned and two things you have enjoyed.
Three things I have learned:
1-
2-
3-

Two things I have enjoyed:


1-
2-

Key skills
I don’t I’m an
Learning outcome (Please tick the box to show your understanding I understand.
understand. expert.
of the skills below).

I understand the function of DC


motors using Arduino.

Read and generate


analogue signals with a I can identify the function of a motor
microcontroller-based driver using Arduino.
board.

I understand the function of servo


motors using Arduino.

I can explain and differentiate


Demonstrate the proper
between DC motors and servo
use/operation of motors.
motors.

I understand the function and


operation of an IR sensor module
using Arduino.
Distinguish between the
types of sensors.
I understand the function and
operation of an ultrasonic sensor
Section 4

using Arduino.

Teacher’s comment:
Chapter 2

68
Copyright © Ministry of Education – United Arab Emirates
Section 5: Arduino display tools

Aim

This section aims to introduce Arduino’s display tools, namely the LCD and the LED matrix.
Both serve as useful tools for visualising and monitoring the values sent and received from your
Arduino board.

Learning outcomes

• Analyse the difference between the types of display tools.


• Understand how to control the LCD screen.
• Understand how to use an LED matrix to display messages.

Prior knowledge
• Use breadboards for building electronic circuits.
• Identify the basic electronic components.

My STREAM focus

Key vocabulary

WORD MEANING PICTURE

Liquid Crystal Display; a type of screen that


LCD displays data by changing the electric current
that changes the structure of the liquid crystals
Section 5

set (array) of LEDs connected together using a


LED Matrix
Chapter 2

grid of wires

69
Copyright © Ministry of Education – United Arab Emirates
Activity 2.5.1
Modify the Arduino example to print your name. Take a picture of the LCD screen and
paste it into the box below.
Arduino code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins


LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

void setup() {
// set up the LCD’s number of columns and rows:
lcd.begin(______,______);

// Print your name on the LCD.


lcd.setCursor(______,______);
lcd.print(_____________________);
}

void loop() {

What will you see on your LCD screen after you enter the program in Arduino?
Section 5
Chapter 2

70
Copyright © Ministry of Education – United Arab Emirates
Activity 2.5.2
Study the following code, then write the expected outcome on the LCD shown below.

void setup() {
lcd.begin(16, 2);

lcd.setCursor(3, 0);
lcd.print(“Section 5”);

lcd.setCursor(6, 1);
lcd.print(“Done”);
}

Activity 2.5.3
Use the 8x8 LED matrix to display two different images. The images can be anything you
want, an emoji, a letter, a number etc. The time between displaying the first image and the
second one should not be more than 5 seconds.

Section 5
Chapter 2

71
Copyright © Ministry of Education – United Arab Emirates
Activity 2.5.4
In the circuit below, the servo angles are controlled via a potentiometer and are displayed
on the LCD. Construct the circuit, then complete the code below to:
- control the servo motor using a potentiometer
- display the current position of the servo on the LCD

//LCD settings
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); // initialise the library with the numbers of the interface
pins

// Servo motor and potentiometer settings


#include <Servo.h>
Servo myservo; // create servo object to control a servo
int potpin = A0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin
int angle; // the angle servo is sent to

void setup()
{
Section 5

// set up the LCD’s number of columns and rows:


lcd.begin(16, 2);
myservo.attach(10); // attaches the servo on pin 10 to the servo object
Chapter 2

lcd.clear(); //clears the LCD screen


//Print the message “Servo Knob” on the LCD and then add a delay of 2 seconds

72
Copyright © Ministry of Education – United Arab Emirates
}

void loop()
{
//reads the value of the potentiometer

//scale it to use it with servo

//set the servo position according to the


scaled value

lcd.clear(); //clears the LCD screen

//Print the message “Pot. Value” on the screen by setting the cursor to (0,0)

//Print the potentiometer value on the screen by setting the cursor to (11,0)

//Repeat the steps above to print the message “Angle” and the servo position in line 1
Section 5
Chapter 2

}
73
Copyright © Ministry of Education – United Arab Emirates
Student reflection

List three things you have learned and two things you have enjoyed.
Three things I have learned:
1-
2-
3-

Two things I have enjoyed:


1-
2-

Key skills
I don’t I’m an
Learning outcome (Please tick the box to show your understanding I understand.
understand. expert.
of the skills below).

Analyse the difference I can identify the function of the serial


between the types of monitor, LCD, and LED matrix using
display tools. Arduino.

Understand how to I can use Arduino to control an LCD


control the LCD screen. screen.

Understand how to use


I can use Arduino to control an LED
an LED matrix to display
matrix.
messages.

Teacher’s comment:
Section 5
Chapter 2

74
Copyright © Ministry of Education – United Arab Emirates

You might also like