Installing Micropython on a Microcontroller

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
greaterostrich
Posts: 1
Joined: Sun Sep 20, 2015 4:08 am

Installing Micropython on a Microcontroller

Post by greaterostrich » Sun Sep 20, 2015 4:25 am

Hi everyone,

I'm an iOS / Android / server developer by trade. I'm supper interested in learning to use Micropython because I know how to code in high level languages like python. I was wondering how I can install Micropython on my own microcontroller? Let's say that the microcontroller has bluetooth and a GPS inbuilt, how can I configure the operating system to work with data from that? Do I need to provide information about the architecture of the microcontroller to the OS somehow?

Sorry if this sounds super naive, I just want to learn!

Antoine

User avatar
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: Installing Micropython on a Microcontroller

Post by platforma » Mon Sep 21, 2015 9:21 am

Hi Antoine,

It all depends on what architecture your microcontroller is running, perhaps you can let us know what board you have and what processor is on it?
- Different platforms that micropython can run on are called "ports" and you can see a list of supported ones on the https://github.com/micropython/micropython, for example folders like bare_arm, unix etc
- The "installation" of micropython is usually referred to as "flashing", permanently putting micropython in ROM of your MCU.
- Once you determined which port you need to flash, you will need the tools to compile it. Each port folder usually has a README file or there's plenty of info on the forum already.
- Once you flashed your compiled micropython it's time to write some python to interact with your bluetooth/GPS...but not too fast. If there's a driver already developed by the community then you're in luck, but very likely that nobody used the same peripherals as you and you'd need to write/port one yourself.
- Use the board like a normal python socket server/client with an application running on your OS and exchange the data you're interested in.

Hope that helps!

QuaakHaak
Posts: 8
Joined: Wed May 18, 2016 4:14 am

Re: Installing Micropython on a Microcontroller

Post by QuaakHaak » Wed May 18, 2016 5:41 am

Hi Platforma,

I have been searching for information such as Antoine and while you answer is helpful, I think that the github/micropython page could be more clear. I'd expect that many people (Such as myself today) who come across MicroPython on the interwebs or specifically on Youtube will want to search for compatible devices based on the current github code tree.

Perhaps a list of Non-PyBoards that are known to work with the current MicroPython code base might be handy, something such as:
MicroPython ver XYZ is known to work on the following boards:
STM32F4xxxxx
STM32F4xxxxx
STM32F4xxxxx
STM32F4xxxxx
STM32F4xxxxx
... and so on.
This may allow for an interested but non-MCU experienced person to undertake further research and perhaps ask some more precise questions on the board to establish a more focused Time/Cost judgement.

Just my $0.02.

TIA, Quaak.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Installing Micropython on a Microcontroller

Post by deshipu » Wed May 18, 2016 10:02 am


QuaakHaak
Posts: 8
Joined: Wed May 18, 2016 4:14 am

Re: Installing Micropython on a Microcontroller

Post by QuaakHaak » Wed May 18, 2016 9:57 pm

Haha Deshipu,

You educated me both on IRC & the forum, well done :D ... bonus points for you.

Thanks, Quaak.

Post Reply