0% found this document useful (0 votes)
62 views53 pages

Grade-5-Coding and Robotics

Start your coding and build your robot.

Uploaded by

bharat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views53 pages

Grade-5-Coding and Robotics

Start your coding and build your robot.

Uploaded by

bharat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

CODING INDEX

CHAPTER NO. CHAPTER NAME PAGE NO.

1 Introduction to Coding 1
2 Understanding Algorithm 2
3 Click Tap Go! Understanding Events 3
4 Cheese Hunt Activity 4
5 Cab Rush Activity 5
6 Survivor Bird Activity 6
7 E-GO Cleans Garden Activity 7
8 Cross the Road Activity 8
9 Maze Game Activity 9
10 Understanding Coordinates 11

11 Where Am I Activity 13

12 Claw Machine Activity 13

13 Traffic Light Activity 14

14 Fixing the Tiles Activity 15

15 Simple Calculator Activity 16


ROBOTICS INDEX

CHAPTER NO. CHAPTER NAME PAGE NO.

1 Introduction To Electricity 18
2 Basic Electronic Circuits 22
3 Light It Up: Assemble and Power Lamp 23
4 Introduction To Series & Parallel Circuits 26
5 Ring the Bell: Build your Smart Hut 29
6 Vibrating Bug Bot 33
7 eduCOBOT Shield Port Guide 36
8 Lighting Up: Trigerring LED with Esp32 41
9 Color your Code: Controlling RGB Light 43
10 Programming a Segment Display 44
11 Buzzer 48
12 Motor Magic: Controlling DC Motor 49
1 Introduction to Coding

1.1 What will you learn in this chapter?

• What is coding?
• What can we do with code?
• A puzzle to solve
• Coding is for everyone

1.2 Introduction to Coding


Imagine you have a really smart puppy. It's eager to learn, but it only
understands a few simple commands like "sit," "stay," and "fetch." You
can train it to do more complex things by stringing these commands
together in a specific order. Coding is similar – it's how we give in-
structions to computers.
Speaking Computer:
Computers are incredibly powerful, but they don't understand human
languages like English or Hindi. They need very precise instructions,
written in a language they understand, called a programming lan-
guage.
Think of a programming language as a set of words and rules that
both you and the computer understand. You use these words and
rules to write code, which is like a recipe or a set of instructions for
the computer to follow

1.3 What Can You Do With Code?


Almost anything! Here are just a few examples:

• Websites and Apps: The websites you visit and the apps you use on your phone are all created using code.

• Video Games: All the characters, levels, and gameplay in video games are made possible by code.

• Robots: Robots can be programmed to perform tasks using code.

• Data Analysis: Scientists and researchers use code to analyze huge amounts of data and make discoveries.

• Automation: You can write code to automate repetitive tasks, saving you time and effort.

1.4 A Puzzle to Solve:


Coding is like solving a puzzle. You have a goal in mind (like making a ro-
bot move or creating a simple game), and you need to figure out the right
combination of code instructions to achieve that goal. It takes practice and
problem-solving skills, but it's also a lot of fun and incredibly rewarding.

Coding is for Everyone:


You don't need to be a math genius or a tech expert to learn to code.
There are many resources available to help beginners get started, and the
best way to learn is by doing!
In Short:
Coding is how we communicate with computers to tell them what to do. It's a powerful tool that allows us to cre-
ate amazing things and solve complex problems. It's like learning a new language, but instead of talking to peo-
ple, you're talking to machines!

www.educobot.com 1
2 Understanding Algorithms

2.1 What will you learn in this chapter?

• What is an Algorithm?
• Why are Algorithm important?
• Write your own Algorithm
• Summary

2.2 What is an Algorithm?


An algorithm is a step-by-step set of instructions to solve a problem or complete a task. Think of it as a recipe for a
computer—it tells the computer exactly what to do, step by step.

