KS0426 Keyestudio Micro:bit Mini Smart Robot Car Kit V2

From Keyestudio Wiki
Revision as of 07:20, 20 February 2021 by Keyestudio (talk | contribs) (Description)
Jump to: navigation, search

Description

Micro:bit is significantly applied to STEM education for teenagers, as a small microcontroller, which features small in size, easy to carry, and powerful function. At present, innovative technology products, like robots, wearable devices and interactive electronic games can be produced by programming and code.
In this kit, we will guide you how to control and generate a Micro:bit turtle smart car through programming in Makecode.
MakeCode is a framework for creating interactive and engaging programming experiences for those new to the world of programming. The platform provides the foundation for a tailored coding experience to create and run user programs on actual hardware or in a simulated target.
To make you deeply know the micro:bit, we provide test code and projects.
The Keyestudio micro:bit smart car integrates obstacle avoidance, line tracking and IR and Bluetooth control functions. It contains passive buzzer, ultrasonic sensor, KEYES-2812-18R module, IR obstacle avoidance sensor and so on.
The passive buzzer makes music play, a KEYES-2812-18R module can display different effects, a photoresistor can detect light intensity.
Simultaneously, this smart car is chargeable. You only connect power to the port of battery holder.

Note: We adopt V1.5 micro:bit in the whole tutorial. But our tutorial is also compatible with the latest version micro:bit. When you do experiment with latest micro:bit, you need to transfer code into Makecode online editor first, save code again then download it to micro:bit.


thumb

Specifications

  • 1)Voltage: DC 5V
  • 2)Current: USB power supply or power supply with a capacity greater than or equal to 2A
  • 3)Maximum power: maximum output power is 10W
  • 4)Operating temperature range: 0-50 degrees Celsius
  • 5)Dimensions: 120*90.7mm
  • 6)Environmental attributes: ROHS

Product Kit

Please tear off the protective film on the acrylic board before mounting the kit
thumb


thumb

thumb

Micro:bit


thumb thumb

Set up your micro:bit

For more details, enter the website please:https://microbit.org/guide/

Function:


thumb

Features:

  • NRF51822 processor(16 MHz 32bit, ARM Cortex-M0, Bluetooth 4.0 low consumption/2.4GHz RF wireless, 16kB RAM and 256kB Flash)
  • KL26Z micro controller(48 MHz ARM Cortex-M0+ core,128 KB Flash)
  • 25 pcs programmable LEDs
  • 2 programmable buttons
  • Physical pins
  • Light and temperature sensors
  • Accelerometer(MMA8652 and I2C get the data from accelerator sensor)
  • Geomagnetic sensor/compass (MAG3110, I2C obtain three-axis geomagnetic data)
  • Wireless communication,by radio and Bluetooth.

Micro USB port

More details, please enter website:https://microbit.org/guide/features/

Hardware:

The details of micro:bit board: https://tech.microbit.org/hardware/


Micro:bit Pins

Before getting started with the following projects, firstly need to figure out each pin of micro:bit main board.

The BBC micro:bit has 25 external connections on the edge connector of the board, which we refer to as“pins”. The edge connector is the gray area on the right side of the figure below. There are five large pins, that are also connected to holes in the board labeled: 0, 1, 2, 3V, and GND. And along the same edge, there are 20 small pins that you can use when plugging the BBC micro:bit into an edge connector.

Please refer to the following diagram shown below.


thumb

More details you could refer to the official website:https://microbit.org/guide/hardware/pins/


Install Drive of Micro:bit Board

1)First of all, connect the micro:bit to your computer using a USB cable.

And enter website https://fs.keyestudio.com/KS0426Driver to download the driver file of micro:bit, double-click thumb

thumb

After downloading the driver, then click “Next”
thumb

The following page pops up and click“install”

thumb

thumb

Tap “Finish”. Then click“Computer”—>“Properties”—>“Device manager”, as shown below.


thumb


Keyestudio Micro:bit Mini Smart Car


thumb

thumb

thumb

Rechargeable Battery

The keyestudio micro:bit smart car is supplied power by a 18650 battery or USB port. The battery is rechargeable and maximum current is 700 mA. Note: the battery is not included in this kit.


Indicator

Show the working status of keyestudio micro:bit smart car.


thumb


Potentiometer


thumb


Assembly Guide

Note: Peel the plastic film off the board first when installing the smart car. To be honest, we never intend to send wood to you.

1.Install base plate of micro:bit mini smart car
(Take out the two self-tapping screws of universal wheels first, we provide the 2 pcs longer self-tapping screws to replace them, and don’t screw them too tightly)


thumb

thumb

2.Mount the top board of micro:bit smart car
(Note:Install it after peeling off the protective film on acrylic board.)
thumb

thumb

thumb

thumb

thumb


3.Wiring
thumb

thumb

thumb


4.Install Micro:bit Board


thumb

thumb

Code and Programming

We take Windows system as example to show you.

Get started with Micro:bit: Https://microbit.org/guide/quick/


Step 1: Connect Micro:bit Board

