Back to Course
Class 6 - Coding, AI & Robotics Course
0% Complete
0/0 Steps
-
Coding
Session 1: Introduction to Coding3 Topics -
Session 2: Backdrop, Costume, and Animation3 Topics|1 Quiz
-
Session 3: Basics of Algorithm and Flowchart3 Topics|1 Quiz
-
Session 4: Basics of Pseudocode3 Topics|1 Quiz
-
Session 5: Getting Started with Quarky3 Topics|1 Quiz
-
Session 6: Variables: The Multitaskers4 Topics|1 Quiz
-
Session 7: Arithmetic Operators4 Topics|1 Quiz
-
Session 8: Conditional Statements3 Topics|1 Quiz
-
Session 9: Logical Operators4 Topics|1 Quiz
-
Session 10: Nested Conditional Statements2 Topics|1 Quiz
-
Session 11: Loops3 Topics|1 Quiz
-
Session 12: Touch Based Piano2 Topics
-
Session 13: Criterial in Loops5 Topics|1 Quiz
-
Session 14: Catch the Fruit Game - Part 12 Topics
-
Session 15: Catch the Fruit Game - Part 22 Topics|1 Quiz
-
Artificial IntelligenceSection 16: Introduction to Artificial Intelligence3 Topics|1 Quiz
-
Session 17: Basics of Face Detection2 Topics|1 Quiz
-
Session 18: Face Expression Detection2 Topics|1 Quiz
-
Session 19: Mimic Face with Quarky1 Topic
-
Session 20: Face Filter - Part 12 Topics
-
Session 21: Face Filter - Part 22 Topics
-
RoboticsSession 22: Basics of Robotics2 Topics|1 Quiz
-
Session 23: Wirelessly Controlled Robot2 Topics
-
Session 24: Introduction to Sensors3 Topics|1 Quiz
-
Session 25: Introduction to Actuators3 Topics|1 Quiz
-
Session 26: Face Tracking with Robot2 Topics
-
Session 27: Obstacle Avoidance Robot - Part 13 Topics
-
Session 28: Obstacle Avoidance Robot - Part 22 Topics|1 Quiz
-
Session 29: Edge Detector Robot - Part 13 Topics
-
Session 30: Edge Detector Robot - Part 22 Topics|1 Quiz
-
Capstone ProjectCapstone Project
Lesson 23,
Topic 2
In Progress
Activity: Wirelessly Controlled Robot
Lesson Progress
0% Complete
Let’s Code
- Open PictoBlox and create a New File.
- Select the coding environment as Block Coding.
- Power up the Quarky and connect it to PictoBlox as shown in the previous topic.
- We want to ensure that Quarky moves forward only if the up arrow key is pressed. To check if it is pressed, we’re going to use an if block. Go to the Control palette and drag and drop an if-else block.
- Now, go to the Sensing palette and add a key () pressed? block inside the diamond-shaped space of the if block. This block will check if the selected key is pressed. The up arrow key is the default option.
If the up arrow key is pressed, we want Quarky to move forward. Therefore we will now add a go () at () % speed for the () second block. - Go to the Robot palette and add a go () at () % speed for () second block inside the if block.Now, we need to do the same for the remaining three directions.
- Duplicate these blocks by right-clicking the if-else block. Then, in the key () pressed ? block, change the key to down and in the go () at () % speed for () second block, change the direction to backward.
- Repeat step 6 two more times for the remaining two directions.
- Now put the stop robot block in the last else branch.
- Complete the script by adding a forever & when flag clicked blocks at the top.
- Save the file with the name Wirelessly Controlled Robot.
Now, run the script by clicking the green flag. Have fun playing with Quarky!
Assignment
Before you move on to the next lesson, a small assignment awaits you!
You must upload the PictoBlox program you created in this activity to the website. Submitting the assignment is a must in order to receive the certificate after completing the course.
Follow the steps below to upload your assignment:
- Click on Browse.
- Search and Select your saved Project file(.sb3) and Click Open.
- Click on Upload to submit the assignment.
The file type allowed is the SB3 file generated from the PictoBlox program. The maximum file size allowed is 5 MB.
Good luck!