Just like in real life, algorithms are everywhere! When you tie your shoelaces, cook food, or even brush your teeth,
you follow a set of steps. In coding, we give clear and logical steps to the computer so that it can perform a task
correctly. Let’s understand this better with a fun example—a Magic Show!

Imagine you are a magician on stage, and you have three tricks to perform. Each trick follows a specific set of
steps.

Magic Trick 1: The Rabbit Appears

1. Take an empty hat.


2. Wave the magic wand.
3. Say the magic words: “Abracadabra!”
4. A rabbit appears!
Magic Trick 2: The Apple Appears

1. Take an empty box.


2. Close the lid.
3. Tap the box twice.
4. Open the lid, and an apple appears!
Magic Trick 3: Confetti Explosion

1. Hold a closed fist.


2. Count to three.
3. Open the fist quickly.
4. Colorful confetti flies out!
Each magic trick follows a set of steps. If you change the order, the trick won’t work properly. For example, if
you open the box before tapping it, the apple won’t appear!

In coding, algorithms work the same way. They must be written in the correct order so the computer can
understand and execute them properly.

www.educobot.com 2
Real-Life Example: Traffic Signals

A traffic signal also follows a set of instructions to control the movement of vehicles.

1. Red Light Cars stop.


2. Green Light Cars go.
3. Yellow Light Cars slow down and get ready to stop.

If the traffic signal does not follow this order, there will be confusion and accidents! Similarly, in coding, if the
instructions are not given properly, the program will not work correctly.

2.3 Why Are Algorithms Important in Coding?


• They make coding easier. You don’t have to think of every
step each time—you just follow a plan.
• They make coding efficient. Computers can complete tasks
quickly if they follow well-organized steps.
• They prevent errors. If the instructions are clear and logical,
the program works smoothly.

2.4 Fun Activity: Write Your Own Algorithm!


Try writing an algorithm for making a sandwich. Think about the
steps carefully. What happens if you forget to add the bread first?
What if you spread peanut butter before opening the jar? This will
help you understand how important order is in coding!

2.5 Summary
Now that you've completed this lesson, you understand algorithms as step-by-step instructions that help computers solve
problems efficiently. You saw how algorithms work through real-life examples like a Magic Show and Traffic Signals, where
following the correct sequence is essential.

You also learned why algorithms are important in coding and how they prevent errors by organizing instructions logically.
Finally, you practiced breaking down tasks into simple steps, helping you write your own algorithms. With this knowledge,
you're ready to apply algorithms in coding and real-life problem-solving!

3 Click Tap Go! Understanding Events


3.1 What will you learn in this chapter?

• What is an Event?
• What are different UI?
• Why is it important in coding?
• Activities based on Events.

www.educobot.com 3
2.2 What is an Event?
An event in coding is an action or occurrence that a program detects and responds to. Events allow
programs to be interactive, making them respond to user actions or system changes. Without events,
software would be static and unresponsive, requiring manual execution of every function.

2.3 Types of Events in UI (User Interface)

1. Mouse Events – Actions performed using a mouse, such as:


• Click (single or double-click)
• Hover (moving the cursor over an element)
• Right-click (context menu)

2. Keyboard Events – Detects when a key is pressed or released, such as:


• Keydown (when a key is pressed)
• Keyup (when a key is released)
• Keypress (while a key is being held down)

3. Touch Events (for mobile and touchscreen devices) – Actions like:


• Tap (similar to a click)
• Swipe (left, right, up, down)
• Pinch (zooming in or out)

4. Form Events – Triggered when interacting with forms, such as:


• Input (when text is typed)
• Submit (when a form is submitted)
• Change (when a selection is modified)

2.4 Why are Events important in coding?


• Enhance User Experience – They make websites and applications interactive and dynamic.

• Automate Responses – Programs can react automatically without manual input.

• Improve Functionality – Events enable real-time updates, animations, and user-friendly interactions.

• Enable Event-Driven Programming – Most modern applications rely on event-driven logic for smooth
operation.

2.5 Activities based on Events

