MicroPython - Porting python to microcontrollers
Have you ever worked on embedded system projects? Does that challenge your C skills? What if you have a python interpreter running on a bare metal microcontroller? Then you should have a look at MicroPython project.
What is Micropython ?
MicroPython is a lean and fast implementation of the Python 3 programming language that is optimised to run on a microcontroller. The MicroPython board is a small electronic circuit board that runs MicroPython on the bare metal, and gives you a low-level Python operating system that can be used to control all kinds of electronic projects.
About the Talk
Running an interpreter based programming language in a microprocessor with an OS is considered to be easier than running a the same in a microcontroller environment ,where you won't get the luxury of the RAM (System memory) and available ROM ( It can be flash or EEPROM etc.).
In the most modern microcontrollers with ARM Cortex M4 or even M7 series the RAM is limited to few hundred kiloBytes and Flash will be few MegaBytes.
Keeping the limited memory availability in the mind micropython is an effort to port python 3 (cpython) into microcontrollers.
- PyBoard ( Official micropython boards) *STM32F4 ( Discovery boards )
- Tiva TM4C123G ( Launchpad board from TI)
- Arduino Due
- ESP8366 etc.
We will be running micropython with some of these boards.
The talk will be divided into three parts.
Part One : Micropython and cpython implementation
In this section I will briefly explain micropython architecture. including :
- Compiling and Virtual Machine
I will point out how a typical cpython implementation differ from the micropython implementation.
Part Two : Hands on with micropython
This will be more interesting part. we will port micropython in few supported platform and run some examples.
Through example we will check the working of all main functionalities ( Accessing driver level functions etc.).
Note : In the end of this section I will give some hints on how to port micropython into other currently unsupported platforms.
Part Three : Application
IOT is a hot spot now. Everything is connected now. We will discuss how we can increase the pace of IOT development using the simplicity of python.
Any one who has python knowledge can attend. It will be great if you the following skills
- Basic C skills
- Basics of Micro Controllers
MicroPython Website : https://micropython.org/
MicoPython GitHub Repo: https://github.com/micropython/micropython
Some PyCon Talks on Micropython : https://www.youtube.com/watch?v=MZ_KOS2BSEo&feature=youtu.be
MicroPython - Porting Python to microcontrollers ( Proposed talk presentation slides ) : https://github.com/aswinvenu/Micropython-Talk/blob/master/MicroPython-Presentation.pdf
I am a free and open source enthusiast. Currently working for a Bangalore based startup. I holds a B E degree in Electronics and Communication Engineering from Anna University. I have been doing research in Brain Computer Interface and distributed sensor networks for last two years. I am an OpenSuse Advocate and Fedora community member. I have been a part of volunteering committee of Pycon India for last 2 years.