You are on page 1of 46

WEEEMAKE ELF BOARD

ACTIVITIES

© Copyrighted Material
Data Science and Technology Corporation
Lesson 1
Introduction to RGB LED

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: RGB LED
Click File and Load the Sample Program 1: RGB
LED.

OUTPUT: When you press the ON BOARD button,


the LED will turns RED after 1 second.
© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: HOW TO UPLOAD A PROGRAM

STEPS: (Connect the robot to computer)


Set the COM Port
Set the Board type
Set the Code to ON
Click Upload program to board.
Wait until successful message is
prompted.
© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE: RGB LED
Primary Colors
Create a program that will show the 3
primary colors when you press the on
board button. Each color will set to ON for
1 second.

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: RGB LED
Set the value of , and to 255

Upload the program and observe the OUTPUT.


© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE: RAINBOW
Sequence of Colors
Create a program that will display the
RAINBOW colors ( ).
Each color will appear sequentially every 0.5
second
Use the color of MS PAINT as your basis of color
value

© Copyrighted Material
Data Science and Technology Corporation
Lesson 2
RGB LED RING

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: RGB RING
Load & Upload the Sample Program 3 RGB RING.

OUTPUT: When you press the ON BOARD button,


ALL LED of RGB RING will turn RED after 1 second.
© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE: RAINBOW RING 1

Using RGB Ring, create a program


that will display the color of a
RAINBOW ( ).

Each color must appear sequentially


for every 0.5 second

© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE: RAINBOW RING 2

Use the previous program for


Rainbow Ring 1.
When ALL 8 Rings was turned ON,
the LEDs start to turn OFF sequentially
starting from LED 1 to LED 8
Program repeats 3 times.

© Copyrighted Material
Data Science and Technology Corporation
Lesson 3
Playtone

© Copyrighted Material
Data Science and Technology Corporation
Lets talk about tone
Play Tone on Note: Find the coding block to create tone on robots
block.

C-B stands for do ~ si, 3 -5 Half Beat~ whole note


stands for bass-high pitch, stands for a unit time of
C4 is alto do. music.

Note: you can change the beat of each note after finishing the code.

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice 4: PLAYTONE

Open and upload the TWINKLE sample program.


Find out the incorrect notes.

© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT ACTIVITY: PLAY A TONES
Using the PLAYTONE blocks, create a tone for
the following (just choose one):
- HAPPY BDAY
- LONDON BRIDGE
- MARY HAD A LITTLE LAMB
- ROW ROW ROW YOUR BOAT
- SUPER MARIO

© Copyrighted Material
Data Science and Technology Corporation
Lesson 4
Repetitions

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: REPETITIONS
Open & upload the Program 4: REPEATITIONS.

Observe the OUTPUT.

© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE: REPEATITION
Create a program that will:
A) show the 3 primary colors on RGB ring
with a delay of 0.5 second per color & will
repeat 5 times

B) sequentially show the color of RAINBOW


on RGB ring for 5 times
© Copyrighted Material
Data Science and Technology Corporation
Lesson 5
RGB using the IR REMOTE

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: IR Remote Controller

Click File and Load the


Program 5 IR Remote
Controller. Upload.

OUTPUT: When you press the


button 1 of RC, ALL LED of RGB
RING will turn to . When Ok
button is pressed, ALL LED will
turn OFF.
© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE: USING IR REMOTE

Activity 6: Primary Colors


Create a program that will show the 3 primary colors
when IR remote controller button 1 is pressed

Activity 7 Sequence of Colors


Create a program that will sequentially turn on the
color of RAINBOW ( ) when a button 2 is
pressed

© Copyrighted Material
Data Science and Technology Corporation
Lesson 6
Basic Movements

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Basic Movements (using 6-in-1 motor)

Load and upload the Basic Movements


sample program.

OUTPUT: When the on board button is


pressed, the robot will move forward for a
second, stop for a second, backward for a
second, then stop.

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Basic Movements (using 12-in-1 encoder motor)