1 CHEESE HUNT
Task: In this lesson, Students guide a mouse through a maze to get cheese, using coding
concepts like "if," "key sensing," and "repeat forever."

www.educobot.com 4
UNDERSTANDING CODE

A simple interactive movement system where a mouse moves based on arrow


key inputs. The Repeat forever loop continuously checks for key presses:

• If the left arrow key is pressed, the character moves left.


• If the right arrow key is pressed, it moves right.
• If the up arrow key is pressed, it moves up.
• If the down arrow key is pressed, it moves down.

Additionally, there is a condition that checks if the mouse touches the cheese.
If true, the character "eats the cheese when found."

2 CAB RUSH

Task: In this lesson, Students program a cab to take the shortest route through a maze to
reach a destination before running out of fuel, using "if," "key sensing," "repeat forever,"
and "comparison" concepts.

UNDERSTANDING CODE

www.educobot.com 5
A simple car movement and fuel management game.

• The game starts with a fuel meter set to 100%.


• The Repeat forever loop checks for arrow key inputs to move the car in
different directions. Each movement decreases the fuel meter by 0.1%.
• If the fuel level reaches 0%, the game ends.
• If the car touches a fuel station, the fuel meter increases by 50%, and the
fuel station disappears.

If the car reaches the house, the car disappears, and the player wins the game.

3 SURVIVOR BIRD

The task: Students program a Flappy Bird-like game, defining game logic and condi-
tions, using "if do" and "comparison" concepts.

www.educobot.com 6
UNDERSTANDING CODE

The if condition will check


whether the bird is touching
the ground or the obstacle
and accordingly the number
of lives will change.

This condition will


check the game sta-
tus whether the
game is over or the This condition will help in increase
bird should keep the score value if the bird is
moving. touching the coin.

NOTE: This is not the complete code this snippet is just to introduce you to new blocks that were not
previously present

4 E-BO CLEANS GARDEN

The task: Students program a robot to sort waste into recyclable and non-recyclable
bins, using "if," "touch sensing," and "repeat forever" concepts.

www.educobot.com 7
UNDERSTANDING CODE
This block will help create
the blue bin sprite in order to
throw the non-
biodegradable waste in it

The "AND" operator requires all the con-


ditions to be true in order for the whole
expression to be true. If any one of the
conditions is false, the entire expression
becomes false.

NOTE: This is not the complete code this snippet is just to introduce you to new blocks that were not
previously present

5 CROSS THE ROAD


The task: Students program pedestrians to cross the road safely at zebra crossings
when the light is green, using "repeat forever," "if," "comparison," "variables," and
"multiple comparison" concepts.

www.educobot.com 8
UNDERSTANDING CODE

This variable block is used


to store the value of timer 1
and timer 2 .

This is the mathematical oper-


ator lesser than equal which
will check if the timer is lesser
than equal to 0 means the
timer is over.

NOTE: This is not the complete code this snippet is just to introduce you to new blocks that were not
previously present

6 MAZE GAME

The task: Students program a police character to catch a thief in a maze,


dodging obstacles, using variables, "if" conditions, "repeat forever," and coordinates.

www.educobot.com 9
UNDERSTANDING CODE

This is the coordinate block


that helps to locate on the
sprite.

This is the touch event that


builds interaction between
two sprites

NOTE: This is not the complete code this snippet is just to introduce you to new blocks that were not
previously present

Congratulations on finishing
the current level!

If you are reading this, it means you have successfully completed the level. It's time to
attempt a test lesson (Snake Food Collection in your portal). Please read the instruc-
tions carefully on the portal’s test lesson instruction card and complete the test to un-
lock the next level. Keep up the great work, and all the best!

QUIZ TIME

www.educobot.com 10
Q1. What is the purpose of a while loop in Python?
When clicked

When key pressed

Broadcast message

Q2. Which event triggers an action when two objects collide?


When clicked

When touching another object

When variable changes

Q3. Which of the following is NOT an event-based action?


Clicking a button to start a game

