Page 1 of 1

Installing Micropython on a Microcontroller

Posted: Sun Sep 20, 2015 4:25 am
by greaterostrich
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!


Re: Installing Micropython on a Microcontroller

Posted: Mon Sep 21, 2015 9:21 am
by platforma
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, 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!

Re: Installing Micropython on a Microcontroller

Posted: Wed May 18, 2016 5:41 am
by QuaakHaak
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:
... 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.

Re: Installing Micropython on a Microcontroller

Posted: Wed May 18, 2016 10:02 am
by deshipu

Re: Installing Micropython on a Microcontroller

Posted: Wed May 18, 2016 9:57 pm
by QuaakHaak
Haha Deshipu,

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

Thanks, Quaak.