Using MicroPython With The Kitronik Motor Driver Boards for Raspberry Pi Pico

We've recently launched two motor driver boards for the Raspberry Pi Pico, the Kitronik Motor Driver Board for Raspberry Pi Pico and the Kitronik Robotics Board for Raspberry Pi Pico. We've also just created a GutHub repository for each board with MicroPython example code to make the job of using the boards as simple possible. This guide contains everything you need to get up and running, including a beginners guide video for using the Thonny editor with MicroPython.

 

The Raspberry Pi Pico:

The Raspberry Pi Pico is probably the best option out there for getting to grips with microcontrollers. It's super cheap, packed full of features, and it already has a wealth of user friendly information available. Much of this information has been aimed directly at the beginner. As you grow, the board has the beans to remain the board of choice no matter how complex your ideas become.

 

MicroPython:

MicroPython is a lean and efficient implementation of the Python 3 programming language that has been optimised to run on microcontrollers. It is packed full of all of the features required to fully unlock your choice of microcontroller whilst also being compact enough to fit and run within just 256k of code space and 16k of RAM.

MicroPython aims to be as compatible with normal Python as possible so that transferring code from the desktop to a microcontroller/embedded system can be done with ease. As Python has a high level of english, it is more easy to read and learn than most other computer launguages. This means that the leaner MicroPython version of Python is a great place for the new user to start learning to code.

 

Introduction To Using The Thonny Editor With MicroPython:

The following video has been made to introduce the new user to getting started with coding the Raspberry Pi Pico with MicroPython. The video also covers the Thonny editor. Thonny is an editor that has been specifically designed to be the editor of choice for all ability levels. The starting GUI is lean and simple to use and can be configured for extras functionality as you grow.

 

 

The Kitronik MicroPython GitHub Repositories:

Whenever we develop anything new we are always looking to simplify their use with resources as much as possible. Our motor driver boards for Raspberry Pi Pico are no exception. To that end we've produced two repositories on GitHub that contain MicroPython example code and other useful information. See below for more details;

Motor Driver MicroPython GitHub Repository:

A class and sample code to use the Kitronik motor diver board for Raspberry Pi Pico. This repository is for use with MicroPython on the Pico. It includes code for controlling motors, servos, and stepper motors. When working in an editor such as Thonny, please ensure that your board is connected and powered up to avoid any errors. Head to the repository for more information.

 

 

 

Robotics Board MicroPython GitHub Repository:

A class and sample code to use the Kitronik Robotics board for Raspberry Pi Pico. This repository is for use with MicroPython on the Pico. It includes code for motors, servos, and stepper motors. When working in an editor such as Thonny, please ensure that your board is connected and powered up to avoid any errors. Head to the repository for more information.

 

 

 

 

A Practical Guide to Modules:

The code in the repositories is designed to be used as a module. See this guide for more information.

"A module is just a file that is separated from your main file, but the code in it is used as though it was all in one place. To make the code visible in a file the import statement is used. This tells the python interpreter that there is a file somewhere that has more code in it, and it should use that code as well please."

 

Links To All Repositories For These Boards:

 

Make sure you don't miss out on other news or free resources by signing up for our newsletter here.

Leave a comment

All comments are moderated before being published