Receiving a broadcast message to change color


Pressing a key to move a character

Mouse eating cheese on touching the Cheese

Q4. Which of these is an example of an event in real life?


A book being read
A door opening when someone knocks

A pencil lying on a table

A chair in a classroom

SHORT ANSWER QUESTIONS


Q1. What is an event in programming, and why is it important?
Q2. Give an example of an event-driven action in a game.
Q3. What is an example of a real-world application that relies on event-driven
programming?

4 Understanding Coordinates

4.1 What will you learn in this chapter?

www.educobot.com 11
• What are Coordinates?
• Where we use Coordinates in Real-Life?
• Why is it important in coding?
• Activities based on Coordinates.

4.2 What are Coordinates?


A coordinate is a pair of numbers that show the exact position of a point in space. In coding, coordinates help
place objects on a screen, just like how we use maps to find locations.

4.3 Where do we use Coordinates in Real-Life?

Coordinates are used in many everyday situations, such as:

• Maps – Finding locations using latitude and longitude.


• Graph Paper – Plotting points in math class.
• Video Games – Placing characters and objects in the game world.
• GPS Systems – Navigating to a destination using coordinate points.

4.4 Why are Coordinated important in coding?

· Placing Objects – Used in web design, game development, and animations to position elements.

· Movement and Interaction – Helps track the position of a character, cursor, or touch input.

· Graphics and Design – Used in drawing shapes, creating UI layouts, and animations.

Coordinates are pairs of numbers that define the position of a point in space, commonly used in maps, graphs,
and digital screens. In coding, they help place objects, track movement, and create interactive designs. They are
essential in game development, web design, and animations to ensure accurate positioning. Understanding co-
ordinates makes it easier to build visually structured and dynamic applications.

Now, let's solve some fun activities based on coordinates to apply what we've learned!

www.educobot.com 12
1 WHERE AM I

Task: In this lesson, Students use coordinates to help police catch


robbers hiding in a park, using "coordinates" and "sequence" concepts.

UNDERSTANDING CODE

The Catch block allows the integration of a coordinate


block to catch the thief.

This is the coordinate block where we will mention


the x and y values of the thieves to catch them.

Wait block will help to create an interval between two


codes. After the first thief is caught wait for a few sec-
onds and then it will catch the next

2 CLAW MACHINE

Task: Students use coordinates to control a claw machine to pick up toys, using
"coordinates" and "sequence" concepts.

www.educobot.com 13
UNDERSTANDING CODE

The Catch block allows the integra- tion of a coordi-


nate block to catch toys from the claw machine.

This block has x and y coordinate in it which means


you will have to enter the x and y value in this
block

3 TRAFFIC LIGHT

Task: Students use a loop block to code a traffic light that changes color after a few sec-
onds, using "sequence," "repeat number of times," and "wait" concepts.

UNDERSTANDING CODE

This is the Loop block. The code inside the Loop block will
be repeated for the specified number of times.

Using this block you can decide which color the


traffic light should be and whether it should be on
or off.

The wait block will help create an interval between


two codes. i.e., after one light is on, wait a few seconds,
turn it off, and glow the other light.

www.educobot.com 14
5 FIXING THE TILES

Task: Students program a worker to replace damaged tiles with fresh ones of the same
color, using "coordinates," "sequence," "touch sensing," and "say" concepts.

UNDERSTANDING CODE

1. Start & Wait – The game starts and waits for 3 seconds.
2. Repeat 6 Times – Runs the following steps 6 times.
3. Get User Input – Asks for X and Y values and waits.
4. Ask to Select a Tile – Prompts the user to choose a
blue or yellow tile.
5. Check Selection
• If a tile is selected: Pick, move to (X, Y), fix it, and wait.
• If no tile is selected: Show a "Try again" message.
6. End Step – Manager checks quality.

This code helps place tiles based on user input.

www.educobot.com 15
5 SIMPLE CALCULATOR

