Maqueen Programming Examples

Motor Control

Motor Control * Learning Target: Mastering the basic method of motor control. * Effect: The car forward 1 second, right turn 1 second, left turn 1 second, back 1 second, back and right turn 1 second.

../_images/Motor_Control.gif

Makecode Program Link: https://makecode.microbit.org/_2Cc9gM5P5aDs

Screenshot of Makecode Graphical Program:

../_images/Motor_Control.png

RGB Breathing Ambient Light

  • Learning Target: Learn the basic way of using ambient light.
  • Effect: The RGB ambient light at the bottom of the Maqueen shows a variety of colors and presents a gradient effect.
../_images/RGB.gif

Makecode Program Link: https://makecode.microbit.org/_WkgPLpAotP3f

Screenshot of Makecode Graphical Program:

../_images/RGB_Breathing_Ambient_Light.png

LED Light Flash

  • Learning Target: Learn the using way of LED light and buzzer.
  • Effect: The left and right LED lights flash alternately, and the buzzer emits two different tone frequencies at intervals of 500 milliseconds.
../_images/LED_Light_Flash.gif

Makecode Program Link: https://makecode.microbit.org/_6gKRm1RVsDxY

Screenshot of Makecode Graphical Program:

../_images/LED_Light_Flash.png

Read Ultrasonic Distance

  • Learning Target: Learn to read the distance of ultrasound, so that later can be flexible use of these data.
  • Effect: The ultrasonic detecting the obstruction in front and the distance will be displayed on the dot-matrix screen in centimeters.
../_images/Read_Ultrasonic_Distance.gif

Makecode Program Link: https://makecode.microbit.org/_4gi4Dj7yTWgK

Screenshot of Makecode Graphical Program:

../_images/Read_Ultrasonic_Distance.png

Read Infrared Key Assignments

  • Learning Target: Learn to read the key assignments of infrared, so that later can be flexible use of these data.
  • Effect: Put the the IR receiver toward the IR remote control, when you press any key on the IR remote control. The key assignments that corresponds to the pressed key will displayed on the dot matrix, in decimal notation the last two digits of the key Assignments are displayed.
../_images/Read_Infrared_Key_Assignments.gif

Makecode Program Link: https://makecode.microbit.org/_361V7bbp0UAg

Screenshot of Makecode Graphical Program:

../_images/Read_Infrared_Key_Assignments.png

IR Remote Control and Its Key Assignments The key assignments in the following table are in hexadecimal. In this product, we read the last two digits of the key assignments and automatically convert them to decimal data.

IR Remote Control

  • Learning Target: Learn to use the IR remote control to command the car.
  • Effect: Control car forward, left, right, back with 4 keys of IR remote control 2, 4, 6, 8.
../_images/IR_Remote_Control.gif

Makecode Program Link: https://makecode.microbit.org/_MfDXhX6MM35X

Screenshot of Makecode Graphical Program:

../_images/IR_Remote_Control.png

Line-tracking

Effect: The car is running along the black line.

../_images/Line-tracking.gif

Makecode Program Link: https://makecode.microbit.org/_1VzX7LLAC3im

Screenshot of Makecode Graphical Program:

../_images/Line-tracking.png

Ultrasonic Obstacle-avoiding

  • Effect: Ultrasonic detects the distance between the car and the obstacle in front of it. If the distance is less than 35cm, the car will randomly choose to turn left or right to avoid obstacles.
  • Fittings: SR04 Ultrasonic Module x 1 or SR04-P Ultrasonic Module x 1
../_images/Ultrasonic_Obstacle-avoiding.gif

Makecode Program Link: https://makecode.microbit.org/_Fa4Ef3DwyXW7

Screenshot of Makecode Graphical Program:

../_images/Obstacle-avoidance.png

Light-operated Sprite

  • Effect: The car does not move in the darker light, and as the flashlight illuminates the LED, the vehicle’s forward speed begins to increase as the intensity of the light increases.
../_images/Light-operated_Sprite.gif

Makecode Program Link: https://makecode.microbit.org/_fi6DWjCKeM9v

Screenshot of Makecode Graphical Program:

../_images/Light-operated_Sprite.png

Wireless Remote Control

  • Learning Target: Learn the way of using micro:bit wireless.
  • Effect: Use another micro:bit to control the car’s movement.
../_images/Wireless_Remote_Control.gif

Screenshot of Makecode Graphical Program:

Screenshot of Car’s Makecode Graphical Program: