ROBOTICS PLUS
Tekie
Robotics Plus
Acknowledgements
Academic Authors: Neha Verma, Ayushi Jain, Anuj Gupta, Simran Singh
Creative Directors: Bhavna Tripathi, Mangal Singh Rana, Satish
Book Production: Rakesh Kumar Singh, Sanjay Kumar Goel
Project Lead: Jatinder Kaur
VP, Learning: Abhishek Bhatnagar
All products and brand names used in this book are trademarks, registered trademarks or trade names of their respective owners.
© Uolo EdTech Private Limited
First impression 2024
Second impression 2025
This book is sold subject to the condition that it shall not by way of trade or otherwise, be lent, resold, hired out, or otherwise circulated without the publisher’s prior written consent in any form of binding or cover other than that in which it is published and without a similar condition including this condition being imposed on the subsequent purchaser and without limiting the rights under copyright reserved above, no part of this publication may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of both the copyright owner and the above-mentioned publisher of this book.
Book Title: Tekie Robotics Plus 4
ISBN: 978-81-983027-2-4
Published by Uolo EdTech Private Limited
Corporate Office Address:
85, Sector 44, Gurugram, Haryana 122003
CIN: U74999DL2017PTC322986
Illustrations and images: www.shutterstock.com, www.stock.adobe.com and www.freepik.com
All suggested use of the internet should be under adult supervision.
Robotics
What is Robotics?
Robotics is the study and creation of robots. Robots are machines that can perform various tasks. They are built using parts like metal, wires, and circuits, and programmed with special instructions to tell them what to do.
Some robots look like humans, while others are designed to work in specific places, like factories, hospitals, or even outer space! For example, a robot might assemble cars in a factory or explore the surface of Mars where humans cannot go easily.
Robots can sense their surroundings using sensors. These sensors act like the robot’s eyes, ears, and hands, helping it understand distance, temperature, or touch. Once the robot knows its surroundings, it can make decisions based on its programming.
The field of robotics combines science, technology, engineering, and mathematics (STEM) to solve problems and create amazing inventions. It is an exciting way to bring creativity and technology together!
Components of Robots
Robots are made up of different parts that work together to help them move, sense, and do tasks. These parts are grouped into three main types: mechanical, electronic, and coding interface. Let us learn about them.
Mechanical Parts
Mechanical parts are like the bones and muscles of a robot. They include wheels, gears, motors, and arms. These parts help the robot move, pick up things, or spin. For example, wheels let a robot roll around, and motors make robots move by turning wheels, spinning gears, or lifting arms.
Electronic Parts
The electronic parts are like the robot’s brain and nerves. They include circuits, sensors, and batteries. These parts help the robot think and sense its surroundings. Sensors act like eyes, ears, or even a nose for the robot, allowing it to detect light, sound, or obstacles. The battery gives the robot the power it needs to work.
Coding Interface
Coding is how we talk to robots and tell them what to do. Coding means writing instructions for them to follow. The coding interface is the program or app used to give these instructions. Once coded, the robot can move in a specific direction, stop when it sees something, or even dance.
By combining these three parts—mechanical, electronic, and coding—robots come to life and do amazing things.
Robotics Advanced Kit
About Robotics Advanced Kit 1
The Robotics Advanced Kit (RAK) is a comprehensive tool for young innovators who are curious to explore the subject of robotics. It features the Robotics FULL 2.0 BLE Brain, which powers the kit’s projects. The kit also includes exciting projects, thereby encouraging creativity and problem-solving in students. With hands-on components and coding opportunities, RAK makes robotics fun-filled and accessible, inspiring students to think critically about robotics and innovate its programming. Let us explore its various components.
Electronics Parts
9.
• Long Connecting Cable × 1
• USB Cable × 1
Construction Parts
Plastic Parts
Metal Parts
A comprehensive metal design system allows you to make from easy to complex mechanical bot designs.
The Motors
Let's understand how the motors work.
Robots move in different directions by the combination of the rotation from each wheel. For example: Robot Movement
Basics of Building
Let’s understand some basics of building:
Tightening Screws:
Tightening Axle Lock:
Tighten (Rotate Clockwise)
Tighten (Rotate Clockwise)
Tightening a Motor to a Plate:
Loosen (Rotate Anti-Clockwise)
Loosen (Rotate Anti-Clockwise)
About the Brain
Robotics FULL 2.0 BLE Brain
Let’s understand how the Full 2.0 Brain works.
Let’s understand how the Full 2.0 BLE Brain works.
the Ultrasonic Sensor to the brain.
Building a Remote Control Car
1 Insert the axle lock and the 3.5” axles into the high-speed motors, as shown.
2 After attaching the axles to both motors, screw them to the chassis using the 6mm bolts, as shown.
3 Repeat the previous step to attach the second high-speed motor to the other side of the chassis.
4 Add a filler to the axle, then add the wheel and lastly add another axle lock. Do this for both axles.
5 Screw a 7.5 inch rectangular plate using 12 mm bolts with the first two holes of both the right and left sides of the chassis
6 Attach two U-Beams, one on top of the other using 6mm bolts. Then, screw the Caster wheel to both U-Beams using 2 K-nuts and 6mm bolts, as shown below.
7 Attach the previous assembly to the chassis as shown, with 12 mm bolts.
8 Screw the Battery at the bottom of the chassis using 6mm bolts as shown.
9
Screw the Brain to the chassis using 6mm bolts. Connect the Brain to the Battery using Male to Male DC Jack wire.
About Coding Interface
Connect the left motor to the "M4" port and the right motor to the "M3" port of the Brain using the short connecting cables.
The coding interface serves as the central hub for your kit, acting as an Integrated Development Environment (IDE) that enables you to write code for all of your experiments. This code is then transferred to the hardware.
The coding interface consists of the following components:
1. Workspace Area: This is where you drag blocks for the code you want to write.
2. Blocks Panel: The blocks from the Blocks Panel help make your code.
3. Share Code: The Share Code option in the File drop-down menu generates a link for the project to share with others.
4. Control Buttons: The Control Buttons consist of Save, Compile, and Connect buttons.
• Save Button: The Save button helps save your code.
• Compile Button: The Compile button helps compile your code.
• Connect Button: The Connect button helps burn your code to the hardware.
5. Arena: This is where you can see the output.
6. Buttons: The buttons help move the bot front, back, left, or right. The buttons also help rotate the bot clockwise and anticlockwise in the virtual arena.
7. Play Button: The Play button runs the code.
8. Reset Button: The Reset button resets the arena.
Burning Your Code
Burning means loading your code into the hardware. This process, mainly, has the phases as shown:
Arrange the blocks to create the code Save the code
Compile the code Burn the code
In case of error, recheck the code.
1. Once you have completed your experiment, connect the bot to a PC/Laptop using a USB cable or Bluetooth.
2. Save and compile your code by clicking on the Save and Compile buttons, respectively.
3. Now, click on Connect.
4. Click on the USB Connect option or the BLE Connect (Bluetooth) option.
5. Click on the Connect Device button, and a small window will appear. Thereafter, select your connected device, and then click on Connect.
6. Now click on Burn to write your program into the bot.
7. You have successfully written your code into the hardware. Now you can experiment on the bot.
Experiment 1: Bot Movements Using Motor Control 2
Objective
Learn how to control a robot by making it move forward, backwards, left, and right using motors. This helps in understanding the basics of how robots work and is a great start to learning robotics!
Background
In this experiment, the concept of time delay is used to suspend the execution of a program for a particular time. Let us understand this by looking at the process of cooking a dish in the microwave.
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.
3. Drag the Move Motor at the block from the Motor category and drop it inside the My Program block.
4. Configure the motor at Port4 (Advance) as clockwise by selecting the Clockwise option from the drop-down.
5. Select the speed of the motor as High, Medium, or Slow from the Speed drop-down.
6. Similarly, drag another Move Motor at the block and drop it below the previous block.
7. Select the Port3 (Advance) option from the drop-down menu.
8. Configure the motor at Port3 as anticlockwise by selecting the Anticlockwise option from the drop-down menu.
9. Select the speed of your choice from the Speed drop-down menu.
10. Drag the Time block from the Control category and drop it below the second Move Motor at the block.
11. Type "2000" in the value box of the block. This will allow the forward movement of the motor for 2000 milliseconds or 2 seconds.
12. To move the bot forward for infinite time, use the Repeat while block from the Loops category with the Move Motor at blocks.
13. Similarly, to turn the bot backwards, configure the motor at Port4 as Anticlockwise and Port3 as Clockwise by making the respective selections from the drop-down menus.
14. To move the bot backwards for infinite time, use the Repeat while block from the Loops category with the Move Motor at blocks.
15. To turn the bot to the right, configure the motor at Port4 and Port3 as Anticlockwise and add a delay of 1100 ms by adding a Time block.
16. To turn the bot to the left, configure the motor at Port4 as Clockwise and Port3 as Clockwise too.
Note: When you turn the bot left or right, the time value may vary from system to system. Therefore, to make a 90 degree turn, you can configure the time value accordingly.
17. Give a name to your program, save it, and then compile it.
18. Now, the program is ready to burn on the RAK.
Scan QR code to view output
A. Tick () the Correct Option.
1 Which block is used to start your program?
a My Program
c Begin Program
b Start Program
d Your Program
2 The execution of all the blocks in a code occur .
a timely
c in a loop
b step by step
d with delay
3 In which direction should the motors rotate to turn the robot to the left?
a Both motors clockwise
c Left motor clockwise, right motor anticlockwise
B. Answer the Following.
1 What is the use of the “move robot in” block?
b Both motors anticlockwise
d Left motor anticlockwise, right motor clockwise
2 What is the use of the “Repeat while” block?
C. Apply Your Learning.
1 Where can you see the applications of a moving robot in daily life?
2 What will happen in your project if you don’t use the “Repeat while” block?
3 Experiment 2: Draw Shapes
Objective
Make your robot move to create shapes like squares and rectangles to practice its movements.
Background
This experiment is based on the concept of time delay as discussed in the previous experiment.
Let’s Build
• Attach a pen to the RC bot as shown here, using zip-ties.
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.
3. Drag the set pen block from the Robot category and drop it inside the My Program block.
4. This block is set to ON by default. Select any colour of your choice from the colour box.
5. Drag and drop two Move Motor at the blocks from the Motor category. Configure the first Move Motor at block at Port4 (Advance) as clockwise by selecting the Clockwise option from the drop-down.
6. For the second Move Motor at block, select Port3 (Advance) from the drop-down menu. Configure this block as anticlockwise by selecting the Anticlockwise option from the drop-down.
7. Drag the Time block from the Control category and drop it below the second Move Motor at block. Type "4000" in the value box of the block. This will allow the forward movement of the motor for 4000 milliseconds or 4 seconds.
8. Now, drag two Move Motor at the blocks for Port4 (Advance) and Port3 (Advance) to Stop the two motors. This will instruct the bot to stop.
9. Now, drag and drop the Time block to stop the bot for "1000" milliseconds.
10. Now, configure both motors in Anticlockwise direction. Also, drag and drop the Time block to move the bot right for a specified time.
11. Post taking a right, stop the bot for 1000 milliseconds.
Note: When you turn the bot left or right, the time value may vary from system to system. Therefore, to make a 90 degree turn, you can configure the time value accordingly.
12. Repeat the above steps 5 to 11 (to move the bot forward stop, turn right, and then stop again) till you create all four sides of the square shape. The final code should look like this:
13. Give a name to your program, save it, and then compile it.
14. Now, the program is ready to burn on the RAK.
Scan QR code to view output
A. Tick () the Correct Option.
1 Which block is used to add a delay in the movement of the robot?
a move robot in b stop robot for time
c turn robot in d stop robot
2 How many times will your robot move and take turns to make a square?
a 4 b 5
c 6
3 What is the purpose of the “set pen” block?
a To draw shapes
c To stop the robot
B. Answer the Following.
1 What is the default value of the “set pen” block?
7
b To make the robot move
d To turn the robot
2 Which block is required to stop the motors?
C. Apply Your Learning.
1 Can you draw any other shape with the robot? If possible, write the code.
2 Recreate the program using the “Repeat while” block and test it on the RAK.
4 Experiment 3: Hand Follower/Repeller
Objective
Students will design a bot that has two infrared (IR) sensors to detect how close a hand is to the robot. When the first IR sensor detects a hand nearby, the bot will move forward to follow it. If the second IR sensor detects a hand approaching it, the bot will move backwards to move away from it.
Let’s Build
• Attach two IR sensors in the front of the RAK RC Car using 6mm bolts.
• Connect the left IR sensor to the S4 port of the Brain and the right IR sensor to the S5 port of the Brain.
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. Click on the Variables category.
4. Click on the Create variable button. A pop-up box appears asking you to enter a new variable name.
• Enter a suitable variable name, let us say “IR_left”, to store the data of the IR sensor value received from the left sensor.
• Click on the OK button.
5. Drag the set to block from the Variables category and drop it inside the My Program block.
6. Then, drag the number block from the Math category and attach it to the set to block.
7. Similarly, click on the Variables category and create another variable “IR_right”, to store the data of the IR sensor value received from the right sensor.
8. Drag and drop another set to block below the previous set to block. Then, drag the number block from the Math category and attach it to the set to block.
9. Drag the Repeat while block from the Loops category and drop it below the set to block to begin the infinite loop. The Repeat while block is set to true by default.
10. Drag the set to block from the Variables category and drop it inside the Repeat while block. From the drop-down of the set to block, select ‘IR_left’.
11. Drag another set to block and drop it below the previous set to block. The second set to block should have the value ‘IR_right’.
12. Drag the Read IR Sensor at block from the Sensor category and attach this block to the set IR_left to block. Select the option ‘Port4(Advance)’ from the drop-down of the Read IR Sensor at the block.
13. Similarly, drag another Read IR Sensor at block and attach this block to the set IR_right to block. From the drop-down of the second Read IR Sensor at block, select option ‘Port5 (Advance)’.
14. Drag the if block from the Control category and drop it below the set to block.
15. Click on the settings icon of the if block. A pop-up box appears.
16. Drag the else if and else blocks and place them below the if block in the pop-up box (refer to the given image).
17. Again, click on the settings icon to hide the pop-up box.
18. Drag the equal operator block from the Control category and attach it to the right of the if block.
19. Select the ”>“ option from the drop-down of the equal operator block.
20. Drag the IR_left block from the Variables category and drop it in the left part of the greater than operator block.
21. Now, drag the number block from the Math category and drop it in the right part of the greater than operator block. Type “800” for the text part of the number block. Now, if the value of the IR_left variable is greater than 800, i.e., the left touch sensor is pressed, then blocks under the if block will be executed, else the blocks under the else block will be executed.
22. Drag and drop Move Motor at the block from the Motor category in the do part of the if block.
23. Select option “Port4 (Advance)” from the drop-down of this block.
24. Configure the motor at this port to Clockwise. The Speed of the motor is set to High by default.
25. Similarly, drag and drop another Move Motor at the block and select “Port3 (Advance)” from the drop-down of the block. Configure the motor at this port to Anticlockwise. This will move the bot in the forward direction.
26. Now, drag the Time block from the Control category and drop it below the second Move Motor at the block. The block is set to 1000 milliseconds (ms), by default. This will allow the forward movement of the motor for 1000 milliseconds or 1 second.
27. Now, drag the equal operator block from the Control category and attach it to the right of the else if block.
28. Select the ”>“ option from the drop-down of the equal operator block.
29. Drag the IR_right block from the Variables category and drop it in the left part of the greater than operator block.
30. Now, drag the number block from the Math category and drop it in the right part of the greater than operator block. Type “800” for the text part of the number block. Now, if the value of the IR_right variable is greater than 800, i.e., the right touch sensor is pressed, then blocks under the else if block will be executed.
31. Similar to the steps above for Move Motor at blocks, drag two more Move Motor at blocks and drop them in the do part of the else if block. Configure the motor at Port4 (Advance) as Anticlockwise and the motor at Port3 (Advance) as Clockwise.
32. Drag the Time block from the Control category and drop it below the last Move Motor at the block. The block is set to 1000 milliseconds, by default. This will move the bot backwards for 1000 milliseconds or 1 second.
33. Now, drag and drop two Move Motor at blocks in the else block. Configure the motors at Port4 (Advance) and Port3 (Advance) to Stop.
34. Give a name to your program, save it, and then compile it.
35. Now, the program is ready to burn on the RAK.
Scan QR code to view output
Exercise
A. Tick () the Correct Option.
1 As per the experiment performed, which of the following sensors is used to detect how close a hand is to the bot?
a IR Sensor b Ultrasonic Sensor
c Touch Sensor d None of these
2 To what value are the sensor variables (left and right sensors) initialised?
a 0 b 1
c 2 d –1
B. Answer the Following.
1 How does the bot use its two infrared (IR) sensors to interact with a nearby hand, and what actions does it take in response to each sensor?
2 What will happen if both the left and the right IR sensors do not detect a hand nearby?
C. Apply Your Learning.
1 Provide a real-life example of a bot that utilises proximity detection to either follow or repel objects.
2 In what ways can bots that follow or repel, based on proximity detection, enhance safety in public environments?
5 Experiment 4: Reverse Parking Assistant
Objective
To design a bot equipped with an ultrasonic sensor that assists in parking by detecting nearby objects and alerting when it gets too close, simulating real-world parking aid systems used in vehicles.
Let’s Build
• Attach the ultrasonic sensor in the front of the RAK RC Car’s chassis using 6mm bolts.
• Connect the sensor to S4 port of the Brain.
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. The Repeat while block is set to true, by default.
4. Click on the Variables category.
5. Click on the Create variable button. A pop-up box appears asking you to enter a New variable name.
• Enter a suitable variable name, let’s say ‘ultrasonic’ to store the data of the ultrasonic sensor value received from the sensor.
• Click on the OK button.
6. Drag the set to block from the Variables category and drop it inside the Repeat while block.
7. Drag the Read Ultrasonic Sensor at block from the Sensor category and attach it to the set to block. Configure the Read Ultrasonic Sensor at the block to Port4.
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 three else if blocks and an else block and drop them below the if block in the popup box. (refer to the given image).
11. Again, click on the settings icon to hide the pop-up box.
12. Drag the and block from the Control category and attach it to the if block.
13. Now, drag two equal operator blocks from the Control category. Drop one block to the left of the and block and drop the second block to its right.
14. Select the ‘>’ operator from the drop-down menu of the left equal operator block and select the ‘<’ operator from the drop-down menu of the right equal operator block.
15. Drag the ultrasonic block from the Variables category and drop it in the left part of the greater than operator block.
16. Click on the Math category and drag and drop the number block in the right part of the greater than operator block. Type "30" in the number block.
17. Similarly, drag the ultrasonic block and drop it in the left part of the less than operator block.
18. Drag the number block to the right part of the less than operator block. Type ‘‘40’’ in place of ‘‘0’’.
19. Drag the Print Data block from the Display category and drop it in the do part of the if block.
20. Drag the empty Text Box block from the Text category and drop it inside the Print Data block. Type “Object detected” in the Text Box block.
21. Drag the Move Motor at the block from the Motor category and drop it below the Print Data block. Select the option “Port 4 (Advance)” from the drop-down of this block.
22. Select option Anticlockwise from the drop-down of this block. The motor of this port is set to High speed, by default.
23. Similarly, drag and drop another Move Motor at the block. Select option “Port 3 (Advance)” from the drop-down of this block and configure the motor of this port to Clockwise. This will move the bot in the backward direction.
24. Similar to the condition defined for the if block, define the condition for the else if block. Attach the and block with the else if block. Drag and drop the equal operator block to the left and right of the and block. Select the ‘>’ option in the drop-down menu of the equal operator block to the left of the and block and the ‘<’ option in the drop-down menu of the equal operator block to its right.
25. Now, drag and drop the ultrasonic block to the left of both the greater than and less than blocks.
26. Also, drag and drop the number blocks to the right of both the greater than and less than blocks.
27. Type “20” and “30” in the left and right number blocks, respectively.
28. Drag and drop the Print Data block in the do part of the if block. Drag the empty Text Box block from the Text category and drop it inside the Print Data block. Type “Object getting closer” in the Text Box block.
29. Drag two Move Motor at the blocks and drop them below the Print Data block. Configure the motor at Port4 (Advance) as Anticlockwise and the motor at Port3 (Advance) as Clockwise to move the bot in the backward direction. Set the Speed for both motors as Medium.
30. Now, similar to the conditions for the if and first else if blocks, set the condition for the second else if block. Type “Object very close” in the Print Data block. If the value of the ultrasonic variable is greater than ‘10’ and less than ‘20’, then move the bot in the backward direction by configuring the motor at Port4 (Advance) as Anticlockwise and Port3 (Advance) as Clockwise. Set the Speed of both the motors to Slow.
31. Similarly, set the condition for the third else if block. Type “Bot stopped” in the Print Data block. If the value of the ultrasonic variable is greater than “0” and less than “10”, then stop the bot by configuring the motors at Port4 (Advance) and Port3 (Advance) to Stop.
32. If no object is detected, then the bot will keep on moving.
33. Name your program, save it, and then compile it.
34. Now, the program is ready to burn on the ABot.
Scan QR code to view output
A. Tick () the Correct Option.
1 Which of the following blocks is used to display a message?
a Move Motor at
c Print Data
b Display Data
d Repeat while
2 The if block executes some statements in its do part if the condition is .
a True
c Null
b False
d None of these
3 Which of the following sensors is used to conduct the experiment?
a IR Sensor
c Ultrasonic Sensor
B. Fill in the blanks.
b Touch Sensor
d Temperature Sensor
1 The “Print Data” block belongs to the category.
2 We the program before burning the program on the RAK.
3 If the ultrasonic sensor’s value varies between 30 to 40, then the motor .
4 The set to block belongs to the category.
C. Apply Your Learning.
1 How does the reverse parking assistant bot help a driver avoid obstacles while reversing?
2 Name any two devices a self-driving car might use to sense its surroundings while reversing.
6 Experiment 5: Object Avoider
Objective
To create an object detection bot and teach it how to move around by itself. This will help the bot avoid obstacles and choose path on its own in real time.
Things Around Us
The concept of object avoider is mostly used in the automatic vacuum cleaners.
Let’s Build
• Attach the IR sensor to the front on holes 1 and 2 in row 4 of the chassis of the RC car.
• Connect the IR sensor to Port S5 of the Brain.
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.
3. Drag the Repeat while block from the Loops category and drop inside the My Program block to begin the infinite loop. This block is set to true by default.
4. Click on the Variables category.
5. Click on the Create Variable button. A pop-up box appears asking you to enter a New variable name.
• Enter a suitable variable name, let’s say "IR_Sensor" to store the data of the IR sensor value received from the sensor.
• Click on the OK button.
6. Drag the set to block from the Variables category and drop it inside the Repeat while block.
7. Then drag the Read IR Sensor at the block from the Sensor category and attach this block with the set to block.
8. Select the "Port5 (Advance) " option from the drop-down menu of the Read IR Sensor at the block.
9. Drag the if block from the Control category and drop it below the set to block.
10. Click on the settings icon of the if block. A pop-up box appears.
11. Drag the else block and drop it below the if block in the pop-up box.
12. Click on the settings icon again to close the pop-up box.
13. Drag the equal operator block from the Control category and attach it to the right of the if block.
14. Select the '>' option from the drop-down of the equal operator block.
15. Drag the IR_Sensor block from the Variables category and drop it in the left part of the greater than operator block.
16. Now, drag the number block from the Math category and drop it in the right part of the greater than operator block. Type "400" for the text part of the number block.
17. If the value of the IR_Sensor variable is greater than 400, i.e., the IR Sensor senses the object, then blocks under the if block will be executed, else the blocks under the else block will be executed.
18. Drag the Print Data block from the Display category and drop it inside the do condition block.
19. Drag a Text Box block from the Text category and drop it inside the blank area of the Print Data block. Type “Object Detected” in the Text Box block.
20. Now, drag two Move Motor at blocks from the Motor category for Port4 (Advance) and Port3 (Advance) to Stop the two motors. This will instruct the bot to stop.
21. Drag and drop the Time block from the Control category. This will instruct the bot to stop for 1000 milliseconds or 1 second when the IR sensor detects an object.
22. Drag and drop two Move Motor at blocks below the Time block.
23. Configure the motor at Port4 (Advance) as anticlockwise by selecting the Anticlockwise option from the drop-down. Select the speed of the motor as Medium.
24. Similarly, select the "Port3 (Advance)" option from the drop-down of the second Move Motor at the block.
25. Configure the motor at Port3 (Advance) as clockwise by selecting the Clockwise option from the drop-down. Select the speed of the motor as Medium. This will move both the motors backwards.
26. Also, drag and drop the Time block below the Move Motor at the block.
27. Then, instruct the bot to Stop again for "1000" ms.
28. Similarly, instruct the bot to move left for "1000" ms by configuring the motor at Port4 (Advance) and Port3 (Advance) as Clockwise. You can turn the bot in any direction as you wish.
29. Thereafter, Stop the bot for "1000" ms.
30. In the else condition, instruct the bot to move forward as long as the IR sensor does not detect any object.
31. Give a name to your program, save it, and then compile it.
32. Now, the program is ready to burn on the RAK.
A. Tick () the Correct Option.
1 Which block is used to set the initial value of a variable?
a Read variable b set to
c create variable
d Repeat while
2 The blocks related to the sensor blocks are found in which category?
a Robot
c Variable
b Control
d Sensor
3 Which icon should be clicked to add the “else blocks” with the “if” block?
a settings
c control
B. Answer the Following.
1 What is the use of the “greater than” block?
b equal
d sensor
2 What is the purpose of the “Print Data” block?
C. Apply Your Learning.
1 How can you display a message in your program?
2 Discuss any one application of the object avoider in real-life.
Experiment 6: Dancer Car 7
Objective
Utilising touch sensors, students will program their bots to exhibit distinct dance moves triggered by sequential touch inputs, providing a playful introduction to programming logic and interactive robot behaviours.
Let’s Build
1 Attach the Axle Lock and the 3.5” Axles to the high-speed Motors, as shown.
3 Repeat the previous step to attach the second high-speed Motor to the other side of the Chassis.
2 After attaching the Axles to both Motors, screw them to the Chassis using the 6mm Bolts, as shown.
4 Add a Filler to the Axle, then add the Wheel and lastly add another Axle Lock. Do this for both the Axles.
5 Connect a 7.5” Rectangular plate to the Chassis using K-Nuts and 12 mm Bolts as shown.
6 Connect a 2.5” L-Channel to the 7.5” Rectangular plate using K-Nuts and 12 mm Bolts as shown.
7 Connect a 2.5” U-Beam to the 2.5” L-Channel using Nuts and Bolts.
8 Screw the Caster wheel to the 2.5” U-Beam using Nuts and Bolts.
9
Connect the battery to the Chassis using Nuts and Bolts.
10 Connect the Touch Sensor to the Chassis using a 6mm Bolt.
11 Connect the FULL 2.0 brain to the Chassis using Nuts and Bolts.
12 Connect the Touch sensor to Port S5 of the Brain. Finally, the assembly looks like the one shown.
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, in sequence.
3. Click on the Variables category.
4. Click on the Create Variable button. A pop-up box appears asking you to create a New variable name.
• Enter a suitable variable name, let’s say 'count' to store the number of times the touch sensor was pressed.
• Click on the OK button.
5. Drag the set to block from the Variables category and drop it inside the My Program block.
6. Then drag the number block from the Math category and attach this block with the set to block.
7. Drag the Repeat while block from the Loops category and drop it below the set to block to begin the infinite loop. The Repeat while block is set to true by default.
8. Now, similarly, create another variable named "Touch_Sensor" to store the data of the touch sensor value received from the sensor.
9. Drag the set to block from the Variables category and drop it inside the Repeat while block.
10. Select the "Touch_Sensor" variable name from the drop-down menu.
11. Then, drag the Read touch Sensor at the block from the Sensor category and attach it with the set to block. Configure the Read touch Sensor at the block to Port5 (Advance).
12. Drag the if block from the Control category and drop it below the set to block.
13. Click on the settings icon of the if block. A pop-up box appears.
14. Drag the else block and drop it below the if block in the pop-up box.
15. Click on the settings icon again to close the pop-up box.
16. Drag the equal operator block from the Control category and attach it to the right of the if block.
17. Select the '>' option from the drop-down menu of the equal operator block.
18. Drag the Touch_Sensor block from the Variables category and drop it in the left part of the greater than operator block.
19. Now, drag the number block from the Math category and drop it in the right part of the greater than operator block. Type "500" for the text part of the number block. Now, if the value of the Touch_Sensor variable is greater than 500, i.e., the touch sensor is pressed, then blocks under the if block will be executed, else the blocks under the else block will be executed.
20. Drag the set to block from the Variables category and drop it below the second set to block. Select the count variable from the drop-down menu of the set to block.
22. Drag the add operator block from the Math category and attach it with the set to block.
23. Now, drag the count variable block and drop it inside the left part of the add operator block. This adds a sum of "1" to the variable count every time the touch sensor is pressed.
24. Now, drag the if block and drop it below the set to block. Drag the else if block and drop it below the if block twice in the pop-up box.
25. Now, define the condition for the first if block using the equal operator block from the Control category. If the value of the count variable equals "1", then blocks under the if block will be executed.
26. Drag and drop two Move Motor at blocks in the do condition block.
27. Configure the first motor at Port3 (Advance) as clockwise by selecting the Clockwise option from the drop-down menu. Select the speed of the motor as Medium.
28. Similarly, select Port4 (Advance) from the drop-down of the second Move Motor at the block. Configure the motor as anticlockwise by selecting the Anticlockwise option from the drop-down. Select the speed of the motor as Medium.
29. Drag and drop the Print Data block in the do part of the if block. Drag the empty Text Box block from the Text category and drop it inside the Print Data block. Type “Dance 1” in the Text Box block. This will set the first dance move of the robot in the backward direction.
30. Repeat the above five steps and set the value for the number block as "2" instead of "1" for the else if condition. Also, type "Dance 2" in the Print Data block.
31. Change the motor movement to Anticlockwise for the first motor and Clockwise for the second motor. Select the speed of the motor as Medium.
32. Use the equal operator block for the second else if condition to set the value of the count variable block to "3".
33. Then, set both motors to Stop.
34. Drag and drop the set to block below the last Move Motor at the block. Also, set the value of the count variable to "0" to reset its value.
35. Drag and drop the Print Data block in the do part of the if block. Drag the empty Text Box block from the Text category and drop it inside the Print Data block. Type “OFF” in the Text Box block.
36. Give a name to your program, save it, and then compile it.
37. Now the program is ready to burn on the RAK.
Scan QR code to view output
A. Tick () the Correct Option.
1 Which block creates a loop for continuous execution?
a Repeat while
c Set to
b If
d Add operator
2 What variable stores the number of times the touch sensor is pressed?
a Count
c Repeat
B. Answer the Following.
b Touch_Sensor
d Add
1 Describe the steps required to attach the motors and wheels to the chassis.
2 Explain how the "if" and "else if" conditions are used to create different dance moves for the robot.
C. Apply Your Learning.
1 How would you modify the program to make the robot perform a fourth dance move?
2 If you want your robot to stop after a specific number of touch inputs, how would you update the program to achieve this?
Experiment 7: Soccer Bot 8
Objective
Create a gaming robot to play a soccer game, navigate the robot using the remote and touch sensor. The bot kicks the ball in front and scores a goal.
Let’s Build
After creating the RC car, follow the given steps to create your Soccer Bot robot:
1 Connect the High Torque Motor to the 7.5” Rectangle in the RC car using a 3.5” Axle, Axle Lock and 6mm Bolts.
2 Connect the 7.5” U-Beam to the 3-Hole Connector using Nuts and Bolts.
3 Connect the 2.5” Square Plate to the assembly from the previous step using Nuts and Bolts.
4 Connect the 7.5” U-Beam in the assembly from the previous step to the Axle in the assembly from step 1 using a Filler and Axle Lock.
5
Connect the Touch Sensor to the Chassis using Bolts. Finally, we get an assembly for the Soccer Bot with one arm as follows:
6
Connect High Torque Motor to port M2 of the Brain and the Touch Sensor to port S5 of the Brain.
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, in sequence.
3. Click on the Variables category.
4. Click on the Create variable button. A pop-up box appears asking you to create a new variable name.
• Enter a suitable variable name, let’s say ‘count’ to store the number of times the touch sensor was pressed.
• Click on the OK button.
5. Drag the set to block from the Variables category and drop it inside the My Program block.
6. Then drag the number block from the Math category and attach the block to the set to block.
7. Drag the Repeat while block from the Loops category and drop it below the set to block to begin the infinite loop. The Repeat while block is set to true by default.
8. Now, similarly, create another variable named “touch_sensor” to store the data of the touch sensor value received from the sensor.
9. Drag the set to block from the Variables category and drop it inside the Repeat while block.
10. Then, drag the Read Touch Sensor at block from the Sensor category and attach it to the set to block. Select the “Port5 (Advance)” option from the drop-down of the block.
11. Drag the if block from the Control category and drop it below the set to block.
12. Drag the equal operator block from the Control category and attach it to the if block.
13. Select the ‘>’ option from the drop-down menu of the equal operator block.
14. Drag the touch_sensor block from the Variables category and drop it in the left part of the greater than operator block.
15. Now, drag the number block from the Math category and drop it in the right part of the greater than operator block. Type “400” for the text part of the number block. Now, if the value of the touch_sensor variable is greater than 400, i.e., the touch sensor is pressed, then blocks under the if block will be executed.
16. Drag the set to block from the Variables category and drop it in the do part of the if block. Select the count variable from the drop-down menu of the set to block.
17. Drag the add operator block from the Math category and attach it to the set to block.
18. Now, drag the count variable block and drop it in the left part of the add operator block. This adds a sum of “1” to the variable count every time the touch sensor is pressed.
19. Drag the Print Data block from the Display category and drop it below the set to block. Drop the count variable block in the empty part of the Print Data block.
20. Now, drag the if block and drop it below the Print Data block. Drag the else if block and drop it below the if block twice in the pop-up box.
21. Now, define the condition for the if block using the equal operator block from the Control category. If the value of the count variable equals “1”, then blocks under the if block will be executed.
22. Drag and drop the Print Data block in the do part of the if block. Drag and drop the count variable block in the empty part of the Print Data block.
23. Now, drag two Move Motor at blocks from the Motor category and drop them below the Print Data block.
24. Configure the motor at Port4 (Advance) as Anticlockwise and the motor at Port3 (Advance) as Clockwise. Also, configure the speeds of both motors as “Medium” by selecting this option from the drop-down.
25. Drag the Time block from the Control category and drop it below the Move Motor at the block. Type “2000” in the value box of the Time block to move the bot for 2000 milliseconds or 2 seconds.
26. Similarly, drag two Move Motor at blocks and drop them below the previous Time block. Configure both the motors to Stop.
27. Drag another Time block and drop it below the previous Move Motor at the block. The block is set to “1000” milliseconds (ms) by default.
28. Similarly, set the condition in the first else if block to check if the count variable equals “2”. Here, in the Print Data block, you must drag and drop the Text Box block from the Text category and type “Kicking ball” in the Text Box block.
29. Similarly, set the condition in the second else if block to check if the count variable equals “3”. Refer to the image below. Note that when the count variable equals ‘3’, the bot moves backwards, stops, and then the count variable is reset to ‘0’.
30. Give a name to your program, save it, and then compile it.
31. Now the program is ready to burn on the RAK.
Note: The RAK should be connected to your computer through a Bluetooth or USB cable for the experiment to run.
Scan QR code to view output
Exercise
A. Tick () the Correct Option.
1 Which of the following blocks/buttons sets the ‘touch sensor’ variable to be equal to the input?
c d None of these
2 Which of the following is not an option in the drop-down menu of the ‘Move Motor at’ block?
a Clockwise b Anticlockwise
c Stop d Time
B. Answer the Following.
1 What role does the touch sensor play in the experiment?
2 Under what conditions will the bot stop according to the experiment?
C. Apply Your Learning.
1 Name one industry that could benefit from the real-life applications of a soccer bot’s capabilities.
2 If the soccer bot is moving toward the ball but misses hitting it, what changes could you make to the robot’s movements to help it connect with the ball more accurately?
Experiment 8: Table Fan 9
Objective
To make a robot that can rotate as a table fan using a touch sensor as a switch.
Things Around Us
A table fan is a small, portable fan designed to provide a steady air flow and cool air circulation on a table top.
Let’s Build
1 Connect the Touch Sensor to the 7.5” Rectangle in the RC Car assembly using 6 mm Bolts.
2 Connect the 7.5” L-Beam to the 7.5” Rectangle using 12 mm Bolts and K-Nuts.
3 Connect the High Torque Motor to the 7.5” L-Beam using a 3.5” Axle and Axle Lock as shown.
4 Connect the Big Spur Gear to the Axle in the assembly using a Filler and an Axle Lock.
5 Connect a Medium Spur Gear and Small Spur Gear to the 7.5” L-Beam using 8” Axle, Axle Locks, and a Filler as shown.
6 Connect another Small Spur Gear to the 8” Axle from the other side using Axle Locks and a Filler.
7 Connect the 12.5” Flexi to the Axle using a 3-Hole Connector, Nuts, and Bolts as shown.
8 Connect another 12.5” Flexi to the Flexi connected in the previous assembly, using 3-Hole Connector, Nuts, and Bolts as shown.
9 Finally, we get an assembly for a Table Fan as given below:
10 Connect the High Torque Motor to port M2 of the Brain and the Touch Sensor to port S5 of the Brain.
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 inside this occurs step by step.
3. Click on the Variables category.
4. Click on the Create variable button. A pop-up box appears asking you to enter a new variable name.
• Enter a suitable variable name, let us say “count”.
• Click on the OK button.
5. Drag the set to block from the Variables category and drop it inside the My Program block.
6. Drag the number block from the Math category and attach it to the set to block. The number block is set to “0” by default.
7. Drag the Repeat while block from the Loops category and drop it below the set to block to begin the infinite loop. By default, the loop value is set to true.
8. Click on the Variables category.
9. Click on the Create variable button. A pop-up box appears asking you to enter a new variable name.
• Enter a suitable variable name, let us say “Touch_Sensor”.
• Click on the OK button.
10. Now, drag and drop the set to block from the Variables category and drop it inside the Repeat while block.
11. Drag the Read Touch Sensor at block from the Sensor category and attach it to the set to block. Select the option “Port5 (Advance)” from the drop-down of the Read Touch Sensor at the block.
12. Drag the if block from the Control category and place it below the set to block.
13. Click on the settings icon of the if block. A pop-up box appears.
14. Drag the else block and place it below the if block in the pop-up box (refer to the image below).
15. Click on the settings icon again to hide the pop-up box.
16. Drag the equal operator block from the Control category and attach it to the right of the if block.
17. Select the ‘>=’ option from the drop-down of the equal operator block.
18. Drag the Touch_Sensor block from the Variables category and drop it in the left part of the greater than equal to operator block.
19. Now, drag the number block from the Math category and drop it in the right part of the greater than equal to operator block. Type “400” for the text part of the number block. Now, if the value of the Touch_Sensor variable is greater than 400, then blocks under the if block will be executed, else the blocks under the else block will be executed.
20. Drag the set to block from the Variables category and drop it in the do part of the if block. Select the “count” option from the drop-down of the set to block.
21. Drag the add operator block from the Math category and attach it to the set to block.
22. Now, drag the count variable block and drop it in the left part of the add operator block. This adds 1 to the variable count every time the touch sensor is pressed.
23. Drag another if block and place it below the set to block.
24. Click on the settings icon of the if block. A pop-up box appears.
25. Drag the else if block and place it below the if block in the pop-up box (refer to the image below).
26. Click on the settings icon again to hide the pop-up box.
27. Drag the equal operator block and attach it to the if block.
28. Drag and drop the count variable block in the left part of the equal operator block.
29. Drag and drop the number block in the right part of the equal operator block. Type “1” in the text part of the number block.
30. Drag the Move Motor at the block from the Motor category and drop it in the do part of the if block.
31. Configure the motor at Port2 (Advance) as Clockwise. The block is set to High speed, by default.
32. Drag the Print Data block from the Display category and drop it in the do part of the if block. The Print Data block is set to Row1 by default.
33. From the Text category, drag the Text Box block and drop it in the empty space of the Print Data block.
34. In the Text Box block, type the text “Fan ON”.
35. Similarly, drag the equal operator block and attach it to the else if block.
36. In the left part of the equal operator block, drag and drop the count variable block and to its right, drag and drop the number block. Type “2” in the text part of the number block.
37. Drag and drop the Move Motor at the block in the do part of the else if block. Configure the motor at Port2 (Advance) to Stop.
38. Now, drag the Print Data block and drop it below the Move Motor at the block.
39. Drag the text box block and drop it in the empty space of the Print Data block. In the Text Box block, type the text “Fan OFF”.
40. Drag the set to block and drop it below the Print Data block. Select the “count” option from the drop-down of the set to block.
41. Drag the number block and attach it to the set to block. The number block is set to “0” by default.
42. Now, drag the Print Data block and attach it to the else block.
43. Drag the text box block and drop it in the empty space of the Print Data block. In the Text Box block, type the text “OFF”.
44. Give a name to your program, save it, and then compile it.
45. Now, the program is ready to burn on the RAK.
Scan QR code to view output
A. Tick () the Correct Option.
1 Which of the following blocks display a letter, word, or line of text on the LED?
a b
c d None of these Exercise
2 Which of the following blocks senses touch input?
3 The button belongs to the category of blocks. a Sensor b Display c Variables d Control
B. Fill in the Blanks.
1 The block is available in the category of the blocks panel.
2 The block is used to begin your program.
3 The table fan experiment of the RAK makes use of the sensor.
4 The “repeat while” block returns values either or .
C. Apply Your Learning.
1 In what way can a table fan robot help in demonstrating the working of a windmill?
2 What type of energy conversion takes place in the table fan robot during operation?
Experiment 9: Bot Movement AI 10
Objective
To learn the essentials of physical bot control by mastering basic movements (forward, backwards, left, and right) using motors and AI, cultivating a foundation in practical robotics concepts.
Background
Artificial Intelligence (AI)
Artificial Intelligence, or AI, is the field of computer science that deals with the study of the principles, concepts, and technology for building machines that enable them to think, act, and learn like humans. Machines possessing AI should be able to mimic human traits, i.e., making decisions, recognising patterns, predicting outcomes based on certain actions, learning, and improving on their own.
Natural Language Processing (NLP)
NLP is a domain of AI that enables computers to understand human language and generate appropriate responses when we interact with them. It allows computers to talk to us in a way that feels natural to us. Popular examples of NLP applications include Google Assistant, Siri, Alexa, Google Translate, etc.
Computer Vision
Computer Vision is a domain of AI which uses cameras to see and understand visual information.
Things Around Us
Some of the real-life examples of NLP are:
1. Virtual Assistants
2. Language Translation Apps
Some of the real-life examples of computer vision are:
1. Face Recognition in Smartphones 2. Self-driving Cars
Bot Movement AI: Using Speech Recognition
In this experiment, the use of NLP in the RAK bot includes:
• Recognising spoken commands such as “forward”, “backwards”, “left”, and “right”.
• Converting spoken commands into actions that the RAK can execute.
• Detecting unclear user input and prompting the user to repeat commands
Let’s Code
1. Click on the Control category in 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. Drag the repeat while block from the Loops category and drop it inside the My Program block to begin the infinite loop. The loop value is set to true by default.
4. Click on the Variables category.
5. Click on the Create variable button. A pop-up box appears asking you to enter a new variable name.
• Enter a suitable variable name, let us say “Speech”.
• Click on the OK button.
6. Drag the set to block from the Variables category and drop it inside the repeat while block.
7. Drag the get recognised speech block from the Speech Recognition category and attach it to the set to block.
8. Now, 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 if block and drop it below the if block three times in the pop-up box (refer to the image below).
11. Click on the settings icon again to hide it.
12. Now, drag the includes block from the Text category and attach it to the if block.
13. Drag the Speech block from the Variables category and drop it in the left text box of the includes block.
14. Type “forward” in the right text box of the includes block.
15. Now, drag Move Motor at the block from Motor category and drop it in the do part of the if block.
16. Select Move Motor at value as “Port4 (Advance)”, direction as “Clockwise”, and Speed as “Medium” from the drop-down.
17. Drag another Move Motor at the block and drop it below previous Move Motor at the block.
18. Select Move Motor at value as “Port3 (Advance)”, direction as “Anticlockwise”, and Speed as “Medium” from the drop-down.
19. Now, drag Print Data block from Display category and drop it below second Move Motor at the block.
20. Drag the Text Box block from Text category and drop it in the Print Data block. In the Text Box block, type the text “Forward”.
21. Similarly, drag another includes block and attach it to the first else if block.
22. Drag the Speech block and drop it in the left text box of the includes block.
23. Type “backward” in the right text box of the includes block.
24. Now, drag Move Motor at the block and drop it inside the do part of the first else if block.
25. Select Move Motor at value as “Port4 (Advance)”, direction as “Anticlockwise”, and Speed as “Medium” from the drop-down.
26. Again, drag Move Motor at the block and drop it below the previous Move Motor at the block.
27. Select Move Motor at value as “Port3 (Advance)”, direction as “Clockwise”, and Speed as “Medium” from the drop-down.
28. Now, drag the Print Data block and drop it below the second Move Motor at the block.
29. Drag the Text Box block and drop it inside the Print Data block. In the Text Box block, type “Backward”.
30. Similarly, add the conditions for the right and the left movement of the robot. Adjust the direction and the speed of the motors accordingly.
31. Give a name to your program, save it, and then compile it.
32. Now the program is ready.
Note: The RAK should be connected to your computer through a Bluetooth or USB cable for the experiment to run.
33. Click on the Run button on the AI window.
34. Allow the system to use your microphone to hear your commands.
35. Click on the microphone button present on the AI window.
36. Give any command (forward, left, backwards, or right). Here, the AI detects the voice as “forward”.
37. Again, click on the microphone button and observe the output.
Bot Movement AI: Using Camera Capture Mode
In this experiment, computer vision is used to recognise hand gestures through the camera.
• The AI model is trained to detect specific hand poses, such as palm, fist, thumbs up, and peace.
• Once trained, the model can identify these gestures in real-time.
• Each gesture then triggers specific actions within the game, such as moving forward, backwards, left, or right.
This allows players to control the bot with their hand movements.
Instructions
Before we start writing the code, let us train our AI Model. Follow the given steps:
1. Allow the system to use your camera.
2. Click on the Configure AI Model button in the AI Window on the right of your screen.
3. Choose your model by selecting Handpose from the Create Your Model pop-up window.
4. Add a name for your model and save it. You can also skip it.
5. Now, add the label name as ‘Palm’ and click on the Save button.
6. Click on the Start Recording button and show your palm up to 60 Frames on the camera.
7. Now, click on the Plus sign on the top left corner and add a name for Label 2. Here, the name of the Label 2 is “Fist”. Then, click on the Save button.
8. Similarly, show your fist on the camera and record different fist postures by showing your fist on the camera.
9. Similarly, add other labels such as ThumbsUp and Peace.
10. Now, click on the Train Model button to train the AI about the recorded poses. It will take a few minutes.
11. Add an appropriate model name and save it.
12. Test your model to check whether the AI is able to recognise the palm, fist, thumbs up and peace hand poses correctly.
13. Now, click on the Download button.
14. You are now ready to write your code.
Let’s Code
1. Click on the Control category in 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. Drag the repeat while block from the Loops category and drop it inside the My Program block. The block is set to true by default.
4. Now drag the if block from the Control category and drop it inside the repeat while block.
5. Click on the settings icon of the if block. A pop-up box appears.
6. Drag the else if block and drop it below the if block four times in the pop-up box (refer to the image below).
7. Click on the settings icon again to hide the pop-up box.
8. Drag the equal operator block from the Control category and attach it to the if block.
9. Now, drag the get detected AI label block from the AI category and drop it in the left part of the equal operator block.
10. Drag the Palm block from the AI category and drop it in the right part of the equal operator block.
11. Now, drag Move Motor at the block from Motor category and drop it inside the do part of the if block.
12. Select the Move Motor at value as “Port4 (Advance)”, direction as “Clockwise”, and Speed as “Medium” from the drop-down.
13. Again, drag the Move Motor at the block and drop it below the previous Move Motor at the block.
14. Select the Move Motor at value as “Port3 (Advance)”, direction as “Anticlockwise”, and Speed as “Medium” from the drop-down.
15. Now, drag the Print Data block from the Display category and drop it below the second Move Motor at the block.
16. Drag the Text Box block from the Text category and drop it in the empty part of the Print Data block. Type “Forward” in the Text Box block.
17. Similarly, drag another equal operator block and attach it to the first else if block.
18. Now, drag the get detected AI label block and drop it in the left part of the equal operator block.
19. In the right part of the equal operator block, drag and drop the Palm block from the AI category. Select the Fist option from the drop-down of the Palm block.
20. Now, drag the Move Motor at the block and drop it inside the do part of the first else if block.
21. Select the Move Motor at value as “Port4 (Advance)”, direction as “Anticlockwise”, and Speed as “Medium” from the drop-down.
22. Again, drag the Move Motor at the block and drop it below the previous Move Motor at the block.
23. Select the Move Motor at value as “Port3 (Advance)”, direction as “Clockwise”, and Speed as “Medium”.
24. Now, drag the Print Data block from Display category and drop it below the second Move Motor at the block.
25. Drag the Text Box block from the Text category and drop it in the blank part of the Print Data block. Type “Backward” in the Text Box block.
26. Similarly, add the conditions for the ThumbsUp and the Peace gestures. Adjust the directions and speed of the motors accordingly.
27. Again, drag the equal operator block and attach it to the fourth else if block.
28. Now, drag the get detected AI label block and drop it in the left part of the equal operator block.
29. In the right part of the equal operator block, drag and drop the Palm block. Select the None option from the drop-down of the Palm block.
30. Now, drag the Move Motor at the block and drop it in do part of the fourth else if block.
31. Select the Move Motor at value as “Port4 (Advance)” and direction as “Stop” from the drop-down.
32. Again, drag the Move Motor at block and drop it below the previous Move Motor at the block.
33. Select the Move Motor at value as “Port3 (Advance)” and direction as “Stop” from the drop-down.
34. Give a name to your program, save it, and then compile it.
35. Now the program is ready.
Note: The RAK should be connected to your computer through a Bluetooth or USB cable for the experiment to run.
36. Click on the Run button on the AI window.
37. Show any hand pose (Palm, Fist, ThumbsUp, or Peace) on the camera.
38. Observe the output. Scan QR code to view output
A. Tick () the Correct Option.
1 What gesture will make the bot move forward?
a Fist b Palm
c Peace
d ThumbsUp
2 What action occurs when the AI detects the “Peace” gesture?
a The bot stops moving
c The bot turns left
b The bot moves forward
d The bot turns right
3 Which AI domain is used to convert spoken commands into actions on the RAK?
a Machine Learning
c Computer Vision
B. Answer the Following.
b Natural Language Processing
d Data Science
1 Why is training the AI model with hand gestures important before running the program?
2 What is the purpose of Natural Language Processing (NLP) in this experiment?
C. Apply Your Learning.
1 If you want the bot to stop moving when there is no command, how could you modify the code?
2 List two real-life examples where computer vision technology is commonly used.
Maker Board
Exploring the Hardware Kit 1
About Maker Board
Maker Board is an easy-to-use electronic platform that helps 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 its electronic sensors and modules. You can make and play interactive games using the LED matrix and the push buttons. You can make a piano, a snake game, a smart band, and many more such things.
Components of the Hardware Kit
The Maker Board robotics kit contains the following components:
The Maker 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 Pulse Width Modulation (PWM) pins and 2 Analog to Digital Converter (ADC) pins, which make a total of 6 General Purpose Input Output (GPIO) pins to interface with analog and digital sensors, LEDs, Motors, etc., using jumper cables and 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 is using an external power source.
3. Programming LED Matrix
An LED matrix is a grid of addressable Red, Green, and Blue (RGB) LEDs arranged in 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.
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 blinking light of LED in different directions.
5. Buzzer
The buzzer is used to make different types of sounds at distinct frequencies and at different beats per minute.
6. Reset Button
The reset button is used to restart any program loaded in the Maker Board.
7. Bluetooth Module (HC-05)
The Bluetooth module gets you started with the possibilities of IoT and enables wireless controlling of various equipment connected to the Maker Board.
IoT stands for Internet of Things which refers to a network of interconnected devices embedded with sensors and software, enabling them to collect, exchange data, and make autonomous decisions.
8. Standoff Holes
These holes are present to ensure that the Maker Board can be safely used on electrically conductive surfaces.
About Maker Studio Coding Interface
The Maker Studio coding interface acts as an integrated development environment that allows you to write code for all of your projects. This code is then loaded into the Maker Board.
The Maker Studio coding interface consists of five major components:
1. A workspace area to drag blocks for the code you want to create.
2. A Blocks Panel, which contains all the blocks required to make your code.
3. The Share Code option in the File drop-down menu, generates a shareable link for the project.
4. Buttons to save, compile, and burn your code.
5. The Simulator Window to see the output.
Burning Your Code into Maker Board Hardware
Burning means loading your code into the Maker Board hardware. This process, mainly, has the following phases:
Experiment 1: Print Your Name on Digital Display 2
Objective
Let’s make a program to display your name in the LED matrix and in your favourite colour.
Background
Programming LED Matrix
An LED matrix is a grid of addressable RGB LEDs arranged into rows and columns. In this, a total of 25 addressable RGB LEDs are used, which can be controlled individually. LED matrix can be used to display animations or scroll text, numbers, patterns, etc. It can also be used to make various types of 8-bit games.
Things Around Us
Some of the real-life examples of LED matrix are:
1. LED display in real time clocks
Let’s Code
2. Digital signage at the airport
LED display on buses
1. Click on the Control category from the Blocks panel.
2. Drag and drop the My Program block to the workspace to begin your program. The execution of all the blocks present inside this block occurs step by step.
3. To glow LEDs on the LED matrix in a pattern, various blocks are available in the Display category. Drag and drop the show character block inside the My Program block.
4. Type the letter “N” within the double quotes.
5. Select your favourite color and set the brightness to 100.
6. Drag and drop the wait block from the Control category below the show character block.
7. Type 1000 in the space before ms (milliseconds). This will create a delay of 1 second in displaying the next step.
8. Add another show character block to display the letter “A”.
9. Add a wait block with 1000 ms.
10. Similarly, add another show character block to display the letter “M” and add a wait block with 1000 ms.
11. Add another show character block to display the letter “E” and add a wait block with 1000 ms.
12. Now, drag the show scrolling text block available in the Display category in order to display your name.
13. Type your name within double quotes.
14. Set the colour of your choice and also set the brightness to 100.
15. Give a name to your program, save, and then compile it.
16. Now the program is ready to burn on the Maker Board, and you can see the output on the digital display.
Note: The Maker Board should be connected to your computer through a USB for the experiment to run.
Scan QR code to view output
A. Tick () the Correct Option.
1 What is an LED matrix?
a A screen with tiny, coloured dots
b A grid of addressable RGB LEDs
c A tool for drawing patterns on paper
d A single LED that glows in different colours
2 Which block do you use to display each character one by one in this program?
a wait
c show character
b show scrolling text
d set brightness
3 How do you add a delay between showing each character?
a By typing a longer name
b By changing the colour
c By using the wait block with a delay time
d By adding more show character blocks
B. Answer the Following.
1 Which block allows you to display moving text on the LED matrix?
2 Explain the steps you would take to add a new letter to display on the LED matrix.
C. Apply Your Learning.
1 Give any two real-life examples where you have seen an LED display.
2 Why is a delay of 1000 milliseconds added between each letter?
Experiment 2: Flag Book 3
Objective
Let’s make a Flag Book to understand the concept of animation.
Background
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).
Things Around Us
Some of the real-life examplesof flag book are:
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.
5. Select colour 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. Type “1000” in the value box of the wait block. This will create a delay of 1 second in displaying the next step.
8. Drag two more show LEDS blocks and select different colour patterns on them.
9. Give the wait blocks accordingly to adjust the delay.
10. Drag the clear display block from the Display category and drop it below the wait block used above.
11. Thereafter, drag and drop another wait block and set its value to “1000”.
12. Give a name to your program, save and then compile it.
13. 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
A. Tick () the Correct Option.
1 Which category do you select to start building the program? a Variables b Control c Loops d Display
2 What is the purpose of the wait block in this program?
a To change LED brightness
b To set a time delay between actions
c To add colour to the LED
d To display text
3 What is the brightness level set to in the show LEDS block? a 50 b 75 c 100 d 150
B. Answer the Following.
1 What do you mean by animation?
2 Which hardware needs to be connected to the computer to run the program?
3 What is the purpose of the clear display block in the program?
C. Apply Your Learning.
1 Give any two real-life examples where you have seen animation.
2 How can you reduce the time between each colour showing up on the LED matrix?
Experiment 3: Colour Using AI 4
Objective
Let us colour the Maker Board using AI speech recognition mode.
Background
Artificial Intelligence (AI)
Artificial Intelligence or AI, is the field of computer science that deals with the study of the principles, concepts, and technology for building machines that enable them to think, act, and learn like humans. Machines possessing AI are able to mimic certain human traits, i.e., making decisions, recognising patterns, predicting outcomes based on certain actions, learning, and improving on their own.
Natural Language Processing (NLP)
NLP is a domain of AI that enables computers to understand human language and generate appropriate responses when we interact with them. It allows computers to talk to us in a way that feels natural to us. Popular examples of NLP applications include Google Assistant, Siri, Alexa, Google Translate, etc.
Computer Vision
Computer Vision is a domain of AI which uses cameras to see and understand visual information.
Things Around Us
Some of the real-life examples of NLP are:
1. Virtual Assistants
2. Language Translation Apps
Some of the real-life examples of computer vision are:
1. Face Recognition in Smartphones
2. Self-driving Cars
Colour Using AI: Speech Recognition Mode
In this experiment, the use of NLP in the Maker Board includes:
• Recognising various colours such as “yellow“, “red“, “green“, “white“, etc.
• Converting spoken commands into actions that the Maker Board can execute.
• Detecting unclear user input and prompting the user to repeat commands.
Let’s Code
1. Click on the Control category in 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. Drag the repeat while block from the Loops category and drop it inside the My Program block to begin the infinite loop. The loop value is set to true by default.
4. Click on the Variables category.
5. Click on the Create variable button. A pop-up box appears asking you to enter a new variable name.
• Enter a suitable variable name, like “Speech”.
• Click on the OK button.
6. Drag the set to block from the Variables category and drop it inside the repeat while block.
7. Drag the get recognised speech block from the Speech Recognition category and attach it to the set to block. 8. Now, 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 if block and drop it below the if block three times in the pop-up box (refer to the image below).
11. Click on the settings icon again to hide the pop-up box.
12. Now, drag the includes block from the Text category and attach it to the if block.
13. Drag the Speech block from the Variables category and drop it in the left text box of the includes block.
14. Type “yellow” in the right text box of the includes block.
15. Now, drag the show LEDS block from the Display category and drop it inside the do block.
16. Select yellow colour from the Select color palette and click on squares of the LED matrix to change the colour, and set the brightness to ‘100’.
17. Repeat the steps 12 to 16 thrice to select the various colours on the LEDS block, for example, red, green, and white.
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 play the game.
Note: The Maker Board should be connected to your computer through a Bluetooth or USB cable for the experiment to run.
20. Click on the Run button on the AI window.
21. Allow the system to use your microphone to hear your commands.
22. Click on the microphone button present on the AI window.
23. Give any command (yellow, red, green, and white). Here, the AI detects the voice as ‘green’.
24. Again, click on the microphone button and observe the output on the Maker Board.
Colour Using AI: Using Camera Capture Mode
In this experiment, computer vision is used to recognise hand gestures through the camera.
• The AI model is trained to detect specific hand poses, such as “Palm,” “Fist,” and “ThumbsUp”.
• Once trained, the model can identify these gestures in real-time.
• Each gesture then triggers specific actions within the game.
Before we start writing the code, let us train our AI Model. Follow the given steps:
1. Allow the system to use your camera.
2. Click on the Configure AI Model in the AI Window on the right of your screen.
3. Choose your model by selecting Handpose from the Create Your Model pop-up window
4. Add a name for your model and save it. You can also skip it.
5. Now, add the label name as ‘Palm’ and click on the Save button.
6. Click on the Start Recording button and show your palm up to 60 Frames on the camera.
7. Now, click on the Plus sign on the top left corner and add a name for Label 2. Here, the name of the Label 2 is “Fist”. Then, click on the Save button.
8. Similarly, show your fist on the camera and record different fist postures by showing your fist on the camera.
Similarly add label for ThumbsUp.
10. Now, click on Train Model button to train the AI about the recorded poses. It will take a few minutes.
11. Add an appropriate model name and save it.
12. Test your model to check whether the AI is able to recognise the palm, fist and thumbs up poses correctly.
13. Now, click on the Download button.
14. You are now ready to write your code.
1. Click on the Control category in the Blocks panel. Let’s Code
2. Drag the My Program block 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 to begin the infinite loop. The loop value is set to true by default.
4. Now drag the if block from the Control category and drop it inside the repeat while block.
5. Click on the settings icon of the if block. A pop-up box appears.
6. Drag the else if block and drop it below the if block in the pop-up box. Repeat this for three times.
7. Again, click on the settings icon to hide the pop-up box.
8. Drag the equal operator block from the Control category and attach it to the right of the if block.
9. Now, drag the get detected AI label block from the AI category and drop it in the left part of the equal operator block.
10. Drag and drop the Palm block in the right part of the equal operator block.
11. Now, drag the show LEDS block from the Display category and drop it inside the do part of the if block.
12. Select yellow colour from the Select color palette and click on squares of the LED matrix to change the colour, and set the brightness to “100”.
13. Repeat the steps 8 to 12 thrice to select the various colours on the LEDS block, for example, red, green, and white.
14. Give a name to your program, save, and then compile it.
15. Now the program is ready to burn on the Maker Board, and you can play the game.
Note: The Maker Board should be connected to your computer through a Bluetooth or USB cable for the experiment to run.
16. Observe the output on the Maker Board.
Scan QR code to view output
A. Tick () the Correct Option.
1 Which category provides the “get recognised speech” block?
a Variables
c Display
b Text
d Speech Recognition
2 What colour does the LED Matrix show when a “Fist” gesture is detected?
a Yellow
c Green
b Red
d White
3 Which block detects the hand gesture captured by the camera?
a show LEDS
c get detected AI label
B. Answer the Following.
b repeat while
d equal operator
1 Why is it important to train the AI model with specific hand gestures before running the code?
2 What does the ‘includes’ block do?
C. Apply Your Learning.
1 Where have you seen examples of computer vision in real life?
2 Imagine you want to add a new colour command, “blue”. Outline the steps you will take to include this in the program.
About the Book
This book introduces learners to the captivating realm of robotics, with a learner-friendly, motivating, and hands-on approach. It combines theoretical understanding with practice, through insightful examples of real-world applications, while promoting creativity and coding skills. Emphasising a project-based learning methodology, the book provides a series of projects, each with detailed instructions. These instructions can be effortlessly executed using the accompanying robotics hardware kit. The assembly and programming of the robotics systems are done through block-based coding, and simulation environments; accelerating the experiential learning journey of the learners.
Special Features
• Hands-on Experiments: Engaging experiments that allow students to build and test-run robots themselves.
• Detailed Coding Practice: Step-by-step coding instructions to program robots, making it easy for beginners to learn.
• Things Around Us: Each experiment connects robotics to real-world scenarios, showing how technology solves everyday problems.
• Comprehensive Background: Clear explanations of the concepts and the technology behind each experiment, helping students understand the "why" and the "how."
• Interactive Exercises: Exercises at the end of each experiment to reinforce learning and to challenge students to think critically.
About Uolo
Uolo partners with K-12 schools to provide technology-enabled learning programs. We believe that pedagogy and technology must come together to deliver scalable learning experiences that generate measurable outcomes. Uolo is trusted by over 15,000+ schools across India, Southeast Asia, and the Middle East.