Home > On-Demand Archives > Demos >

Mycropython Projects

Jacob Beningo - Watch Now - EOC 2020 - Duration: 09:34

In this session, embedded systems consultant and author Jacob Beningo discusses MicroPython and how it is being used today to build products. Jacob also provides an overview of his new book MicroPython projects and demonstrates a gesture controller written completely in MicroPython.
M↓ MARKDOWN HELP
italicssurround text with
*asterisks*
boldsurround text with
**two asterisks**
hyperlink
[hyperlink](https://example.com)
or just a bare URL
code
surround text with
`backticks`
strikethroughsurround text with
~~two tilde characters~~
quote
prefix with
>

Andrew
Score: 0 | 5 years ago | 1 reply

Hi Jacob thanks for the book. I have just added it to my Oreilly toRead list :).
I would have three questions:

  1. What was the reason behind selecting microPython for a satellite? I would assume it would require more cpu cycles and consume more energy.
  2. Normal python is an interpreted language will the microPython source code be compiled to binary or the interpreter is executed on the device.
  3. Does it have a GC running to clean up all allocated memory. If so would that make your program unresponsive during that process.

It is really interesting conference. Thanks (to you and others) for the organizing it.

Jacob_BeningoSpeaker
Score: 0 | 5 years ago | 1 reply

Thanks for the questions. Also I'm glad to hear that you are enjoying the conference.
1) There were several reasons for selecting MicroPython for the satellite. First, we had a small team and a lot to do and we were able to have the EE's write test scripts to test and validate the hardware. Second, the main software team knew Python well but not C or C++. Third, there was room for risk on the mission and we all wanted to see if we could make MicroPython work on orbit successfully. We were running it on an STM32 at about 120 MHz and while more CPU cycles are needed to run the interpreter, the satellite had enough power budget for it. (In fact, there were several application processors running Linux so power was not an issue in this case).

2) The interpreter is executed on the microcontroller. You can still compile scripts and code into the kernel or create what they call frozen modules which is byte code that can execute more efficiently than a text based script.

3) Yes. It does have GC (garbage collection). MicroPython has API's to allow a developer to control GC. It usually runs pretty fast but we all know murphy makes sure it runs at the worst time. The developer can enable and disable collection for critical activities to ensure a deterministic and real-time response.

Thanks again for the good questions!

Andrew
Score: 0 | 5 years ago | no reply

Thank you for that info. I will have to do some personal project with STM32 and microPython in the near future.

Jacob_BeningoSpeaker
Score: 0 | 5 years ago | no reply

If you have any questions about MicroPython or software development techniques, I'm happy to answer our questions.

OUR SPONSORS

OUR PARTNERS