Lesson 1, Topic 1
In Progress

Activity: Making a Self Driving Car

Making a Self Driving Car – Overview

It’s time to write the code for our self-driving car. The car should recognize the signs and landmarks in its path and perform the action accordingly.self driving car

Completing the script

Now let’s complete the script to transform Quarky into a self-driving car!

  1. We will start from the script that we have made in the previous topic.
  2. Replace the say () block with the if-else block.
  3. Place is signal () detected? block from the Autonomous Driving palette. And select GO from the drop-down.
  4. Place a go () at () % speed for () seconds block under the if arm. Forward100%, and 1 are set as the default direction, speed, and time.
  5. Place another if-else block under the else arm.
  6. Add another is () signal () detected ? block inside the diamond-shaped space of the second if-else block. Select Turn Left from the drop-down.
  7. Add another go () at () % speed for () seconds block below the if arm of the second if-else block. Set the direction to Left.
  8. Add another if-else below the else arm of the second if-else block.
  9. Repeat steps 6 and 7. Select Turn Right from the drop-down of the is () signal () detected? block and set the direction of the go () at () % speed for () seconds block as Right.
  10. Click the green flag to run the script.

Make your own city by placing the signs and landmarks and then make the car drive on its own.

Challenge

Now that you know how self-driving car works and the line-following robot works. It’s time to show your skill. We challenge you to make a self-driving car that detects the signs and landmarks and takes actions but also, should follow the line. To make one such arena, place the arena which you’ve got in your innovator kit on the flat surface and put the signs and landmarks across the path.

With this, we’re done with all about self-driving cars! Let’s recap the lesson before moving on to the next.

What We Have Learnt

In this lesson, we learned what self-driving cars are, how they work, their importance, and their applications. Then, we learned how to detect signs and landmarks using artificial intelligence, and finally, we made our own self-driving car using Quarky!self driving car

What’s Next

In the coming lesson, we’re going to learn what is face recognition, how to transform your existing robot into a vertical robot, and finally, make our robo-pet using Quarky!

See you in the next lesson!

Get in Touch!