The task: Students build a simple calculator by placing buttons and programming them,
using "coordinates," "repeat forever," "touch sensing," and "if else" concepts.

UNDERSTANDING CODE

This block will check which button


has to be pressed and according
to that check the coordinates and
enter it in the coordinate block.

This is touch event which


means the interaction between
the computer and the user. Like if
the user will touch the equal to
sign the equation will be com-
pleted based on that.

www.educobot.com 16
Congratulations on finishing
the current level!

If you are reading this, it means you have successfully completed the level. It's time to
attempt a test lesson (Vehicle Rush in your portal). Please read the instructions careful-
ly on the portal’s test lesson instruction card and complete the test to unlock the next
level. Keep up the great work, and all the best!

Quiz Time

Q1. What is the X-coordinate used for?


Vertical positioning

Horizontal positioning

Sound Control

Q2. What are coordinates used for in programming?

To change color

To set positions on a grid or screen


To create sound effect

To write text

Q3, If Y increases, where does the object move?

Up
Down

Left

Right

SHORT ANSWER QUESTIONS


Q1. What does the coordinate (0,0) represent?
Q2. What happens when you increase only the X value?
Q3. Why are coordinates important in game development?

www.educobot.com 17
INTRODUCTION TO ELECTRICITY

This chapter introduces the basic concepts of electricity, including


understanding how electric circuits work and the importance of electrical
safety .

www.educobot.com 18
www.educobot.com 19
www.educobot.com 20
www.educobot.com 21
BASIC ELECTRONIC CIRCUITS

Activity: In this activity, you will be introduced to the breadboard, an essential tool used to build and test
electronic circuits. You’ll learn how to connect various electronic components such as LEDs, resistors, and
transistors to the breadboard. The best part is that you won’t need to solder anything—everything can be
connected temporarily, which makes it easy to experiment with different setups. You’ll also discover how
to place components on the breadboard and how to make proper connections to complete a circuit.

1 4

2 5

3 6

www.educobot.com 22
7 8

Learning Outcome: By the end of this activity, you will have a good understanding of how to use
a breadboard to create simple circuits. You will know how to connect components correctly and
how to troubleshoot basic problems. This hands-on experience will be the first step in mastering
electronics and circuit design, preparing you for more advanced projects in the future!

LIGHT IT UP: ASSEMBLE AND


POWER LAMP

Activity: In this activity, students will follow assembly instructions to put


together a lamp made up of various parts. They will mount the LED PCB
(Printed Circuit Board) and the power PCB, then connect a battery to the
power PCB. Once everything is set up, students will power the lamp and
watch the LED light up, demonstrating how electrical components work
together to create light.

MATERIALS NEEDED

www.educobot.com 23
STEP 1

STEP 2

STEP 3

STEP 4

www.educobot.com 24
STEP 5

STEP 6

STEP 7

Learning Outcome: Students will develop an understanding of basic electronics


and assembly skills. They will learn how to connect different components like LED
and power PCB, as well as the role of a battery in powering an electrical circuit.
This hands-on activity fosters problem-solving, attention to detail, and knowledge
of how electronic circuits work to produce light.

www.educobot.com 25
INTRODUCTION TO SERIES AND
PARALLEL CIRCUITS
Students explore the differences between series and parallel
circuits, learning how to build and analyse these types of circuits
and their behaviour in various configurations .
RESISTOR IN PARALLEL
1 4

2 5

3 6

www.educobot.com 26
7 9

8 10

RESISTOR IN SERIES

1 2

www.educobot.com 27
3 6

4 7

5 8

www.educobot.com 28
9 10

Learning Outcome: By the end of this activity, you will have a good understanding of how to use
a breadboard to create simple circuits. You will know how to connect components correctly and
how to troubleshoot basic problems. This hands-on experience will be the first step in mastering
electronics and circuit design, preparing you for more advanced projects in the future!

RING THE BELL: BUILD YOUR SMART HUT

Activity: In this activity, students will assemble a hut model from provided parts
and integrate a tactile switch PCB and buzzer module into the setup. When the
tactile switch is pressed, the buzzer will sound, simulating a doorbell ringing,
allowing students to see how simple circuits and switches work in a real-world
context.

www.educobot.com 29
STEP 1

X1 X1

X2

STEP 2

X1 X2

STEP 3

X2

X3
X2 X1

www.educobot.com 30
STEP 4

X1 X2

STEP 5

X1 X2

STEP 6

X1 X2

www.educobot.com 31
STEP 7

X2

STEP 8

X1

Learning Outcome: Students will learn how to assemble and connect basic elec-
tronic components like a tactile switch and buzzer. They will gain hands-on ex-
perience with circuits, understanding how pressing a switch can trigger an action
(in this case, activating the buzzer). This activity fosters skills in electronics, prob-
lem-solving, and circuit design while introducing students to the concept of in-
teractive devices.

www.educobot.com 32
VIBRATING BUG BOT

Activity: In this hands-on activity, students will assemble a bug-like


model using MDF parts. Once the model is built, they will connect a
Power Supply PCB to a DC motor fitted with an off-center stopper. When
powered on, the off-center weight causes the motor to vibrate, making
the bug move in unpredictable, fun patterns. This activity is a creative
exploration of motion through vibration.

MATERIALS NEEDED

www.educobot.com 33
STEP 1

X1
X2
X1

STEP 2

X1 X2

STEP 3

X1 X2

STEP 4

X1 X1

Stopper shape may vary from the one shown in the image

www.educobot.com 34
STEP 5

STEP 6

STEP 7

Learning Outcome: Students will learn how vibration can generate motion and how an off-center weight
on a motor affects movement. They will explore basic principles of mechanical motion, motor function,
and assembly skills, while enhancing their creativity and understanding of how mechanical and electrical
systems work together. This activity combines elements of physics and engineering in a playful, engaging
way.

www.educobot.com 35
eduCOBOT SHIELD PORT GUIDE

Activity: In this activity, you will explore the eduCOBOT Shield and learn about its various ports
and their specific functions. Each port is designed for a specific type of component, such as LEDs,
motors, sensors, buzzers, and displays. You will understand how to connect components like the
LDR, ultrasonic sensor, touch sensor, and more to the shield. This foundational knowledge will
help them confidently assemble and program circuits using the eduCOBOT Shield in future
activities.

External power supply port for power,


connecting a battery

www.educobot.com 36
Touch sensor port to connect a
touch-sensitive device.

An LDR port is used to connect an


LDR sensor, which can be
programmed to perform a function
depending on the light condition.

The IR sensors give


data on the distance
between the sensor
and the object it is
facing.

www.educobot.com 37
Motor 1 Port is
used to connect
the BO motor.

Motor 2 Port is used to connect the second BO motor.

A servo motor is an electric motor capable of controlling speed and


position.

www.educobot.com 38
A buzzer port is used to
program a buzzer.

LED port, we can connect the LED


PCB and programme the LED.

Traffic light port, we can


connect the traffic light PCB
and programme traffic lights.

www.educobot.com 39
Software and Drivers:

To connect the eduCOBOT Shield (Innov8r module) to your computer and flash programs to
the ESP32, you must install the appropriate drivers. Download them from: https:/
www.educobot.com/tools/ (select your OS: Windows or Mac). For installation guidance, see
the video: Link. This is a one-time installation and requires administrator privileges. Install
drivers before running any code.

www.educobot.com 40
LIGHTING UP: TRIGGERING LED WITH ESP32

Activity: In this activity, students will program the ESP32 mounted on the eduCOBOT shield to
trigger an LED (using a two-pin connector). By using block-based programming, they will control
when the LED turns on and off. The eduCOBOT shield provides various ports for other
components like LED, LDR, IR, Motor, LCD, Ultrasonic, and Touch sensor, but in this activity, the
focus is on triggering the LED for visual output.

Step-by-Step Instruction: Each


