About the Book This book Introduces students to the captivating realm of robotics. The book takes a learner-friendly, motivating, and hands-on approach. It combines theoretical understanding with real-world applications, while promoting creativity and problem-solving abilities in learners. Emphasizing a project-based learning methodology, the book provides a series of projects, each equipped with detailed instructions. These instructions can be effortlessly executed using the accompanying robotics hardware kit, complete with essential components and tools. The assembly and programming of the robotics system are facilitated through block-based coding and simulation environments, enabling the experiential learning journey.
Build Your Own Robots!
About Uolo Uolo partners with K-12 schools to bring technology-based learning programs. We believe pedagogy and technology must come together to deliver scalable learning experiences that generate measurable outcomes. Uolo is trusted by over 10,000 schools across India, South East Asia, and the Middle East.
hello@uolo.com �300
In partnership with Avishkaar
7
Singapore | Gurugram | Bengaluru | © 2024 Uolo EdTech Pvt. Ltd. All rights reserved.
RB_CB_Grade7_Cover.indd All Pages
22/12/23 5:43 PM
Maker Board Manual
Grade 7
Makerboard Session Plan 7th Guneet.indd 1
12/21/2023 6:36:25 PM
Contents 1
Exploring the Hardware Kit
1
2
Experiment 1: Flag Book
8
3
Experiment 2: Calculator
15
4
Experiment 3: Blinking of LEDs
22
5
Experiment 4: Guest Counter
30
6
Experiment 5: Automatic Night Lamp
37
7
Experiment 6: Wandering Sprite
44
8
Practice Problems
52
ii
Makerboard Session Plan 7th Guneet.indd 2
12/21/2023 6:36:26 PM
1
Exploring the Hardware Kit
Components of the Hardware Kit The Robotics kit contains the following components: 1. Maker Board
2. IR Sensor
3. LEDs
4. Jumper Cable
About Maker Board Maker Board is an easy-to-use electronic platform that enables you to make innovative projects. It consists of a 5×5 RGB LED matrix, a buzzer, four push buttons and six GPIO pins. You can bring your interesting ideas to life using the Maker Board by controlling electronic sensors and modules. You can make and play interactive games using the LED matrix and push buttons. You can make a piano, a snake game, a smart band, and many more.
1
Makerboard Session Plan 7th Guneet.indd 1
12/21/2023 6:36:27 PM
This board can be programmed using the Maker Studio coding interface, an easy-to-use Graphical User Interface (GUI) block-based coding platform.
Detailed Description of the Components 1. GPIO Pads
There are 4 PWM (Pulse Width Modulation) pins and 2 ADC (Analog to Digital Converter) pins, which makes a total of 6 GPIO (General Purpose Input Output) pins to interface with analog and digital sensors, LEDs, motors, etc., using jumper cables or alligator clips.
2. Power Pins
1 VCC pin—This pin outputs a regulated voltage of 3.3V. 2 GND pins—Power Output (0V).
1 VIN pin—The input voltage to the Maker Board when it’s using an external power source. 3. Programming LED Matrix
An LED matrix is a grid of addressable Red, Green, and Blue (RGB) LEDs arranged into rows and columns. In this, a total of 25 addressable RGB LEDs are used, which can be controlled individually. An LED matrix can be used to display animations or scroll text, numbers, patterns, etc. It can also be used to make different types of 8-bit games.
2
Makerboard Session Plan 7th Guneet.indd 2
12/21/2023 6:36:28 PM
4. Push Buttons
There are 4 on-board push buttons named A, S, W, and D to perform various operations like activate, deactivate, or move the LED in different directions depending upon the facing of the LEDs.
5. Buzzer
Buzzer is used to make different types of sounds at distinct frequencies and different beats per minute.
6. Reset Button
The reset button is used to restart any program uploaded in Maker Board.
7. Bluetooth Module (HC-05)
The bluetooth module is there to get you started with the possibilities of IOT and enable wireless control of various equipment connected to the Maker Board.
8. Standoff Holes
These holes are present to ensure that the Maker Board can be safely used on electrically conductive surfaces.
Exploring the Hardware Kit
Makerboard Session Plan 7th Guneet.indd 3
3
12/21/2023 6:36:28 PM
About Maker Studio Coding Interface The Maker Studio coding interface acts as an integrated development environment that enables you to write code for all of your projects. This code is then loaded into the Maker Board hardware. The Maker Studio coding interface consists of five major components: 1. Workspace area to drag blocks for the code you want to create. 2. T he Blocks panel contains all the blocks required to make your code. 3. T he Share Code option generates a link for the project, which you can share with anyone. 4. Buttons to save, compile, and burn your code. 5. Simulator Window to see the output.
4
Makerboard Session Plan 7th Guneet.indd 4
12/21/2023 6:36:29 PM
Burning Your Code into Maker Board Hardware Burning means loading your code into the Maker Board hardware. This process mainly has the following phases:
Arrange the blocks to create the code
Save the code
Compile the code
Burn the code
In case of error, recheck the code. Follow the steps given below to do so: 1. Connect the Maker Board to your PC/Laptop using a USB cable. 2. Drag and drop colour-coded blocks to create your code. 3. In the Name box, give your project a name. 4. Click on the Save button to save the code. 5. Click on the Compile button to compile your code.
Exploring the Hardware Kit
Makerboard Session Plan 7th Guneet.indd 5
5
12/21/2023 6:36:29 PM
6. Now, click on the Burn button to burn your code.
7. Click on the USB Connect option.
8. C lick on the Connect Device and a small window will appear, select your connected device and click on Connect.
6
Makerboard Session Plan 7th Guneet.indd 6
12/21/2023 6:36:31 PM
9. Now, click on Burn to burn your program into the Maker Board.
10. You have successfully loaded your code into the Maker Board hardware. Now, you can perform your experiment on the Maker Board.
Exploring the Hardware Kit
Makerboard Session Plan 7th Guneet.indd 7
7
12/21/2023 6:36:33 PM
2
Experiment 1: Flag Book
Objective Let’s make a Flag Book to understand the concept of animation.
Background 1. Animation
Animation is a method in which figures are manipulated to appear as moving images. In traditional animation, images are drawn or painted by hand on transparent celluloid sheets to be photographed and exhibited on film. Today, most animations are made with computer-generated imagery (CGI).
2. Delay A Delay function is used to suspend execution of a program for a particular time.
8
Makerboard Session Plan 7th Guneet.indd 8
12/21/2023 6:36:33 PM
Things Around Us Some of the real-life examples: 1. Cartoons
2. Mobile games
Let’s Code
1. Click on the Control category from the Blocks panel. 2. Drag the My Program block to the workspace to begin your program. The execution of all the blocks present inside this occurs step by step.
3. Drag the repeat while block from the Loops category and drop it inside the My Program block.
4. Drag the show LEDS block from the Display category and drop it inside the repeat while loop block.
Experiment 1: Flag Book
Makerboard Session Plan 7th Guneet.indd 9
9
12/21/2023 6:36:33 PM
5. S elect color from the Select color palette and click on squares of LED Matrix to change the colour, and set the Brightness to “100”.
6. Drag the wait block from the Control category and drop it below the show LEDS block. 7. T ype “1000” in the value box of the wait block. This will create a delay of 1 second in displaying the next step.
10
Makerboard Session Plan 7th Guneet.indd 10
12/21/2023 6:36:33 PM
8. Drag another show LEDS block and drop it below the wait block. 9. Select colour from the Select color palette and click on square boxes of LED Matrix to change the colour, and set the Brightness to “100”. 10. Drag another wait block and drop it below the show LEDS block and set its value to “1000”.
11. Now, again drag the show LEDS block and drop it below the wait block used above. 12. Select colour from Select color palette and click on square boxes of LED Matrix to change the colour, and set the Brightness to “100”.
Experiment 1: Flag Book
Makerboard Session Plan 7th Guneet.indd 11
11
12/21/2023 6:36:33 PM
13. Thereafter, drag the wait block, drop it below the show LEDS block and set its value to “1000”.
14. Drag the clear display block from the Display category and drop it below the wait block used above.
12
Makerboard Session Plan 7th Guneet.indd 12
12/21/2023 6:36:33 PM
15. Thereafter, drag and drop another wait block and set its value to “1000”.
Experiment 1: Flag Book
Makerboard Session Plan 7th Guneet.indd 13
13
12/21/2023 6:36:33 PM
16. Give a name to your program, save and then compile it. 17. Now the program is ready to burn on the Maker Board, and you can use your Flag Book. Note: The Maker Board should be connected to your computer through a USB for the experiment to run.
Scan QR code to view output
14
Makerboard Session Plan 7th Guneet.indd 14
12/21/2023 6:36:33 PM
3
Experiment 2: Calculator
Objective Let’s make the Maker Board do some math and make a calculator. We will perform +, −, *, / operations on numbers depending upon which W, A, S, D key is pressed by the user. We will use a Maker Board for displaying the numbers.
Background 1. Button-Click
• Button-click is an event that causes something to happen. • We can use these to tell programs under what circumstance(s) a particular action or set of actions should happen.
Some examples of events are as follows:
• Keyboard events (Detecting the press of a certain key). • As per input/output system, keyboard events are considered as Input and corresponding actions are considered as Output.
2. Conditionals
• Human beings (and other animals) make decisions all the time that affect their lives, for example: a.
“Should I eat one cookie or two?”
b.
“Should I play cricket or badminton?”
15
Makerboard Session Plan 7th Guneet.indd 15
12/21/2023 6:36:33 PM
• Similarly, to make decisions and carry out actions in our code we use Conditionals.
Condition 1 True Do this
False Do Something Else
3. If block
• Conditional blocks have conditions and the program’s flow is based on whether the condition is True or Not.
• We can implement conditions in coding using the if block. • The if block can be taken from the Control category. • If the condition is true, then the set of code is executed else nothing happens.
16
Makerboard Session Plan 7th Guneet.indd 16
12/21/2023 6:36:33 PM
Things Around Us Some of the real life examples are: 1. Mathematical game apps
2. Calculator app in phones
Let’s Code 1. Click on the Control category in the Blocks panel. 2. D rag and drop the My Program block to the workspace to begin your program. The execution of all the blocks present inside this occurs step by step.
3. Create 2 variables named “Num1” and “Num2”.
Experiment 2: Calculator
Makerboard Session Plan 7th Guneet.indd 17
17
12/21/2023 6:36:34 PM
4. Drag the set Num1 to and set Num2 to blocks from the Variables category, and drop these blocks to the workspace in the same order inside the My Program block. 5. S et the values of these variables to “10” and “5”, respectively by using the number block from the Math category.
6. Drag the repeat while block from the Loops category and drop it below the second set Num2 to block.
7. N ow, drag the If button block from the Button category and drop it inside the repeat while block. 8. Select “A” from the drop-down button.
9. Now, drag the show number block from the Display category and drop it inside the If button block.
18
Makerboard Session Plan 7th Guneet.indd 18
12/21/2023 6:36:34 PM
10. Select your favourite colour from the colour palette and set the brightness to “100”.
11. Now, drag the add operator block from the Math category and drop it in the show number block.
12. Now, insert the Num1 and Num2 variable blocks from the Variables category in the add operator block.
Experiment 2: Calculator
Makerboard Session Plan 7th Guneet.indd 19
19
12/21/2023 6:36:35 PM
13. Similarly, perform steps 5 to 10 again and change the value of the If button to “W” and change the “+” operation to “−”.
14. Similarly, assign the “×” operator to the “D” button.
20
Makerboard Session Plan 7th Guneet.indd 20
12/21/2023 6:36:35 PM
15. Similarly, assign the “÷” operator to the “S” button.
16. Give a name to your program, save and then compile it. 17. Now the program is ready to burn on the Maker Board, and you can use your calculator. Note: The Maker Board should be connected to your computer through a USB for the experiment to run.
Scan QR code to view output
Experiment 2: Calculator
Makerboard Session Plan 7th Guneet.indd 21
21
12/21/2023 6:36:36 PM
4
Experiment 3: Blinking of LEDs
Objective Let’s make a circuit to glow LEDs using different buttons.
Background 1. Circuit
• Electric circuits are paths for transmitting electric current or moving electricity.
• Such circuits allow electricity to be used to provide power to lights, appliances, and many other devices.
• Electricity can only flow around a complete circuit that has no gaps. • Current is the flow of electrical charge through materials.
2. Parts of the Circuit
• There is a power supply (the battery). • There should be no gaps anywhere, so that the electrical current can flow around the entire circuit.
• The wires to connect the positive and the negative ends of the battery.
Next, circuits need connectors. Connectors connect all the parts of •
the circuit and create the path or loop through which the electricity passes. Connectors are often made of wire or other metal.
• Another component is the load. This is the object being powered by the electricity in a circuit. It could be a light bulb, a TV, a fan, or any of the electronic gadgets we use every day.
22
Makerboard Session Plan 7th Guneet.indd 22
12/21/2023 6:36:36 PM
Things Around Us Some of the real-life examples are: 1. Digital sign boards
2. Road lamps
Circuit
• Connect the P0 pin of the Maker Board with the longer leg of LED 1 with a resistor in between.
• Connect the GND pin of the Maker Board with the shorter leg of LED 1. • Connect the P3 pin of the Maker Board with the longer leg of LED 2 with a resistor in between.
• Connect the GND pin of the Maker Board with the shorter leg of LED 2. LED 1
Experiment 3: Blinking of LEDs
Makerboard Session Plan 7th Guneet.indd 23
LED 2
23
12/21/2023 6:36:36 PM
Let’s Code 1. Click on the Control category from the Blocks panel. 2. Drag the My Program block to the workspace to begin your program. The execution of all the blocks present inside this occurs step by step.
3. Drag the configure pin block from the Hardware category, and drop it inside the My Program block. 4. Select the P0 pin as Output.
5. N ow, drag and drop another configure pin block, and select the P3 pin as Output.
24
Makerboard Session Plan 7th Guneet.indd 24
12/21/2023 6:36:36 PM
6. N ow, drag the repeat while block from the Loops category and drop it below the last configure pin block.
7. N ow, drag the If button block from the Button category and drop it inside the repeat while block. 8. Set the value of the button to “W” from the drop-down.
9. N ow, drag the show pattern block from the Display category and drop it inside the If button block.
Experiment 3: Blinking of LEDs
Makerboard Session Plan 7th Guneet.indd 25
25
12/21/2023 6:36:36 PM
10. Select any pattern of your choice for the LED Matrix from the drop-down.
11. Now, drag two output pin blocks from the Hardware category and drop them below the show pattern block. 12. For the first output pin block, select “P0” as “High”, so that LED 1 is turned on, and for the second block, select “P3” as “Low”, so that LED 2 is turned off.
26
Makerboard Session Plan 7th Guneet.indd 26
12/21/2023 6:36:36 PM
13. Now, drag and drop another If button block and set the value to “A”.
14. Now, drag another show pattern block and drop it inside the last If button block. 15. Select any pattern of your choice different from the one selected earlier.
Experiment 3: Blinking of LEDs
Makerboard Session Plan 7th Guneet.indd 27
27
12/21/2023 6:36:37 PM
16. Now, drag two output pin blocks and drop them below the show pattern block. 17. For the first output pin block, select “P0” as “Low”, so that LED 1 is turned off, and for the second output pin block, select “P3” as “High”, so that LED 2 is turned on.
28
Makerboard Session Plan 7th Guneet.indd 28
12/21/2023 6:36:37 PM
18. Give a name to your program, save and then compile it. 19. Now, the program is ready to burn on the Maker Board, and you can use your blinking LED. Note: The Maker Board should be connected to your computer through a USB for the experiment to run.
Scan QR code to view output
Experiment 3: Blinking of LEDs
Makerboard Session Plan 7th Guneet.indd 29
29
12/21/2023 6:36:37 PM
5
Experiment 4: Guest Counter
Objective Let’s make a guest counter using an IR sensor to be used for counting the guests.
Background 1. IR Sensor
• An infrared (IR) sensor is an electronic device that measures and detects infrared radiation in its surrounding environment.
• Anything that emits heat (everything that has a temperature above around five degrees Kelvin) gives off infrared radiation. However, it is invisible to the human eye.
• There are two types of infrared sensors: active and passive. Active
infrared sensors both emit and detect infrared radiation. When an object comes close to the sensor, the infrared light from the LED reflects off the object and is detected by the receiver.
• Passive infrared (PIR) sensors only detect infrared radiation and do not emit it from an LED.
30
Makerboard Session Plan 7th Guneet.indd 30
12/21/2023 6:36:37 PM
Things Around Us Some of the real-life examples: 1. Television remote
2. Automated drones
Circuit
• Connect the P0 of the Maker Board with the OUT pin of the IR sensor. • Connect the GND of the Maker Board with the GND pin of the IR sensor. • Connect the VCC of the Maker Board with VCC pin of IR sensor.
Let’s Code 1. Click on the Control category from the Blocks panel. 2. Drag the My Program block to the workspace to begin your program. The execution of all the blocks present inside this occurs step by step.
Experiment 4: Guest Counter
Makerboard Session Plan 7th Guneet.indd 31
31
12/21/2023 6:36:37 PM
3. Now, create a variable named “visitor”.
4. Add the set to block from the Variables category.
5. Drag the
block from the Math category and attach it to the
set visitor to block.
32
Makerboard Session Plan 7th Guneet.indd 32
12/21/2023 6:36:39 PM
6. Drag the configure pin from the Hardware category and drop it below the set visitor to block at “P0”. Set its direction to Input.
7. Drag the repeat while block from the Loops category and drop it below the configure pin block.
8. Drag an if block from the Control category to add the else part. 9. Attach the equal input block to the right of the if else block.
10. Drag the read status block from the Hardware category and drop it in the left part of the equal input block.
Experiment 4: Guest Counter
Makerboard Session Plan 7th Guneet.indd 33
33
12/21/2023 6:36:39 PM
11. Set
in the right part of the equal operator block from the
Math category.
12. Now, drag the set visitor to block from the Variables category and drop it as shown in the below figure. 13. Drag the
block from the Math category and
attach it to the right part of the set visitor to block. In place of “1” at the left side of the
block, insert the variable
visitor block from the Variables category.
34
Makerboard Session Plan 7th Guneet.indd 34
12/21/2023 6:36:40 PM
14. Now, drag the show number block from the Display category and drop it below the set visitor to block. 15. In place of “0” in the show number block, insert the variable visitor block. 16. Now, set the color to green from the colour palette and set the brightness to 100.
17. Now, drag the wait block from the Control category and set it to 1000 ms. 18. Drag the clear display block from the Display category.
Experiment 4: Guest Counter
Makerboard Session Plan 7th Guneet.indd 35
35
12/21/2023 6:36:40 PM
19. Drag the show pattern block from the Display category and drop it in the else condition. Set it to any pattern of your choice.
20. Give a name to your program, save and then compile it. 21. Now, the program is ready to burn on the Maker Board, and you can use the guest counter. Note: The Maker Board should be connected to your computer through a USB for the experiment to run.
Scan QR code to view output
36
Makerboard Session Plan 7th Guneet.indd 36
12/21/2023 6:36:40 PM
6
Experiment 5: Automatic Night Lamp
Objective Let’s make a night lamp to learn the concept of LDR Sensor.
Background 1. LDR Light-dependent resistors, LDRs or photoresistors are electronic components that are often used in electronic circuit designs where it is necessary to detect the presence or the level of light.
• LDRs are very different from other forms of resistors like carbon film resistors, metal oxide film resistors, metal film resistors, and the like that are widely used in other electronic designs. They are specifically designed for their light sensitivity and the change in resistance they cause.
• These electronic components can be described by a variety of
names from light-dependent resistor, LDR, photoresistor, or even photocell or photoconductor.
2. If Block
• Conditional blocks have conditions and the program’s flow is based on whether the condition is true or not.
• We can implement conditions in coding using the if blocks. 37
Makerboard Session Plan 7th Guneet.indd 37
12/21/2023 6:36:41 PM
• The if block can be taken from the Control category. • If the condition is true, then the set of code is executed, else nothing happens.
Things Around Us Some of the real-life examples are: 1. Solar street lighting
2. Burglar alarm circuit
Circuit
• Connect the P0 of the Maker Board with the OUT pin of the LDR sensor.
• Connect the GND of the Maker Board with the GND pin of the LDR sensor.
• Connect the VCC of the Maker Board with the VCC pin of the LDR sensor.
38
Makerboard Session Plan 7th Guneet.indd 38
12/21/2023 6:36:41 PM
Let’s Code 1. Click on the Control category from the Blocks panel. 2. Drag the My Program block to the workspace to begin your program. The execution of all the blocks present inside this occurs step by step.
3. Drag the configure pin block from the Hardware category and drop it inside the My Program block. The P0 pin for the Output is selected by default.
4. Drag the repeat while block from the Loops category and drop it below the configure pin block.
Experiment 5: Automatic Night Lamp
Makerboard Session Plan 7th Guneet.indd 39
39
12/21/2023 6:36:41 PM
5. Create a variable named “lightSensorValue”.
6. N ow, drag the set to block from the Variables category and drop it inside the repeat while block.
40
Makerboard Session Plan 7th Guneet.indd 40
12/21/2023 6:36:42 PM
7. Drag the read status block from the Hardware category and attach it to the right of the set to block. Define the set to block with the pin “P0” of the read status block.
8. Drag the if block from the Control category and drop it below the set to block. 9. Click on the settings icon of the if block. A pop-up box appears. 10. Drag the else condition to the pop-up box, and drop it below the if block. The else condition is executed when the condition is false. 11. Drag the equal operator block from the Control category and attach it to the right of the if block.
12. Now, insert the “lightSensorValue” variable block in the left part of the equal operator block.
Experiment 5: Automatic Night Lamp
Makerboard Session Plan 7th Guneet.indd 41
41
12/21/2023 6:36:42 PM
13. Drag the
block from the Math category and drop it to the
right part of the equal operator block.
14. Drag the clear display block from the Display category and drop it inside the do condition block.
42
Makerboard Session Plan 7th Guneet.indd 42
12/21/2023 6:36:42 PM
15. Drag the show LEDS block from the Display category and drop it inside the else condition. 16. Assign any pattern of your choice in the LED Matrix.
17. Give a name to your program, save and then compile it. 18. Now, the program is ready to burn on the Maker Board, and you can use the automatic night lamp. Note: The Maker Board should be connected to your computer through a USB for the experiment to run.
Scan QR code to view output
Experiment 5: Automatic Night Lamp
Makerboard Session Plan 7th Guneet.indd 43
43
12/21/2023 6:36:42 PM
7
Experiment 6: Wandering Sprite
Objective Let’s make a game with sprites on the display of the Maker Board. In this game, a sprite will be put in a cage and if it tries to escape out of the cage, the game gets over.
Background 1. Sprites
• Sprite is a two-dimensional bitmap that is a part of a larger scene. • Sprites can be static images or the animated ones. • Sprites have location in x and y coordinates. • The blocks of the Sprite category are used to perform various operations related to LEDs. Sprite is a type of element which helps to develop independent animated images, text, etc., that can then be combined in a larger animation or patterns. In this category, there are blocks that help to perform different operations using these sprites.
2. Sprite Movement
• You can create a sprite, basically a character displayed as light on the Maker Board.
• You can set its colour and brightness. • You can make it move in steps, change its direction, and set its position through x and y points.
44
Makerboard Session Plan 7th Guneet.indd 44
12/21/2023 6:36:42 PM
Things Around Us Some of the real-life examples are: Video games like Super Mario, Pac-Man, etc.
Let’s Code 1. Click on the Control category from the Blocks panel. 2. Drag the My Program block to begin your program. The execution of all the blocks present inside this occurs step by step.
3. Click on the Sprite category.
Experiment 6: Wandering Sprite
Makerboard Session Plan 7th Guneet.indd 45
45
12/21/2023 6:36:42 PM
4. C lick on the Create Sprite button to create a sprite variable with your name (for example, “Sahil”).
5. Drag the draw sprite block from the Sprite category and drop it inside the My Program block. 6. Type the values of the x and y coordinates as 2 and 2, respectively. 7. Choose the colour for the sprite and set the brightness to “100”. Note: By default, the sprite faces in the right direction.
8. Drag the repeat while block from the Loops category and drop it below the draw sprite block.
46
Makerboard Session Plan 7th Guneet.indd 46
12/21/2023 6:36:43 PM
9. Drag the If button block from the Button category and drop it inside the repeat while block to set the condition for button “W” to be pressed.
10. To ensure that the sprite moves up when the “W” key is pressed, follow the given steps:
• Drag the turn sprite block from the Sprite category and drop it inside the If button block.
• Turn the sprite in the “left” direction by selecting “90” degrees in the drop-down.
• Drag and drop the move sprite block below the turn sprite block to move the sprite by “1” step.
• Drag and drop the turn sprite block below the move sprite block. • Turn the sprite in the right direction by ”90” degrees by
selecting “right” for the direction and “90” for the degrees in the drop-down.
Experiment 6: Wandering Sprite
Makerboard Session Plan 7th Guneet.indd 47
47
12/21/2023 6:36:43 PM
11. Similarly, set actions based on different events (pressing the keys A or S or D) by using the If button blocks. It will allow the user to move in the left direction, downwards, and in the right direction.
12. Drag the if block from the Control category and drop it below the last If button block. 13. Click on the settings icon of the if block. A pop-up box appears. 14. Drag the else if block and drop it below the if block three times in the pop-up box. 15. Now, let’s add conditions to not allow the sprite to move out of the cage. For this, set a log to restrict the sprite to not touch the top
48
Makerboard Session Plan 7th Guneet.indd 48
12/21/2023 6:36:44 PM
edge of the LED Matrix. Drag the touching edge block from the Sprite category and attach it to the right of the if block. 16. Drag the show scrolling text block from the Display category and drop it to the right of the do block. 17. Type “Game Over” for the text part of the block and set the colour to green from the colour palette and set the Brightness to “100”. If the sprite touches the top edge, a scrolling text “Game Over” will be displayed.
Experiment 6: Wandering Sprite
Makerboard Session Plan 7th Guneet.indd 49
49
12/21/2023 6:36:44 PM
18. Similarly, set conditions around all edges of the LED Matrix.
50
Makerboard Session Plan 7th Guneet.indd 50
12/21/2023 6:36:44 PM
19. Give a name to your program, save and then compile it. 20. Now the program is ready to burn on the Maker Board, and you can play wandering sprite. Note: The Maker Board should be connected to your computer through a USB for the experiment to run.
Scan QR code to view output
Experiment 6: Wandering Sprite
Makerboard Session Plan 7th Guneet.indd 51
51
12/21/2023 6:36:44 PM
8
Practice Problems
1. Display Traffic Signs on LED display. 2. Find the square of a number if the key A is pressed by the user on the keyboard, else find the cube of a number if key D is pressed. 3. For a triangle, find its perimeter if key A is pressed on the keyboard, find its area if key W is pressed, and find its height if the key D is pressed. 4. Make a circuit for blinking the LED with different colours and patterns each time a key is pressed on the keyboard. 5. Make 2 LEDs blink alternatively using the Maker Board. 6. Make a project to detect an item that should play a tone using the Maker Board buzzer on every detection. 7. Show different patterns on different values of the LDR sensor like (0 or 1). 8. Create a sprite to move just up, down, left, and right. 9. Move the sprite in all directions by two steps at a time. 10. Make a program to display your name in the LED Matrix in your favourite colour.
52
Makerboard Session Plan 7th Guneet.indd 52
12/21/2023 6:36:44 PM
About the Book This book introduces students to the captivating realm of
robotics. The book takes a learner-friendly, motivating, and hands-on approach. It combines theoretical understanding with real-world applications, while promoting creativity and problem-solving abilities in learners. Emphasizing a project-based learning methodology, the book provides a series of projects, each equipped with detailed instructions. These instructions can be effortlessly executed using the accompanying robotics hardware kit, complete with essential components and tools. The assembly and programming of the robotics system are facilitated through block-based coding and simulation environments, enabling the experiential learning journey.
Build Your Own Robots!
About Uolo Uolo partners with K-12 schools to bring technology-based learning programs. We believe pedagogy and technology must come together to deliver scalable learning experiences that generate measurable outcomes. Uolo is trusted by over 10,000 schools across India, South East Asia, and the Middle East.
hello@uolo.com �300
In partnership with Avishkaar
7
Singapore | Gurugram | Bengaluru | © 2024 Uolo EdTech Pvt. Ltd. All rights reserved.
RB_CB_Grade7_Cover.indd All Pages
26/12/23 4:13 PM