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.
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.
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
After loading the packages this is what your updated workspace will look like:
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
- Using Makecode editor create a program that will turn ON LED Lights when BUTTON ‘A’ is pressed
- Attach Micro USB cable to the Micro:bit’s micro USB programming interface and the other end to the PC/Laptop’s USB interface
- Download the *.hex program code to the drive created by Micro:bit
- Remove the USB cable, turn ON Maqueen, and test your program
LESSON 2: LED Lights Programming Part 2
LEARNING GOALS:- Learn to create, read, and set VARIABLEs
- Learn to use CONTROL LOGIC
- Create a VARIABLE (LED_LIGHTS_ON) to track the STATE of the LED lights, set this VARIABLE to 0 on program START
- When BUTTON ‘A’ is pressed and LED lights are OFF, turn ON LED Lights and set the LED_LIGHTS_ON VARIABLE to 1
- When BUTTON ‘A’ is pressed and LED lights are ON, turn OFF LED Lights and set the LED_LIGHTS_ON VARIABLE to 0
- Download your new program in Micro:bit and test it
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.