Getting Started with BPI-QCar

From Banana Pi Wiki
Revision as of 02:02, 24 February 2021 by Sinovoip (talk | contribs) (超声波传感器控制)
Jump to: navigation, search

About BPI-QCar

BPI Q-Car with micro:bit
BPI Q-Car with BPI-Bit
BPI-QCar with BPI-AI board

Banana PI BPI Q-Car,which is a robot focusing on maker education.Compatible with Web:Bit(BPI: Bit) and Micro:Bit development boards.Small car body, highly integrated functions, plug and play, can quickly children's attention, complete the quick start of graphics programming, cultivate independent thinking and logical thinking ability

Key Features

  • support Micro:bit, PBI:bit(Web:bit) and BPI-AI(WEB:AI) boards
  • support Makecode graphical programming(with micro:bit),support Webduino graphical programming(with BPI:bit),and it also support MicroPython arduino(Micro:bit/BPI:bit)
  • Compact body, strong integrity
  • N20 Miniature reducer
  • Infrared emission, infrared reception, line patrol, speed measurement, atmosphere lamp, I2C interface (support 3.3V and 5V), ultrasonic interface, buzzer, steering gear interface, needle row expansion port, expansion screw hole, etc...Fully functional, strong expansibility
  • Easy to use it.

BPI-QCar with BPI:Bit for Arduino IDE

Arduino is an open source electronic prototyping platform that is flexible and easy to use.With the help of the community, BPI: BIT can be programmed with the Arduino environment, which you can refer to in the tutorial BPI:bit_for_Arduino

Motor control

Learning Objectives: Master the basic motor control method of Q-CAR

Program effect display: car forward 1 second, stop 100ms, back 1 second, stop 100ms, left 1 second, stop 100ms, right turn 1 second, stop 100ms.

Q-Car Motor Test.gif

Arduino code link:

Ambient light control

Learning Objectives: To understand the basic usage of Q-CAR RGB atmosphere light

Program effect display: bottom RGB atmosphere light red, green, blue three color mixing gradient display a variety of colors, showing a color breathing effect.

Q-Car Pixel Test.gif

Arduino code link:

Ultrasonic sensor control

Learning objective: master the use of Q-CAR ultrasonic sensor

Program effect display: serial port display ultrasonic measured distance data.

Q-Car Ultrasonic Test 1.gif

Q-Car Ultrasonic Test 2.png

Arduino code link:

How to use buzzer

Learning objective: master the use of BPI-QCAR buzzer

Program effect display: the buzzer play "little star music"

Arduino code link:

IR control

Objective: To master the infrared remote control of Q-CAR

Program effect display: infrared remote control Q-CAR forward and backward and turn

Q-Car IR Control.gif

Arduino code link:

Ultrasonic obstacle avoidance

Program effect display: boot the car forward, ultrasonic detection of the front distance, if the distance is less than 8cm, the car left and right to check the obstacles on both sides, choose the direction of the farther distance to turn, to avoid obstacles.

Parts preparation: M2 copper column ×2, M2 screw ×2, SR04 ultrasonic module ×1, ultrasonic bracket ×1, steering gear bracket ×1(Download address of bracket),DuPont line number, insert SR04 interface in front。

Q-Car Avoidance Demo.gif

Arduino code link:


BPI-QCar with BPI:Bit use MicroPython

BPI-QCare with Micro:Bit use MakeCode

MakeCode programming light Micro:Bit Led

Learning Objectives: Familiarize yourself with basic Makecode applications and display some graphics or text on the Micro:Bit 5*5LED matrix.

Open the Makecode programming environment web side of Micro:Bit:

Create a new project and connect the Makecode blocks with the following routine. For example, the first block "Show Leds" can be found in the "Basic" options column. This block can edit the desired graphics

Microbit-screenshot (display graphics).png

Right-click building blocks to carry out some operations on the building blocks, such as add notes, delete copy building blocks, as well as access to the corresponding documentation of the building blocks, this for the first time people can provide great help.

The MakeCode programming environment has an emulator with its own simulation of the program to view the effect in real time, usually displayed at the top left

The Makecode programming environment also supports importing project files from outside, such as.hex files that are compiled by Makecode

Routine project file:

Note:The correct way to import *.hex file is to download the.hex file from the link above and then import it into the MakeCode, rather than directly importing the link. External project links import the MakeCode differently

Makecode(import file).png

The project file can be imported into Makecode to view and edit after downloading to local, or it can be directly burned to Micro:Bit through USB and run directly



在章节“使用MakeCode编程点亮Micro:Bit”的基础上,在MakeCode中“input”选项栏目中找到应用按钮控制的积木“on button A pressed”来进行编程


Using the button.png







Using the button 2.png


Routine project file:





Q-Car velocity measurement module.png

Q-Car velocity measurement module Serial port.png

Routine project file:





Q-Car Motor control module.png

Routine project file:





Q-Car Pixel.png






Q-car Ultrasonic ranging.png



Routine project file:





Q-car Music Arrangement.png