Link micro:bit board to computer with USB cable.(Guide to mobile apps:https://microbit.org/get-started/user-guide/mobile/) Macs ,PCs, Chromebooks and Linux system(including Raspberry Pi)support micro:bit.


thumb

There will be a MICROBIT drive in your computer, as shown below:


thumb


Step 2: Programming

We recommend you to use Google Chrome
Enter https://makecode.microbit.org/ then click thumb and you will view the dialog box.
Input“heartbeat”to name your project and click “Create”


thumb


thumb

Through MakeCode editor, you just need to drag blocks into code editing area to design program. There is a video to show you how to finish“heartbeat”pattern.
microbit-heartbeat.mp4
Next, we will introduce Makecode.


thumb

Step 3: Download Code

Enter Makecode editor, tap“Download”to get a“hex”file. Then copy it into MICROBIT drive.


thumb

thumb

Get “hex” file firstly, drag or copy it in MICROBIT drive. Then hex file will be copied on MICROBIT drive.


thumb


After the hex file is copied, the indicator of micro:bit board will be always on.

Step 4: Run program

Upload code on micro:bit board and plug in power with USB cable.
5 x 5 LED dot matrix will display heartbeat pattern.



thumb

micro USB for power supply

This chapter only shows you how to get started with micro:bit board. Python and JavaScript also support micro:bit board with the exception of Makecode.


Makecode

Browse https://makecode.microbit.org/ and enter Makecode online editor.


thumb

Click“New Project”, and input“heartbeat”,then enter Makecode editor, as shown below:


thumb


thumb

There are block “on start” and “forever” in the code editing area.

When plugging in power or resetting, “on start”means that command blocks in the code are only executed once, “forever”implies that code will runs cyclically.

Quick Download

We use the webUSB function of Chrome to allow the internet page to access the hardware device connected USB.
You could refer to the following steps to connect and pair device.

Pairing device

Connect to computer by USB cable. Click“...”beside“Download”and click“Pair device”.


thumb

Continue to tap “Pair device”


thumb

Then select the device you want to connect and“connect”in the window popping up
If there is no device in the window, please refer the following link:
https://makecode.microbit.org/device/usb/webusb/troubleshoot

We also provide thumb in the resource link.

What’s more, if you don’t know how to update the firmware of micro:bit, refer the link: https://microbit.org/guide/firmware/ or browse thumb we provide.


thumb

After connecting successfully, press buttons and download program to micro:bit board.


thumb

How to Import Makecode Extension Library

Next, we need to import K-bit extension library for using in further lessons.

Add a Kit-bit extension library

Enter Makecode and click thumbicon and tap thumb


thumb

Copy https://github.com/mworkfun/pxt-k-bit.git in the searching box and search k-bit library.


thumb

You can also select below extension library to import them directly.


thumb

“K-bit”extension library will appear in the page, click it to install and you need to wait for a while.


thumb

After installation, you can view K-bit extension library in the Makecode Blocks.


thumb


thumb


Note: the added extension library is only valid to one project, therefore, it won’t appear in other projects.
You need to add the K-bit extension library again when creating new projects.

Update or Delete K-bit Extension Library .
Refer to the following instruction please, if you intend to update or delete K-bit extension library.
Click "Js JavaScript" button to switch into text code.


thumb

Click “Explorer” to get extension library .


thumb

Click“thumb”to delete k-bit extension program(K_Bit, IrRemote and Neopixel), next to tap“thumb”to update k-bit extension program.


thumb

Resources and Code

Download resources and code of tool package: https://fs.keyestudio.com/KS0426
After the tool package is downloaded and unzipped, a file named KS0426 Microbit Mini Smart Robot Car V2 will be generated. It can be placed everywhere.

Import Code

We provide every program with hex file. You could import it directly or program in Makecode blocks area, therefore, the extension library must be added.(How to add extension?)

Next, we will take“heartbeat”as example to introduce how to import code
Open Makecode online editor on your computer


thumb

Click “Import” and“Import files”


thumb

thumb

Choose file“ ../Makecode Code/6.1:heartbeat/microbit-heartbeat.hex”, then tap“Go ahead” .



thumb

thumb

In addition to the above method of importing the provided project code program files directly into the Makecode compiler, you can also drag the provided project code program files directly into the Makecode compiler, as shown in the figure below:


thumb

The program is imported successfully after seconds


thumb

Note: device pairing can’t be completed in the Google Chrome if the system is Windows7/8, that is, the corresponding digital or analog signals can’t be read.
However, don’t worry about this issue, there is a CoolTerm software to read digital or analog signals. For the whole projects, we will use CoolTerm software.
Let’s install it firstly.

CoolTerm Installation

CoolTerm program is used to read the serial communication.

Download CoolTerm program:

https://freeware.the-meiers.org/

  • (1)After the download, we need to install CoolTerm program file, the Window system is taken as an example.
  • (2)Choose“win”
  • (3)Unzip file and open it. (also suitable for Mac and Linux system)


thumb

thumb


(4)Double-clickthumb
thumb

The functions of each button on the Toolbar are listed below:
thumb

Projects

For detailed projects, please browse the following link:

https://fs.keyestudio.com/KS0426