Code Insertion Options: Offers
step is broken down to simplify
choices to upload the code via
the learning process and ensure
WiFi or a cable.
understanding.

Circuit Design: This step-by-


step guide helps students
understand and create
connections effectively.

www.educobot.com 41
Circuit Design: The image shows a circuit
design interface for assembling components
and gaining visual learning experience.

Learning Outcome: Students will learn how to trigger and control an LED using
the ESP32 and eduCOBOT shield. They will gain hands-on experience with block
-based programming, understanding how to control basic hardware (like the
LED) through code. This activity enhances their grasp of how programming can
interact with physical devices in a simple, effective way.

www.educobot.com 42
COLOR YOUR CODE: CONTROLLING RGB LIGHT

Activity:In this activity, students will connect a 4-pin RGB LED PCB to the RGB LED port on the
eduCOBOT shield. Using block-based programming, they will control the color of the RGB LED
by setting different combinations of true and false for each of the red, green, and blue pins. By
turning the pins on or off, they will create various colors through the combination of the RGB
components

This code makes an RGB


LED blink in different
colors by turning the
Red (Pin 13), Yellow (Pin
12), and Green (Pin 14)
lights on and off in a
loop, with a 1-second
pause between chang-
es.

In this setup, the positive


terminals of the Red, Green, and
Blue LEDs are connected to:
• Red LED: GPIO pin 13
• Green LED: GPIO pin 12
• Blue LED: GPIO pin 14

Learning Outcome: Students will understand how colors are created by con-
trolling the red, green, and blue components of an RGB LED using binary values
(true/false). They will learn basic logic and how to use programming to manipu-
late hardware, which reinforces concepts of digital control and color mixing. This
activity enhances their understanding of both programming and the physical
properties of light.

www.educobot.com 43
PROGRAMMING A SEVEN SEGMENT DISPLAY

Activity: In this activity, students will assemble a seven-segment display using MDF parts for
the frame and a 7-segment PCB. The display will be mounted onto the frame, and the
connections will be made using the eduCOBOT shield with the ESP32 mounted on it. Once the
assembly is complete, students will learn how to program different numbers to be displayed
on the seven-segment display. This task involves understanding the logic behind displaying
digits using the seven segments and writing code to control the display through the ESP32.

MATERIALS NEEDED

X1 X1 X1 X2

X1 X1 X2

STEP 1

STEP 2

www.educobot.com 44
STEP 3

X1 X2

STEP 4

www.educobot.com 45
www.educobot.com 46
Learning Outcome: Students will gain experience in assembling a seven-segment
display and learn the fundamentals of programming it using ESP32 and the
eduCOBOT shield. This activity helps students understand how digital displays
work and introduces them to basic concepts of binary encoding and microcon-
troller programming to control outputs. They will also learn how to write simple
programs to display numbers, fostering skills in both hardware assembly and cod-
ing.

www.educobot.com 47
BUZZER

Students learn to use buzzers to produce sound in their circuits,


understanding the principles of sound generation and how to
control buzzers through programming .

www.educobot.com 48
MOTOR MAGIC: CONTROLLING A DC MOTOR

Activity: Students will connect a DC motor to the eduCOBOT shield using the
ESP32 and program it with block-based coding to start, stop, and change its
direction, learning how programming controls motor movement.

The provided code demonstrates how to make the motor rotate forward.

Learning Outcome: Students will learn how to control a DC motor with the ESP32 and
eduCOBOT shield. They will understand the basic principles of motor control, including how to
manage speed and direction through programming. This activity enhances their understanding
of motors, circuits, and the role of microcontrollers in controlling hardware in robotics and auto-
mation projects.

www.educobot.com 49
MRP | 50 Pages |

Mumbai: 6th Floor, 288 Shiv Sadan S V Road,

Bandra West, Mumbai, Maharashtra 400050

www.educobot.com

[email protected]

+91-7278517851

Published By Kritrima Prajna Innovations Pvt Ltd, Mumbai

You might also like