Load and upload the Basic Movements


sample program.

OUTPUT: When the on board button is


pressed, the robot will move forward for a
second, stop for a second, backward for a
second, then stop.

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Motor Individual Speed Setting

forward = positive speed

= backward = negative speed

© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE: FW & BW
Create a program that when the on board button is pressed, the
robot will move:
▪ forward for 1 meter (start at Point A and stop at Point B), then
▪ backward for 1 meter (start at Point B and stop at Point A).

© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE: ARC & CIRCLES

By modifying the speed of two motors,


▪ Create a program that will make the
robot move in a clockwise circular path

▪ Robot must START and STOP at the start / stop point

same point.

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Making Turns
Load and upload the program Making turns.

© Copyrighted Material
Data Science and Technology Corporation
Independent Practice: Making Turns
Create a program that will make the robot perform any of the
following (use the dot as your start/stop point):

1meter
1meter

90o
45o

1meter 1meter

© Copyrighted Material
Data Science and Technology Corporation
Lesson 6
Light Sensor

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Sensor Calibration
Click File and Load the Program 7 Light
Sensor Calibration (sensor on Port 1).
Perform the steps below:

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Light Sensor and Playtone

Upload the Sample


Program 8: Light Sensor and
Playtone.
Note:(sensor on Port 1.

© Copyrighted Material
Data Science and Technology Corporation
Lesson 7
Ultrasonic Sensor
and RGB Ring

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Sensor Calibration
Load and upload the Program 9
Ultrasonic Sensor Calibration
Perform the steps below:

Try to get these values: 0, 10, 25, 40

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Use the Ultrasonic sensor value to control LED color

Using ULTRASONIC RGB LED, make the RED led


blink for a certain amount of time.

The sensor values must be used as the amount of


time it blinks

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Use the Ultrasonic sensor value to control LED color

Upload the Sample Program 10: Changing Color


based on the Distance (sensor must be on Port B).

© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE: PLAYTONE
▪ Create a program that will play DO-RE-MI.
▪ Each tone must be played depending on the ultrasonic
sensor values. See table below:
TONE SENSOR VALUE TONE SENSOR VALUE

DO 41-50 SO 21-25

RE 36-40 LA 16-20

MI 31-35 TI 11-15

FA 26-30 DO 0-10

© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE: OBSTACLE
AVOIDANCE
▪ Create a program that make the robot move forward when
the ultrasonic sensor detects nothing (or values > 30).
▪ When the ultrasonic detects an object < 30, the robot will
avoid the object.

© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE: Maintain the
distance (terrain)
Create a program that make the robot :
▪ move forward when the ultrasonic detects an object > 40,
▪ move backward when the ultrasonic detects an object < 20
▪ stop when the object detected is between 20 and 40

© Copyrighted Material
Data Science and Technology Corporation
Lesson 7
Line Tracing Sensor

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Sensor Calibration
Open and upload the Program 12
Calibration of Line Tracing

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Sensor Calibration

How to Test the sensor?


Place the sensor on black surface, record the value
Place the sensor on white surface, record the value
Compute for the sensor value

S1 sensor value = (white + black) / 2


S1 sensor value = (800 + 100) / 2
S1 sensor value = 450
black =100 white=800

Do the calibration and computation


© Copyrighted Material for both S1 and S2
Data Science and Technology Corporation
Sample Program: Edge Detection using Line Tracing Sensor

Load and upload the Program 13


Edge detection.
Test and observe the RGB Ring

© Copyrighted Material
Data Science and Technology Corporation
INDEPENDENT PRACTICE:
EDGE / BLACK LINE DETECTION

▪ Create a program that make the robot move forward until


the sensor detects the edge / black line

© Copyrighted Material
Data Science and Technology Corporation
Guided Practice: Line Tracing V1 (Simple)

© Copyrighted Material
Data Science and Technology Corporation
END OF THE LESSON

© Copyrighted Material
Data Science and Technology Corporation

You might also like