Welcome to KittenBot documentation!¶
Welcome to the Coding & STEM Sharing of KittenBot, here you will find all the knowledge and information related to KittenBot’s products, including product details, specifications, use case sharing and coding tutorials.
Meowbit¶
Information about Meowbit and related tutorials.
Meowbit Introductions¶
Most teenagers nowadays like playing video games, in order to make them more intereseted in coding, Kittenbot has developed Meowbit, a handheld game console designed for MakeCode Arcade. Students can use MakeCode Arcade to create their own games and then play them on the Meowbit, allowing everyone to experience game design, truly realizing the concept of STEAM education.
In addition, Meowbit can also act as a control board for robots as it has the same edge connectors as the Micro:bit, making it compatible with Kittenbot’s expansion boards. Thus, the flexibility and possibilities with Meowbit can be further increased with expansion boards!
Meowbit has been officially approved by Microsoft as a recommended board for MakeCode Arcade.¶
Target Audiences¶
Schools and Institutes
Users interested in Game Design
Special Features¶
Supports Graphical Programming, suitable for beginners.
Combing Coding with Art, realizing concept of STEAM.
High flexibility, can be used as a game console or as a robot controller.
Multiple sensors have been built-in, allowing for more possibilities in coding.
Supports multiple coding platform, including MakeCode Arcade and Kittenblock.
Nostalgic and adorable graphics.
Highly portable, allows you to play you games anywhere.
Supports Chinese Unicode, allowing you to display Chinese characters.
Specifications¶
Dimensions: 52x76x12mm
Weight: 42g
CPU: STM32F401RET6,32-bit ARM Cortex M4
Power Inpit: 5V USB, 3.7~4.2V Battery Box
Screen: TFT Full-Color
Resolution: 160x128
Screen Size: 1.8 inches
IO Pins: 20PIN(Same as Microbit)
Onboard Devices:¶
Programmable Buttons x6
Buzzer x1
Programmable LEDs x2
Light Intensity Sensor x1
Temperature Sensor x1
Accelerometer x1
SD Card Slotx1
JacDac Connectorx1
Breakdown Diagram¶
1: Power Indicator
2: Light Sensor
3: Power Switch
4: Programmable LEDs x2
5: Reset Button
6: DFU/Menu Button
7: TFT Screen
8: Temperature Sensor
9: Programmable D-Pad
10: Programmable Buzzer
11: Programmable A and B Buttons
12: Edge Connectors
13:USB Port
14:SD Card Slot
15:JacDac Connector
16: 6-Axis Accelerometer
17:3.7V Battery JST Connector
18: Main Chip
19: Unicode Chipset
20: Name Plate
Supported Programming Platforms:¶
Microsoft MakeCode Arcade
Kittenblock
Detailed Pinouts:¶
MeowBit System Operations¶
This page will explain how to use the system operations on the MeowBit, including entering uploading mode, opening options or firmware updates.
Entering Upload Mode¶
Only in Upload Mode can the games be uploaded to MeowBit.
Method 1¶
Connect the MeowBit to a computer using an USB Cable.
Hold the A button on the MeowBit and switch the power on.
The Meowbit is in Upload Mode when this screen is shown.
Method 2¶
Connect the MeowBit to a computer using an USB Cable.
Switch the power on.
Hold the A button and press the reset button.
The Meowbit is in Upload Mode when this screen is shown.
Updating the Firmware¶
Enter Upload Mode first.
Put the files onto the device called Arcade-F4. After updating, press the reset button to finish the update.
Meowbit MakeCode Coding QuickStart¶
MakeCode Arcade is a programming platform for making games developed by Microsoft, it is also the main programming platform for Meowbit.
Meowbit has been officially approved by Microsoft for MakeCode Arcade.¶
MeowBit HourOfCode Tutorials¶
We are delighted to have the permission of Mr. Kwok from Tin Ka Ping Secondary School to show his tutorials of making games on MakeCode Arcade.
In this 2-session tutorial, you will learn to create your own game from scratch.
Your First Meowbit Game (Video is in Chinese)¶
Please start watching from the 118 minutes mark, the session lasts approximately 1 hour.¶
Credits¶
Mr. Kwok’s Classroom:
https://www.facebook.com/kwoksirclassroom/
Hong Kong InnoSpace HourOfCode:
https://www.facebook.com/watch/107807216571940/728249611306184
Meowbit Kittenblock Coding Quickstart¶
Kittenblock is a programming platform designed for teenagers, it is another major programming platform for Meowbit.
Connect Meowbit to Kittenblock¶
Establishing a connection between Meowbit and Kittenblock is required to program Meowbit from Kittenblock.
1. Connect Meowbit to computer and enter upload mode.¶
Hold button A and turn on the power.
A device called Arcade-F4 would appear.
3. Flash the firmware.¶
A device called PYBFLASH would appear.
If the device is called USB Drive, hold down B and press reset.
4. Click the Exclamation Mark Icon and click Connect.¶
A string will be displayed on Meowbit to notify it is connected to Kittenblock.
MeowBit’s Light Sensor¶
Meowbit has a built-in light intensity sensor, allowing it to detect environment brightness.
Meowbit’s Accelerometer¶
Meowbit has a built-in accelerometer for measuring rotation and acceleration of the device, as well as detecting different gestures.
Meowbit’s Temperature Sensor¶
Meowbit has a built-in Temperature Sensor that allows it to detect the ambient temperature.
Meowbit’s IO Pins¶
Meowbit has the same 20 IO Pins as the Micro:bit, you can connect different modules to use on the Meowbit.
MeowBit Wireless SD Module¶
With the Wireless SD Module, we can use Meowbit to communicate with other devices such as Micro:bit.
Specifications¶
Chipset: nRF51822 ARM Cortex-M0
Frequency: 16Mhz
Dimensions: 24x21X3mm
Weight: 14g
Max distance: 10m
Working Voltage: 3.3V
Protocols: Wireless 2.4GHz, Bluetooth 2.4G
Wireless Mode Indicator (Green for 2.4GHz, Blue for Bluetooth)
Mode Toggle Switch
Compatible with SD Card slot
Installation Method¶
Installation: Insert the module into the SD Card Slot of Meowbit with the golden connectors facing towards you.
Removal: Slowly and carefully pull out the module from the slot.
MakeCode Arcade Coding Tutorial¶
Load the extension for the wireless module¶
Wireless Extension: https://github.com/KittenBot/pxt-sdwireless
Blocks for the wireless module¶
MakeCode Arcade Error Message¶
This error message may appear in MakeCode Arcade when using the wireless module, this is simply because the emulator cannot emulate the wireless module.
Please ignore and continue.
Sending data¶
Data can be sent from Meowbit to the Micro:bit using the 2.4GHz radio.
Pressing A or B on the Meowbit causes Micro:bit to display different icons.¶
Meowbit & Robotbit¶
Meowbit can be used in conjunction with a Robotbit to achieve even more possibilities.
Robotbit Precautions:¶
1: The battery must be installed in the right way.¶
2: The screen of the Meowbit must be facing outwards.¶
MakeCode Arcade Coding Tutorial¶
Using Robotbit¶
Load Robotbit Extension¶
Robotbit Extension: https://github.com/KittenBot/meow-robotbit¶
Loading Extensions¶
Loading the extension for Robotbit would automatically load the extension for IO pins.
Blocks for controlling Robotbit¶
Using Meowbit and Robotbit¶
3. Controlling Stepper Motors¶
Connect stepper motors to the motor ports M1 and M2 of the Robotbit, with the red wire connecting to VM.
Meowbit & Neopixel¶
Meowbit can also be programmed to control Neopixel LED strips, such as the one on Robotbit.
MakeCode Arcade Coding Tutorial¶
Controlling LED strip¶
Load Light Extension¶
Blocks for controlling LED strips¶
Meowbit & IOBit¶
Meowbit can be used in conjunction with an IOBit to achieve even more possibilities.
MakeCode Arcade Coding Tutorial¶
Meowbit & Turtle(Kittenblock)¶
Turtle Academy is a programming tool designed for children, Turtle is also available on Meowbit in Kittenblock.
Kittenblock Coding Tutorial¶
Blocks for controlling Turtle¶
Turtle Movements and Filling¶
Press up to begin filling, press A to go forwards, use Left and Right to turn and press down to complete the filling.
Setting Coordinates and Drawing Circles¶
Setting the coordinates and drawing a circle with a radius of 20 pixels.
Pen Up and Pen Down¶
Any movement of the turtle would draw a line if the pen is down. We can use pen up to avoid this.
Using Pen Up and Pen Down, it can draw 2 serperate lines.
Meowbit’s Display(Kittenblock)¶
Meowbit’s screen can be programmed to display various text or shapes.
Kittenblock Coding Tutorial¶
Blocks for controlling the screen¶
Filling a color and clear screen¶
Drawing Rectangles and Circles¶
The coordinates of a rectangle represents its top-left corner, with width and height as w and h.
The coordinates of a circle represents its origin, with radius as r.
Drawing Triangles and Polygons¶
Give 3 coordinates as vertices to create a triangle.
The coordinates of a polygon represents its origin.
Displaying text¶
The coordinates are at the top-left corner of the string.
Traditional Chinese Characters are not supported yet.
RobotBit¶
Information related to Robotbit.
Robotbit¶
Robotbit (Version 2.2)
Suitable for school-based STEM education/ Training Institutes/ Enthusiasts
Must be used with Micro:bit
Purchasing Options¶
Online Shop———-→Robotbit v2.2
Package Contents¶
RobotbitV2.2 X 1
Robotbit Base X 1
18650 Li-ion Battery X 1 (Optional)
Special Features¶
Able to power a lot of actuators, DC motor x 4 or Stepper motor x 2 and Servo Motor x 8.
Extends the IO pins of the Micro:bit into Dupont connectors, supporting most electronic modules found on the market
Simplifies the power delivery system
Has a 18650 Li-ion battery compartment to provide a convenient and stable power source;
Can connect to external power that accepts up to 6V power, increasing the driving power even more.
Robotbit Base: Provides protection as well as pin holes compatible with Lego Technic pins
Built-in buzzer allows the Micro:bit to make sounds
4 programmable RGB LEDs, adds lighting effects to your projects
Robotbit Demo Video:¶
Dimensions and Weight:¶
Dimensions: 78mm x 57mm x 23mm
PCB Thickness: 1.5mm
Hole Diameter(Small): 3.0mm
Hole Diameter(Big): 4.8mm
Weight: 37.5g
Specifications:¶
18650 Voltage: 3.7V
USB Input Voltage: 5V
External Input Voltage:5V (Supports up to 6V, 3A)
VM Maximum Output: 1A(Under 18650 Battery)
Programming Platform¶
Hardware Support: Micro:bit, Meowbit
Programming Platform: Kittenblock(Based on Scratch 3.0) / Microsoft Makecode / Python(Mu editor)
Microsoft MakeCode¶
KittenBlock¶
1. Open Kittenblock and connect the Micro:bit with a USB cable¶
2. Connect KittenBlock with Micro:bit¶
3. The extension for Robotbit will be loaded automatically¶
Python¶
Robotbit can be programmed with Python.
Switch to “Coding Mode” to view and edit MicroPython code.
Breakdown Diagram¶
External Power Input
Power Switch
Power Indicator
Battery Level Indicator
MicroUSB Charging Port
2 Motor Ports for a total of 4 DC Motors or 2 28BYJ Stepper Motors
Buzzer Toggle Jumper
8 IO Pins(Corresponds to P0-P2, P8, P12-P15)
5V Output Pins
Buzzer
Servo Ports for 8 servos
I2C Port
18650 Li-ion Battery Holder
Battery Indicator
Micro:bit slot
Programmable RGB LED x 4
Servo Driver
Motor Driver
Mounting Holes
Lego Technic Pin Holes
Robotbit Details¶
18650 Battery Holder¶
¶
Please be careful with the polarity! Install battery according to the label on the holder.
For safety, the battery is not activated when it is installed for the first time. Press the Battery Activate Button or connect a USB power supply to activate the battery.
(This procedure should be done after each battery install)
18650 Power Switch¶
Push the switch to ON position(Towards the green connector) to power the board. (18650 Battery is needed)
Micro USB Charging Port¶
The Charging Port can charge the 18650 battery with any 5V USB power supply, any USB port on computers or phone chargers will work. It takes about 2.5 hours to fully charge a battery with a 5V1A supply, the Charging Indicator will light up green when it is fully charged.It is recommended to disconnect the power after fully charging. Please read the battery usage guidelines included in the box.
Attention: This port is for charging only! Not for downloading programs!
Power Indicators¶
Led(3) is a Power Indicator, it lights up when Robotbit is powered on.Led(1) is a Charging Indicator, it lights up when the battery is being charged. Led(2) is a Battery Level Indicator, it lights up when the battery is fully charged.
Micro:bit Slot¶
Used to install Micro:bit.
Correct orientation: The A and B buttons of the Micro:bit should face outwards.
If installed incorrectly, just reinstall it in the correct way. Micro:bit / Robotbit won’t be damaged.
Programmable RGB LEDs¶
, 8 servos with a total current of less than 3A is supported.
Motor Ports¶
A total of 4 DC motors can be used, alternatively 2 stepper motors can be used, the total current must be less than 2A. Do not use high current motors to avoid damaging the Robotbit.
A mix of motors can also be used.(2 DC Motors with 1 Stepper Motor)
Buzzer and Jumper¶
By default,the buzzer jumper is connected to enable the buzzer by connecting it to Pin 0.
Removing the buzzer allows usage of Pin 0.
The buzzer can be programmed using the Music coding blocks on MakeCode.
Micro:bit IO Pins¶
The IO pins of the Micro:bit(P0-P2, P8, P12-15) have been adapted into standard Dupont connectors compatible with most Arduino modules.P0-P2 supports both Analogue and Digital modules. P8, P12-P15 are only for Digital input and outputs.The pins have a voltage of 3.3V, for modules that need a 5V power, use the 5V pins next to the servo ports.
2PIN External Power Port¶
Pay attention to the polarity when connecting.
DC 5V power is supported by this port, it is recommended to use 5v power with more than 2A when using high torque motors and servos.
Under battery power, the VM port outputs 3.7V; Under external power, the VM port outputs 5V.
Robotbit Quick Start Guide¶
Install the Battery¶
Insert the Micro:bit¶
Activate the Battery¶
Turn on the Power¶
Robotbit & MakeCode¶
Robotbit improves the functions of Micro:bit on multiple aspects, Kittenbot has developed an extension for Robotbit so that users can easily make use of these functions.
Please refer to the following document for details:
Commonly Asked Questions¶
Robotbit does not turn on after installing battery and switching on the power.¶
Please check if the battery has been activated via the activator button.Please check if the battery has been installed correctly.Please check if the battery is charged.
What is the function of the battery activator?¶
The battery activator serves as a protection mechanism. In case of accidents such as over current or short circuit, the protection circuit will be activated to cut off the power to prevent damage. Pressing the activator will reset the circuit to its working state.
I can’t find my Micro:bit or Robotbit when connecting it to my computer.¶
The USB port on the Robotbit is only for charging the battery, not for communicating with a computer.
Will I destroy the Robotbit if I install the battery in the wrong way?¶
No, Robotbit was designed to prevent damage in this case. However please still be careful when installing the battery.
Will I destroy the Robotbit by inserting the Micro:bit in the wrong way?¶
No because Micro:bit will not be powered in this case.
How do I use Pin 0?¶
Pin 0 is used by the buzzer by default, remove the buzzer jumper to use Pin 0 as normal.
Micro:bit has more than 8 IO pins, where are the other ones on the Micro:bit?¶
Although Micro:bit has close to 20 IO pins, a lot of them are used by the Micro:bit’s built-in devices such as the LED matrix.
Although these occupied pins can in fact be used, it may be confusing and difficult for beginners. The 8 remaining free pins accessible with the Robotbit is more than enough for most projects.
If more IO pins are required, consider using IOBit, another expansion board made by Kittenbot.
Can the Servo Ports be used as IO Ports?¶
No, because the 8 servo ports are controlled by a servo driver, they are not IO pins.
What is the use of VM port on the Motor ports?¶
The VM port is only used by stepper motors, DC motors only need to use A+A- or B+B-者B+B-.
Can the board be placed on a metal or wet surface?¶
No, doing so will cause a short circuit and damage the board. Please install a Base to prevent short circuit.
What kind of current is supported by the external power input?¶
The external input supports a maximum current of 6V3A.
I can’t reproduce the results from the tutorials.¶
There may be slight mistakes in your wiring or your program, check each carefully.
The Robotbit seems to be broken, is there a warranty?¶
Each Robotbit has been tested to be in working order before they are packaged. Please check if the problem is caused by your program or your wiring, if you are certain that the Robotbit is damaged, please contact the supplier.
If the board is evaluated to be damaged by not man-made damage, the supplier will offer a replacement for boards that are within 1 year of their purchase according to the receipt.
Robotbit Version Changelog¶
Due to popular requests, Robotbit has experienced two updates since it was launched in 2017.
From V1.2 in 2017, it was updated to V1.3 and then updated again to V2.0 in 2018.
Changes to the Robotbit V2.0:
1. Increasing the number of IO pins¶
V1.3 only had 3 IO pins. V2.0 increased the number of IO pins to 8.
2. Improving the battery discharge mechanism¶
Now, charging will not cause the battery to heat up yet charging performance is not affected.
3. Improving the power switch¶
The new switch can completely cut off power to the board, thus solving the problem where the battery discharges while power is switched on.
4. Adding an external power input¶
Under the external power, high current motors or servos like MG995 can be used. With a 5V3A power, 4 MG995 servos can be used.
5. Improving the VM port¶
Increasing the output of VM port to 3A.
6. Upgrading to an independent battery protector chip.¶
Upgrading the battery protector chip with a high cost version to improve safety in discharging.
7. Adding a battery activator switch.¶
The battery activator serves as a protection mechanism. In case of accidents such as over current or short circuit, the protection circuit will be activated to cut off the power to prevent damage. Pressing the activator will reset the circuit to its working state.
8. Upgrading the buzzer.¶
The buzzer’s position and volume has been adjusted.
9. Upgrading the Micro:bit slot.¶
Reduces the wear on the edge connector of the Micro:bit, also making it easier to insert and pull out the Micro:bit.
10. Adding a 5V output¶
Adding a 5V output to make Robotbit compatible with even more electronic modules.
11. Improving the power indicators¶
Robotbit Base¶
Each Robotbit comes with a base, not only does using this base protect the bottom of the Robotbit from short circuiting, it also provides mounting holes for Lego Technic pins or screws, allowing more choices for building your robots.
Installing the Robotbit Base:¶
Robotbit Coding with MakeCode¶
Robotbit can be programmed using Microsoft MakeCode.
Makecode Coding¶
Loading the extension for Robotbit¶
1. In the extensions page, search for “Robotbit”.¶
Robotbit and its extension has been officially approved by Microsoft.
2. In Offline MakeCode by Kittenbot, the Robotbit extension can even be loaded without access to the internet.)¶
The blocks for Robotbit is added¶
1. Programming Motors¶
For information about DC motors by Kittenbot, please visit: Kittenbot Actuators
Sample Program:¶
Connect 2 DC motors to the M1A and M1B port of the Robotbit.
The speed of motor ranges from -255 to 255.
2. Programming Servos¶
For information about servos by Kittenbot, please visit: Kittenbot Actuators
Sample Program:¶
Connect a servo to the S1 port of Robotbit.
Connect the orange wire from the servo to the yellow wire of the Robotbit.
Typical servos have a rotation range of 0-180.
3. Programming Stepper Motors¶
For information about DC motors by Kittenbot, please visit: Kittenbot Actuators
The programming blocks were designed for Kittenbot's 28BY-48-5V stepper motor, using other motors may result in reduced accuracy.
Sample Program:¶
Connect Stepper Motors to the M1 and M2 port of the Robotbit, with the red wire connecting to the VM port.
Stepper Motors have a rotation range of -360 to 360.
5. Programming the built-in LED strip¶
The programming blocks for the LED strip are found in the Neopixel tab.
Remember to add a "Show" block to display the effect.(Except show color.)
5.1 Lighting up all lights¶
5.3 Customizing color with HSL.¶
HSL consists of a hue value with the range 0-360, a sturation and brightness value with the range 0-100.
6. Programming the IO Pins¶
The blocks for the IO pins are found in the Pins tab.
Pin 0-2 can be used as analog pins while P8, P12~P15 can only be used as digital pins.
Analog values have a range of 0 to 1023, digital values have a range of 0 to 1.
6.1 Reading values from pins¶
Pin 0 is occupied by the buzzer by default, the jumper should be removed when using this pin.
6.2 Writing values to pins¶
Pin 0 is occupied by the buzzer by default, the jumper should be removed when using this pin.
Robotbit Coding with KittenBlock¶
Robotbit can be programmed with KittenBlock.
Refer to this page for introduction with Kittenblock: Kittenblock Introduction
Kittenblock Coding¶
Connect the Micro:bit to your computer with a USB cable.
Click select hardware and choose MicroBit Python from the menu.
Press this exclamation mark(!).
Click this button to connect the Micro:bit.
Micro:bit will display a heart icon after connecting to Kittenblock.
If the Micro:bit does not show a heart icon,
The blocks for Robotbit will be added¶
1. Programming Motors¶
For information about DC motors by Kittenbot, please visit: Kittenbot Actuators
Sample Program:¶
Connect 2 DC motors to the M1A and M1B port of the Robotbit.
The speed of motor ranges from -255 to 255.
2. Programming Servos¶
For information about servos by Kittenbot, please visit: Kittenbot Actuators
Sample Program:¶
Connect a servo to the S1 port of Robotbit.
Connect the orange wire from the servo to the yellow wire of the Robotbit.
Typical servos have a rotation range of 0-180.
3. Programming Stepper Motors¶
For information about DC motors by Kittenbot, please visit: Kittenbot Actuators
Sample Program:¶
Connect Stepper Motors to the M1 and M2 port of the Robotbit, with the red wire connecting to the VM port.
Stepper Motors have a rotation range of -360 to 360.
5. Programming the built-in LED strip¶
Remember to add a "Show" block to display the effect.
5.1 Lighting up all lights¶
6. Programming the IO Pins¶
The blocks for the IO pins are found in the menu for Micro:bit.
Pin 0-2 can be used as analog pins while P8, P12~P15 can only be used as digital pins.
Analog values have a range of 0 to 1023, digital values have a range of 0 to 1.
6.1 Reading values from pins¶
Pin 0 is occupied by the buzzer by default, the jumper should be removed when using this pin.
6.2 Writing values to pins¶
Pin 0 is occupied by the buzzer by default, the jumper should be removed when using this pin.
Robotbit Shield¶
The Robotbit Shield is designed to facilitate the use of modules with a PH2.0 connector by adapting the Dupont connectors into 3PIN and 4Pin PH2.0 connectors, removing the need to use a conversion cable.
Robotbit Shield Breakdown Diagram¶
1: PH2.0 4PIN I2C Port
2~9: PH2.0 3PIN Ports
10: PH2.0 4PIN Port, identical to Port 2 of Armourbit
11: Dupont 4PIN I2C Port
12: Voltage Selector, switches the voltage at pin 0-2 to be 3.3V or 5V
13: Dupont 3PIN Port, VCC voltage can be switched by the selector
14: Power Indicator
15: 8PIN Female Connector, connects to the IO pins on the Robotbit
16: 2x2 5V Female Connector, connects to the 5V pins on the Robotbit
17: 4PIN Female Connector, connects to the I2C pins on the Robotbit
Attention: All PH2.0 ports have a voltage of 3.3V
IOBit¶
IOBit is a basic expansion board designed for Micro:bit, as the name suggests, IOBit makes the all IO pins of the Micro:bit accessible.
Product Details¶
IOBit is a low cost expansion board for Micro:bit, it extends all the IO pins of the Micro:bit into Dupont connectors for easy access. IOBit is equipped with a buzzer and a 3.5mm audio jack for making sounds with Micro:bit. It also has a power port to supply 3V or 5V power to your hardware. The edge connectors of the Micro:bit is preserved for users familiar with using crcodile clips.
Special Features¶
Converts the edge connectors pins of the Micro:bit to the standard 3 pin format. The singal, vcc and gnd pins can be distinguished by their colors.
Equipped with short circuit protection and a resettable fuse, avoiding dangers such as short circuiting because of incorrect connection.
Preserves the 3 pin edge connector of the Micro:bit, allowing users who are used to this system to use the board.
2 pin holes compatible with standard Lego Technic pins allow easy integration of the expansion board to your robotic projects.
Specifications¶
Dimensions: 56.8x44x12 mm
Power Input: USB 5V/Micro:bit Battery Box 3V
Power Output: 3.3V~5V, maximum 1A
Built-in devices¶
3 Pin IO Edge Connector
Buzzer and toggle switch
3.5mm audio jack
5V USB Port
Power switch
5V Input¶
Plug in a USB power supply
Press the power switch
The power indicator will light up
The 5V pins can now be used.
Demo Video¶
Precautions:¶
Do not use high current devices, large servos or motors with this board, as this may result it damaging the Micro:bit.
The 5V power supply is able to run multiple small servos as long as the total current is less than 1A.
Using Pin 0 requires the buzzer to be switched off or the buzzer may buzz erratically.
Since Pin 3 to Pin 11 are used by Micro:bit’s LED Matrix, the matrix needs to be turned off or it may light up erratically.
Do not connect to a USB power with current exceeding 1A.
KOI AI Camera¶
AI Camera KOI
All information about AI Camera KOI is documented here, including hardware information, coding tutorials and firmware updates.
AI Camera KOI¶
AI Camera KOI (HKBC8006A)
Online Shop¶
Available to purchase at KidsLab. → AI Camera KOI
Package Content¶
· AI Camera KOI x1
· MicroUSB Cable x1
· PH2.0 to Dupont Cable x1
· 128MB MicroSD Card x1
Product Introduction¶
· What is KOI?
AI Camera KOI is an offline Artificial Intelligence Module developed by Kittenbot. It is aimed to provide an easy to use platform for students and enthusiasts.KOI is an integrated module combining AI chip, camera, microphone, speaker, IPS display and Wifi chip into 1 convenient module.
AI Camera KOI has a lot of abilities, including Visual Recognition, Face Detection and Recognition, Object Classification, Speech Recognition and Text to Speech. With its built in Wifi chipset, you can even connect your KOI to the cloud for IoT AI Projects!
KOI’s functions can let you experience and learn Artificial Intelligence in a systematic way!
· Intended Audience:
STEM Education in Primary or Secondary Schools / STEM Enthusiasts / Advanced MakeCode or Kittenblock users
Features¶
· Combing AI and IoT functions, authentic offline AIoT projects can be realized
· Comprehensive peripherals are built in, a standalone module can realize AI functions including vision and speech
· Supports both graphical programming and code based programming, suitable for beginners and makers alike
· A customized classifier model can be trained, external models can also be imported from from SD Card
Specifications¶
· CPU: K210
· Supported Micro Controllers: Microbit, Arduino series or any micro controller with serial support
· Display Resolution: 1.3 inch 240x240 IPS
· Camera Resolution: 640x480 RGB
· Audio Input/Output: Outputs in 48khz mono, inputs in 8khz
· SD Card Slot: Supported MicroSD Card, used to store classifier models, images and sounds, and Python code
· WiFi Chipset: ESP8285
· Data Output Channels: UART / WIFI /USB
· Image Output Channels: USB / Wifi
· Input Buttons: 2 Programmable Buttons
· SD Card Support: 16 G
· Voltage: 3.3~5v
· Supported Programming Platforms:
Kittenblock
Makecode
Micropython
Arduino (PlatformIO)
KOI Close Up¶
Let’s take a closer look at the AI Camera KOI.
Camera Rotation¶
The camera can be rotated from 0° to 180°. Be careful of the cable when rotating the camera.
Front Camera Mode¶
When both the camera and the display are facing towards you, the KOI is set up in Front Camera mode.
This is usually used in face detection or visual recognition.
Back Camera Mode¶
Wehn the camera and the display are facing the opposite the direction, the KOI is set up in Back Camera mode.
This is usually used in object classification, qr code/barcode recognition or line tracing.
Display and Coordinates¶
KOI uses an IPS display with a resolution of 240x240.
The origin of the coordinates is at the top left corner with (x,y)=(0,0).
Real time camera feed and system notifications will be displayed on the monitor.
A & B and Reset Buttons¶
2 programmable buttons are found on both sides of the KOI, they function like the A and B buttons found on the Micro:bit.
A reset button is also found on the lower left hand side of the KOI, this is seldomly used.
Microphone¶
At the bottom left of the module, a microphone can be found. This microphone picks up sound in a range of approximately 50cm.
PH2.0 4PIN Connector¶
This connector handles the serial communication between KOI and other micro controllers.
Pin out:
Beginners are advised to use an Armourbit to prevent incorrect connection.
Micro SD Card Slot¶
The SD card slot has an ejector mechanism, it supports cards up to 16GB. Images, sounds and classifier models will be saved to here.
LEGO Pin Connectors¶
Round slots on the back of KOI are compatible with LEGO Technic pins.
Pin Connector Spacing:
Length: 4 spaces between pins
Width: 3 spaces between pins
MakeCode Quickstart Guide¶
Connecting to Micro:bit¶
1. Connecting to Armourbit¶
It is easier to connect to an Armourbit because they both use PH2.0 connectors.
When using KOI with an Armourbit, KOI needs an extra 5V power source.
Using the USB port on the battery box, 5V power can be supplied to KOI. (See figure below)
2. Connecting to Robotbit¶
As Robotbit can supply 5V power, there is no need to power KOI with an USB cable.
Please pay attention in connecting the power wires to the Robotbit.
DO NOT connect it in the wrong way.¶
Or KOI may not function correctly, it may even suffer damage.
Using the cable included with KOI, connect KOI to Robotbit using Dupont wires.
The Dupont wires are arranged as: Black, Red, Blue, Green
These wires correspond to: GND, 5V, P1(TX), P12(RX)
The (Blue)TX wire must be connected to an analog pin(Pin0-Pin2).
Remember to remove the buzzer jumper when Pin0 is used.
Do not connect Red to Ground and Black to 5V!!!¶
Ensure the connection is correct and switch the power on.
Blocks Explained¶
This section briefly explains the functions of blocks.
Please refer to tutorials for detailed tutorial and sample codes.
Classifier¶
It is easier to understand Classifier blocks if you are already familiar with ML5 extension on Kittenblock.
Classifier is used to train and run a customized model for object/scene classification.
Screenshots and Display¶
Micro SD card is required for this function to work.
The Screenshot block creates a png file and saves it onto the SD card. The name must not contain spaces.
The Display block finds the file on the SD Card then displays it on the screen for 1 second. The name must not contain spaces.
Show Text¶
The print block shows a string at the specific coordinates. It shows the text for 1 second by default, this duration can be changed via delay.
Display Orientation¶
Since KOI cannot detect the direction of the camera, the display orientation has to be set manually so that the image corresponds to camera direction.
There are 3 modes, Front, Back and Land. (Refer to figure below.)
Circle Tracking¶
A threshold can be adjusted, a higher value can filter out more noise and interferences, but tracking difficulty increases as well.
Tracking circle returns 3 values, the coordinates of the circle as well as the radius.
Rectangle Tracking¶
Similar to Circle Tracking, the threshold can be adjusted.
Rectangle Tracking returns the coordinates of the rectangle and its width and height.
Line Tracing and Color Blob Tracing¶
Calibration is required before tracing lines or color blobs.
Line Tracing returns the starting and ending coordinates of the line.
Color Blob Tracing returns the coordinates of the blob and its width and height.
Barcode/QRCode Recognition¶
Scans and returns the contents of the Barcode/QRCode.
The Barcode/QRCode should not be smaller than 3.5cm in width or the resoulution is too small to be recognized.
Apriltag Recognition¶
Apriltags are seldomly used in Hong Kong, this tag is usually used in robots.
Apriltags Recognition returns an id and its geometric attributes.
Face Detection¶
Load the face model before detecting faces.
Runs the model once to detect faces.
Returns the coordinates of the face.
Recording and Playing wav files¶
Micro SD card is required for this function to work.
This function records and plays a wav file from the SD card.
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
KOI Firmware Update¶
Kittenbot’s development team releases new firmware for KOI periodically to improve KOI’s functions.
Users can follow these instructions to update your KOI to the latest firmware.
KOI Update History¶
The latest and legacy firmware files can be downloaded here.
Latest Firmware(Version: v1.12.0)¶
Firmware Version: v1.12.0
Release date: 23/11/2020
Update Notes:
Improve Text-to-Speech stability
Face Recognition Improvements
Speech Recognition Improvements
UI Improvements
Greeting Screen:
Version:
Version: v1.9.5¶
Version: v1.9.5
Release date: 16/09/2020
Update Notes:
IOT Update
Voice Recognition Update
Increasing tag size from 20 to 40
Greeting Screen:
Version:
Checking the firmware version¶
Version is shown when booting up.
Connect to KOI on Kittenblock will cause a pop up showing the firmware version.
Updating KOI Firmware¶
Kittenbot’s development team releases new firmware for KOI periodically to improve KOI’s functions.
Users can follow these instructions to update your KOI to the latest firmware.
Update Method¶
Connect KOI to a computer using a USB cable.
You will need firmware flashing tool and a firmware file to update firmware. Download them using the provided link.
1. Download the version appropiate to your operating system.
2. Unzip the file.
3. Find and open kflash_gui.exe
4. Please allow the program to run if this message appeared.
5. Select the firmware file.
6. From Board, select Sipeed Maixduino。
7. Select the port that KOI is connected to.
8. Leave other settings as default and Download.
9. Wait for the update to complete.
10. Flashing done.
11. Reset KOI to check if update is successful.
KOI Wifi Firmware Update¶
Kittenbot may release Wifi firmware updates periodically to improve stability and performance.
Users can follow this guide to update their KOI Wifi firmware.
Load KOI Extension:¶
https://github.com/KittenBot/pxt-koi¶
Checking firmware version:¶
Build the following program.
Extension Version: 0.6.4 or above
Extension Version: 0.5.7 or below
Upload the program to Micro:bit and wait for KOI to connect to the internet.
Press A to show the IP address of KOI, write the address down.
If you have administrator rights to your network, you can go to your router's homepage and see the IP address directly.
Use a web browser and type in the IP address, then press Enter.
The firmware version is shown on the homepage.
Updating KOI’s Wifi Firmware¶
Download the latest firmware: v2.95
Enter KOI’s homepage using the above method.
Select Upgrade Firmware from the menu.
Select the right file according to the instructions.
The instruction tells us to upload user2.bin, so that file is selected.
The update will be done automatically.
KOI Coding with MakeCode¶
Interchanging between Armourbit and Robotbit¶
KOI supports both Robotbit and Armourbit, the only difference is in the initialization.
KOI Initialization¶
Load KOI Extension: https://github.com/KittenBot/pxt-koi¶
Loading Extensions¶
Initialization Blocks:
For Armourbit users, choose “init powerbirck port”.
For Robobit users, choose “init Tx Rx”
There are no difference between the 2 coding wise.
In the following tutorials, Robotbit will be used. Armourbit users can modify the code based on this guide.¶
A and B Buttons¶
KOI has 2 built in programmable buttons called A and B.
Using A and B Buttons¶
Load KOI Extension: https://github.com/KittenBot/pxt-koi¶
Loading Extensions¶
Blocks for buttons:
btnA and btnB refer to Button A and B respectively.
When the button is being pressed, it returns a value of 1. When it is not being pressed, it returns a value of 0.
Sample Program:¶
Program Flow¶
Download the program to Micro:bit.
Pressing button A on the KOI causes Micro:bit to show a smiley face, pressing button B on the KOI causes Micro:bit to show a surprised face.
Sample Code¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the KOI.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
Displaying Text¶
English strings can be displayed on the KOI screen.
Displaying Text¶
Load KOI Extension: https://github.com/KittenBot/pxt-koi¶
Loading Extensions¶
Blocks for displaying text:
We can add a delay to specify the duration shown.
The coordinates refer to the top left corner of the text. See figure below for explaination of coordinates.
Sample Program:¶
Program¶
Download the program to Micro:bit.
Pressing button A on the Micro:bit to display “Kittenbot” on the screen. Pressing button B to display “KOI” for 2 seconds.
Sample Code¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: Why does the text disappear after a short while?¶
· A: Since the dislay of the KOI keeps refreshing, the text cannot persist on the screen for a long time. For displaying persisting text, considering connecting an I2C OLED screen.
LCD Orientation¶
One advantage of the KOI is that camera is able to rotate from 0°~180°, however the image may be reversed on the LCD when the camera is rotated, thus we may need to change the LED orientation based on our use case.
Changing LCD Orientation¶
Load KOI Extension: https://github.com/KittenBot/pxt-koi¶
Loading Extensions¶
Block for Changing LCD Orientation:
From the drop down menu, there are 3 types of orientation to choose from.
Sample Program:¶
Program Flow¶
Download the program to Micro:bit.
1: When button A is pressed, the LCD is set to Front mode. The image looks correct when the camera is facing towards you.
2: When button B is pressed, the LCD is set to Back mode. The image looks correct when the camera is facing away from you.
Sample Code¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
Taking and Displaying Pictures¶
KOI can take pictures and display them like a digital camera.
Install an SD Card¶
The pictures are stored onto an SD card, without an SD card, these operations would fail.
Taking and Displaying Pictures¶
Load KOI Extension: https://github.com/KittenBot/pxt-koi¶
Sample Program:¶
Program Flow¶
Download the program to MicroL:bit.
Press button A on the Micro:bit to take a picture.
Press button B on the Micro:bit to display the picture.
Advanced Program¶
The above program can only save 1 picture because the file is overwritten when a picture is saved. By making use of numbers, we can create a camera program that stores many photos and show them all.
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: The picture appears noisy and there are black bars when I view the pictures on my computer.¶
· A: This is because KOI’s camera is not a phone camera, the quality and resolution is not as good. The black bars are caused by the difference in aspect ratio, since our computer monitors are typically 16:9 and KOI is 1:1, black bars would appear.
Recording and Playback¶
With the built-in microphone and speaker, simple recording and playback is possible.
KOI can record a 3 second audio clip and saves the file as a wav format.
Install an SD Card¶
The pictures are stored onto an SD card, without an SD card, these operations would fail.
Program Flow¶
Download the program to Micro:bit.
Press button A on the Micro:bit, KOI will record what you say.
Press button B on the Micro:bit, KOI will playback the audio file.
Sample Code¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: Can I change the recording duration?¶
· A: No, because recording duration is limited by the amount of RAM that KOI has.
4: Can I play mp3 files on the KOI?¶
· A: No, KOI can only play wav files, and file size cannot exceed 512KB.
5: Can I create my own wav files to play on KOI?¶
· A: Yes but make sure the duration is less than 3.75 seconds with a bitrate of less than 512kbps. The file size has to be within 512KB.
Scanning Barcodes and QR Codes¶
· Barcode is wide adopted in our daily lives, they are found on various products.
· QR Codes are used for data exchange or cashless shopping.
Scanning Barcodes and QR Codes¶
Load KOI Extension: https://github.com/KittenBot/pxt-koi¶
Sample Program¶
Program Flow¶
Download the program to the Micro:bit.
Point the KOI at a Barcode and press A on the Microbit, the content of the Barcode will be shown on KOI’s screen.
Point the KOI at a QRCode and press B on the Microbit, the content of the QRCode will be shown on KOI’s screen.
Advanced Program¶
There may not be enough time to read the contents if we show it on KOI, to improve readability, we can connect an OLED screen.
Sample Program¶
Load the extension for OLED: https://github.com/KittenBot/pxt-oled¶
Sample Code¶
1. Scanning Barcodes and QR Codes (Extension0.5.7)
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: KOI fails to recognize my Barcodes/QR Codes.¶
· A: Make sure the width of the code is at least 3.5cm and the code is entirely within the camera’s view.
Circle Tracing¶
KOI is able to find and track circles in a scene.
Circle Tracing¶
Load the KOI Extension: https://github.com/KittenBot/pxt-koi¶
Sample Program¶
Threshold¶
Threshold affects the detection rate, testing and fine tuning the value is needed for achieving the best results.
A higher threshold value decreases interference and noise, but detection difficulty increases at the same time, please trial and fine tune for different scenarios.
Program Flow¶
Download the program to Micro:bit, then press A on the Micro:bit.
The radius of the circle is shown on the Micro:bit while its coordinates are shown on the KOI.
Advanced Program¶
The information becomes more easily readable if we add an OLED screen.
Sample Program¶
Load the extension for OLED: https://github.com/KittenBot/pxt-oled¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: How do I improve detection rate?¶
· Adjust the threshold value.
· Keep a clean background.
· Make sure the circle has a sharp outline.
Rectangle Tracing¶
KOI is able to find and track rectangles in a scene.
Rectangle Tracing¶
Load the KOI Extension: https://github.com/KittenBot/pxt-koi¶
Sample Program¶
Threshold¶
Threshold affects the detection rate, testing and fine tuning the value is needed for achieving the best results.
A higher threshold value decreases interference and noise, but detection difficulty increases at the same time, please trial and fine tune for different scenarios.
Program Flow¶
Download the program to Micro:bit, then press A on the Micro:bit.
The coordinates and dimenions of the rectangle are shown on the KOI.
Advanced Program¶
The information becomes more easily readable if we add an OLED screen.
Sample Program¶
Load the extension for OLED: https://github.com/KittenBot/pxt-oled¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: How do I improve detection rate?¶
· Adjust the threshold value.
· Keep a clean background.
· Make sure the rectangle has a sharp outline.
Line Tracing¶
Line Tracing is usually used in line tracing robots, we will learn how to obtain the coordinates of the line (x1,y1) & (x2,y2 )in this tutorial.
Color Calibration¶
Line Tracing and Blob Tracing both require calibration before using.
During calibration, a small green square will appear on the screen. Aim the square at the color you intend to track. The calibration will be done automatically.
It is recommended to have a distinct difference between the color you intend to track and the background.
Program Flow¶
Download the program to the Micro:bit.
Put a thin object in front of the camera and press A to calibrate color.
After calibration, the coordinates of the line will be shown on the screen.
Advanced Program¶
The information becomes more easily readable if we add an OLED screen.
Sample Program¶
The program works the same way as the normal program, but now the coordinates are displayed on the oled.
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: How to improve line tracing accuracy?¶
· A: Keep a clean background and use a color that is significantly different from the background.
Face Detection¶
Face detection has a wide range of application, we will learn how to do face detection in this tutorial.
Program Flow¶
Download the program to the Micro:bit, the pixel on the Micro:bit 把程式下載到Microbit上,可以看到Microbit的點陣隨著人臉的移動而移動。
Sample Code¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
Classifier Model Training¶
Machine Learning may seem like a farfetched concept. AI Camera is already capable of Machine Learning features in the form of object classification. KOI can be trained to recognize objects.
In this section, we will learn how to use the Machine Learning feature to easily train a object classification model.
Install an SD Card¶
The trained model will be stored on an SD card, without an SD card we won’t be able to save this model.
Program Flow¶
1: Download the program to the Micro:bit.
2: Put the first object in front of the camera and press B, slightly change angle and repeat about 3 times.
3: Press A to start training the next object.
4: Repeat the process until all objects have been analyzed.
The sample program has set the maximum number of object to 4, this can be changed to your liking.
A maximum of 40 images and 40 objects is supported by KOI.
5: Press A and B simultaneously to save the model.
The file name cannot include spaces, and it must be a bin or json file.
Demo video¶
Sample Code¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: KOI gives a warning message when I try to train a classifier.¶
· A: The classifier hasn’t been reset.
· Solution: Run the block for classifier reset, KOI will display a success message.
Classifier Model Predicting¶
In the previous section, we have trained a classifier model. In this section, we will use this model to classify objects.
Install an SD Card¶
The trained model will be stored on an SD card, without an SD card we won’t be able to save this model.
Program Flow¶
1: Download the program to the Micro:bit.
2: Press button A to load the classifier model.
3: Put the object in front of the camera. Press button B to run the classifier.
4: The tag of the object will be displayed on the Micro:bit.
Demo video:¶
Sample Code:¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: KOI gives a warning message when I try to train a classifier.¶
· A: The classifier hasn’t been reset.
· Solution: Run the block for classifier reset, KOI will display a success message.
Voice Recognition (Firmware v1.9.5 or above)¶
KOI is able to recognize our commands after training.
Recognizing Voice Commands¶
Load KOI Extension: https://github.com/KittenBot/pxt-koi¶
Sample Program¶
Program Flow¶
1: Download the program to the Micro:bit.
2: Press A and record the first command. A green color will be shown if the command has been successfully added. Otherwise red will be shown.
3: Press B to continue, you can now repeak step 2 and record the next command.
4: Repeat step 2-3 to record all your commands.
AI Camera KOI has the capacity for 10 voice samples.
5: Press A and B at the same time to recognize a command. A green color will be shown if KOI successfully recognizes your command, else it will show a red color. The command ID will be shown on Micro:bit.
Sample Codes¶
Voice Recognition Demo Video¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: KOI displays red everytime I try to record my command.¶
· A: The noise level hasn’t been calibrated, it is essential to run the block before voice recognition.
Voice Recognition Train Model(KOI v1.12.0)¶
From KOI v1.12.0 onwards, saving and loading a voice recognition model is supported.
Install an SD Card¶
The trained model will be stored on an SD card, without an SD card we won’t be able to save this model.
Training a Voice Recognition Model¶
Load KOI Extension: https://github.com/KittenBot/pxt-koi¶
Sample Program:¶
Program Flow¶
1: Download the program to the Micro:bit.
2: Press A to record the first command. KOI’s screen will display green upon a successful record.
3: Press B to record the first command. KOI’s screen will display green upon a successful record.
AI Camera has the capacity for 10 voice samples.
4: Press A and B at the same time to save the model.
The saved model must be in a .json format, or else it will not work.
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: KOI displays red everytime I try to record my command.¶
· A: The noise level hasn’t been calibrated, it is essential to run the block before voice recognition.
Voice Recognition Load Model(KOI v1.12.0)¶
From KOI v1.12.0 onwards, saving and loading a voice recognition model is supported.
Install an SD Card¶
The trained model will be stored on an SD card, without an SD card we won’t be able to save this model.
Program Flow¶
1: Download the program to the Micro:bit.
2: Press A to load the trained model.
3: Press B to recognize a voice command. KOI will display green upon a successful recognition.
4: Micro:bit will display the tag of the recognized command.
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: KOI displays red everytime I try to record my command.¶
· A: The noise level hasn’t been calibrated, it is essential to run the block before voice recognition.
Internet of Things (KOI v1.9.5)¶
The Wifi capabilities of KOI allows it to access IoT platforms.
Connecting to IoT Platforms¶
Load KOI Extension: https://github.com/KittenBot/pxt-koi¶
Sample Code¶
This tutorial just serves as a general example for communicating with MQTT servers, different MQTT servers may require different credentials.¶
ThingSpeak¶
Refer to this page for ThingSpeak tutorials: ThingSpeak Tutorial
Program Flow¶
1: Download the program to the Micro:bit.
2: Press A and B at the same time and wait for KOI to connect to the Wifi network.
KOI can store the Wifi and MQTT credentials, there is no need to run these blocks everytime we use these functions.
3: Press A to upload a random number to the MQTT.
4: Press B to read the data from the MQTT.
5: KOI will display the number on its screen.
Sample Code¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
Internet Time (KOI v1.12.0)¶
After connecting to the Wifi, KOI is able to tell the current time to function as a clock.
Getting internet time¶
Load KOI Extension: https://github.com/KittenBot/pxt-koi¶
Sample Program¶
Internet time returns an array-like object that has the format of: [year, month, day, hour, minute, second]
In the sample program, the current hour and the minute is obtained by index 3 and 4.
Program Flow¶
1: Download the program to the Micro:bit.
2: Press A to show the current time. (Timezone: GMT+8)
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
Face Recognition (KOI v1.9.5)¶
Face Recognition is the technology of recognizing individuals from an image. This function can be realized on KOI.
Face Recognition¶
Load KOI Extension: https://github.com/KittenBot/pxt-koi¶
Sample Program:¶
Wifi connection is required for Face Recognition.
Face Recognition is a free feature, therefore you must choose a unique name for your class.
For example, common names like testing, test1, class01 are already made by others.
A maximum of 20 images can be stored in each class.
Program Flow¶
1: Download the program to Micro:bit.
2: Press A to store a face to the class.
3: After a shortwhile, KOI will display the gender and the age of the face detected.
You can change the name and reupload the program to store another face.
6: Press B to recognize a face
7: KOI will display the name of this face and its confidence. If a new face is detected, KOI will display “stranger”.
Confidence level can range from 0 to 100.
Face Recognition Demo Video¶
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
3: KOI shows “Pic not has face” after taking a picture.¶
· A: This is normal because the focus may be off, try taking the picture again.
3: KOI shows “Get timeout” after taking a picture.¶
· A: This is because network conditions may not be good enough, or sometimes the server may be too busy.
Text-to-Speech (KOI v1.9.5)¶
By using BaiduAI, KOI can realize Text-to-Speech.
Program Flow¶
1: Download the program to the Micro:bit.
2: Press A and KOI will say “Hello” in English.
3: Press B and KOI will say “Good Morning” and “I am happy” in English.
The text to speech function only supports short phrases(2-3 words) and there must be no spaces between the words.
4: Press A and B and KOI will say “123” in Putonghua.
MakeCode does not support Chinese chracters but BaiduAI does, so BaiduAI will treat numbers as Chinese.
Extension Version and Updates¶
There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.
FAQ¶
1: There is no reaction after pressing the buttons on the Micro:bit.¶
· A: This is because KOI has a longer boot time than Micro:bit. When the power is turned on, Micro:bit has already ran the code for KOI initialization before KOI is ready.
· Solution: Reset your Micro:bit after KOI has been turned on. (The trick is to let KOI power on completely before initialization.)
2: Does KOI work with 3V input?¶
· A: No, KOI only works with 5V.
Meowbit發明家套件¶
Meowbit發明家套件是為Meowbit而開發的套件。這部分會詳細地介紹Meowbit發明家套件與其內容。
Meowbit發明家套件介紹¶
Meowbit發明家套件()¶
Meowbit發明家套件是一套針對Meowbit而開發的教育套件,為Meowbit提供多款電子硬件擴展Meowbit的功能性。發明家套件正正發揮了Meowbit上搭載了引腳這個優勢,配合各款感應器和積木,Meowbit的玩法就變得更加多,可以創作更多獨特的遊戲!
Meowbit發明家套件內容¶
Robotbit擴展板x1
滑動電位器x1
紅外線避障/巡線感應器x1
聲音感應器x1
全彩LED燈x1
貓耳超聲波x1
GeekServo 9G電機x1
GeekServo 9G舵機x1
公對公杜邦線x20
公對母杜邦線x20
18650鋰電池x1
導電銅片貼紙x1
USB數據線x1
積木包x1
造型紙板包x1
雙面膠紙x1
Robotbit底座x1
產品參數¶
包裝尺寸:195x175x70mm
淨重:650g
Meowbit發明家套件組裝資料¶
這裡合集了Meowbit發明家套件的模型組裝資料。
Meowbit發明家套件案例¶
Meowbit發明家套件案例說明書與教學