The Pinay Homeschooler
  • SHOP PRINTABLES
  • TODDLER
  • PRESCHOOL
  • KINDERGARTEN
  • GRADE SCHOOL
  • FREE PRINTABLES
  • HOME
The Pinay Homeschooler

Saturday, December 28, 2019

Coding Lessons for Kids Using BBC Microbit Robot Car

I've finally selected the platform that I will use in introducing Vito to programming.  We got this programmable car MAQUEEN from DFROBOT.  My reasons for selecting this toy are: simple to assemble, no operating system setup needed, web based visual programming editor, and abundance of peripherals that can be programmed such as: motors, LED lights, RGB lights, LED matrix display, distance sensor, temperature sensor, push buttons, infrared sensor, speaker, and so on.

Vito is still very young at this stage, 6 years old, to learn programming but with my supervision and thru play I hope to introduce him to the exciting things that can be done with programming.

Coding Lessons for Kids Using BBC Microbit Based Robot Car
First, I will give you a walkthrough on how to setup the ROBOT CAR and the web based programming editor. Then, we will create some simple programs that will turn on or off the on board LED lights. At the end of this post I also prepared a printable that you can download and provide as printed notes to your students.

List of Materials

  • DFROBOT MAQUEEN
  • Micro USB Cable
  • 3 AAA Battery
  • Laptop or PC to access Microbit Makecode Visual Programming IDE

Assembly and Setup of the Robot Car

I've created a short video that you can watch and follow here.


Makecode Visual Programming Editor Setup

If you are already familiar with Scratch block based programming then you won't have a lot of learning adjustment to do as Makecode and Scratch are very much alike.  Their workspace are similar with a few difference in the layout.

Makecode Workspace
The unmodified workspace is only suitable for programming the BBC Micro:bit processor board peripherals (e.g. PUSH Buttons A and B, 5x5 LED matrix, temperature sensor, gyroscope). In order to program and control the peripherals (e.g. motors, LED lights, RGB ligths, IR sensors, speaker, distance sensor) of the DFROBOT MAQUEEN we have to load some packages or extensions to get the pre-built block commands in our programs.

Below is a list of packages that we need to load for the robot car:
  • Maqueen package (https://github.com/DFRobot/pxt-maqueen)
  • Neopixel package
Check the YOUTUBE video here for the walkthrough.

After loading the packages this is what your updated workspace will look like:

DFROBOT MAQUEEN PACKAGE
NEOPIXEL PACKAGE

LESSON 1: LED Lights Basic Programming

LEARNING GOALS:
  • Familiarization with MakeCode editor
  • Learn to associate actions or programs to INPUTs
  • Learn to download *.hex code into Micro:bit
TASKS:
  1. Using Makecode editor create a program that will turn ON LED Lights when BUTTON ‘A’ is pressed
  2. Attach Micro USB cable to the Micro:bit’s micro USB programming interface and the other end to the PC/Laptop’s USB interface
  3. Download the *.hex program code to the drive created by Micro:bit
  4. Remove the USB cable, turn ON Maqueen, and test your program

LESSON 1: TURN ON LEDS

LESSON 2: LED Lights Programming Part 2

LEARNING GOALS:
  • Learn to create, read, and set VARIABLEs
  • Learn to use CONTROL LOGIC
TASKS:
  1. Create a VARIABLE (LED_LIGHTS_ON) to track the STATE of the LED lights, set this VARIABLE to 0 on program START
  2. When BUTTON ‘A’ is pressed and LED lights are OFF, turn ON LED Lights and set the LED_LIGHTS_ON VARIABLE to 1
  3. When BUTTON ‘A’ is pressed and LED lights are ON, turn OFF LED Lights and set the LED_LIGHTS_ON VARIABLE to 0
  4. Download your new program in Micro:bit and test it

LESSON 2: TOGGLE LED STATE

FREE LESSON PRINTABLE AND HEX SOURCE FILES

Finally, to help you in conducting the lessons I've provided a free printable below and links to the source files of the completed programs.
  • FREE BASIC LED PROGRAMMING LESSONS PRINTABLE
  • LESSON 1 SOLUTION SOURCE FILE
  • LESSON 2 SOLUTION SOURCE FILE
Jae (Pinay Homeschooler) at 9:15:00 PM
Share

0 comments:

Post a Comment

Thanks for dropping by my blog! It really means a lot that you spare the time to read... and comment! Don't forget to check the "Notify Me" box so you will be notified of my response.

‹
›
Home
View web version

My Printable Shop

DISCLOSURE

The Pinay Homeschooler is a participant in the Amazon Services LLC Associates Program, a program designed to provide means for websites to earn from the ads/promotion they create. We have included links to the products we used in our homeschool activities and if you buy via the links we may earn a small commission.

Follow Me on Social Media

BLOG MENU

SHOP PRINTABLES
FREE PRINTABLES
TODDLER LEARNING ACTIVITIES
PRESCHOOL
KINDERGARTEN
GRADE SCHOOL
THEMED UNITS
CHILDREN'S BOOKS
Prev Next
Follow Pinay's board Pinay Homeschooler on Pinterest.
Powered by Blogger.