So what is MicroPython – MicroPython is a re-implementation of the Python programming language that targets microcontrollers and embedded systems.Microcontrollers are essentially really small computers that have been shrunk onto a single, small chip. Embedded systems are computers that function within a larger mechanical or electrical system. Embedded systems often use microcontrollers.
According to wikipedia, “MicroPython is a software implementation of a programming language largely compatible with Python 3, written in C, that is optimized to run on a microcontroller. MicroPython is a full Python compiler and runtime that runs on the micro-controller hardware. The user is presented with an interactive prompt (the REPL) to execute supported commands immediately. Included are a selection of core Python libraries; MicroPython includes modules which give the programmer access to low-level hardware.”
The MicroPython implementation for the Kittenbot Meowbit allows us to develop programs in MicroPython on the Meowbit, work with different electronics components and even create games in MicroPython for the Kittenbot Meowbit. Read more about the MicroPython implementation for the Kittenbot Meowbit here – MicroPython on Meowbit @ Github.
The Kittenbot Meowbit is being offered on a special discount for a limited time only. See the links below for addtiional details.
The Meowbit is a very versatile and feature packed board that comes at a very affordable price. The Kittenbot Meowbit comes with a 1.8′ full-color screen, 6 x programmable buttons, 1 x buzzer, built-in light sensor, temperature sensor, SD card slot (For external storage), multiplayer connector and edge connector. A special feature of the Meowbit is the in-built edge connector which should (**no extensive testing or certification of other 3rd party expansion boards has been conducted) ensure that the Meowbit pins is compatible with most micro:bit expansion boards out there. When combined with the Kittenbot Robot:bit board you have the ability to create a programmable versatile robot in a very short time. The Kittenbot Meowbit can also be used with the Kittenbot IoBit to create different electronics projects just like you would with the BBC Micro:Bit.
Getting MicroPython running on the Kittenbot Meowbit – In this section we will work towards getting MicroPython loaded on the Kittenbot Meowbit.
Follow the steps outlined below –
- Let’s start by connecting up the Kittenbot Meowbit to your laptop using a USB cable. You will need a USB cable that has a microUSB connector at one end, this is the end that goes into the Kittenbot Meowbit.
- Power on the Kittenbot Meowbit by sliding the power button at the top. The slider button is button 3 on the diagram shown above.
- Click the reset button once so that you get into the bootloader mode. The rest button is button 5 shown on the diagram above.
- Refer to the following article if you are unclear about what bootloader mode is – Article@OzToyLib
- You should now see your Kittenbot Meowbit as an additional drive on your laptop. Please ensure that this drive is visible on your laptop before you proceed any further.
- With the Kittenbot Meowbit drive now visible on your machine, let’s proceed and install the Python firmware onto our Meowbit.
- Drag and drop this file onto the new drive – <Python Bootloader>
- Hit reset twice and you should see the Kittenbot Meowbit boot into Python.
- You should see the following message on your Meowbit, “Welcome to MicroPython”
- Once you’ve completed steps 6 A – 6 C you would have successfully installed MicroPython on your Kittenbot Meowbit. You should now see your Kittenbot Meowbit as an additional drive on your laptop
- Let’s head over to the Kittenbot website and download and install the Python mu editor from – <Kittenbot software>
- With all of the above out of the way we can now start writing some MicroPython code on our Kittenbot Meowbit.
With the installation of the MicroPython firmware out of the way you should now be able to start writing code for the Kittenbot Meowbit. Make sure you’ve followed steps 6 A – 6 C to get your Meowbit booted into the MicroPython mode and the Meowbit now visible as a drive on your computer.
MicroPython File System for the Kittenbot Meowbit – With the Kittenbot Meowbit booted into the micropython mode we should now be able to see 4 different files on the Meowbit drive which shows up on your computer. The four different files are as follows.
- Boot.py – Boot.py is the main file that is used at startup. Micropython will run this file on priority when the Meowbit is powered on. It generally sets up the environment including access to the different libraries. This is a precursor to execution of the main.py file at boot.
- Main.py – Main.py is the user’s main program. This is where we will input all our code.
- Buzz.py – This is an additional buzzer driver library introduced by Kittenbot. Let’s not touch this one.
- Mpu6050.py – This is the driver library for accessing the six-axis gyroscope, which defines some functions that can be called. We’ll use this at a later point.
So keep in mind, all our code the Kittenbot Meowbit goes into the “main.py” file. We encourage you to install the Python Mu editor provided by kittenbot to write MicroPython code for the Kittenbot Meowbit.
The Countdown is On – For a limited time we are offering the Kittenbot Meowbit on a massive discount. Grab a new board from OzToyLib for 54.99$. This it a limited time offer and will end either when stocks end or when the offer time runs out. Check out the link provided for more details. Go ahead and grab one of the boards now.
So if you are keen on keeping up with the Digital revolution head and help your kids gain the skills to move from being digital consumers to digital creators head over to KidzCanCode.com and checkout the 70+ learning courses we have on offer. Get yourself and your kids started on their own STEM learning journey right away!!!!!!
At KidzCanCode.com we offer FREE access to various STEM (Science, Engineering, Technology, Math) development courses at KidzCanCode.com . At KidzCanCode.com you will find courses on Scratch, BBC Micro:Bit, Arduino, Raspberry Pi, fundamentals and advanced Robotics, fundamentals and advanced Electronics, Web development, Mobile application development, Python development, 3D modelling, etc.
If you are looking for a BBC micro:bit, Arduino, Raspberry Pi, starter kits, electronics kits, robotics kits including other STEM learning kits we would recommend you drop by our online store here – <OzToyLib>. Hopefully you have enjoyed the post. If you have any questions, comments or suggestions for future tutorials drop us a note at – learning at hack2 dot live.