MicroPython, bringing Python to hardware for everyone #OHM2019 #oshwa @ohsummit #opensource #opensourcehardware @opensourceorg @micropython #micropython

Mpheader

The next chapter for electronics is Python, from powerful Raspberry Pi computers to low-cost microcontrollers which are able to drive robotics, to running Machine Learning, the most popular programming language in the world (Python) has arrived on hardware, and we have MicroPython and its creator, Damien George, to thank.

First up, what is MicroPython? Glad you asked, here it is directly from micropython.org

MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments.

The MicroPython pyboard is a compact electronic circuit board that runs MicroPython on the bare metal, giving you a low-level Python operating system that can be used to control all kinds of electronic projects.

MicroPython is packed full of advanced features such as an interactive prompt, arbitrary precision integers, closures, list comprehension, generators, exception handling and more. Yet it is 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 to allow you to transfer code with ease from the desktop to a microcontroller or embedded system.

There’s also a good history of MicroPython over on Wikipedia, and we’ve posted about some of the early days, history, and its recent 6th birthday…

  • 29th April 2013: first line of code written (in private, before anyone knew about it, before it was even called Micro-Python)
  • 17th Sept 2013: first code running on a microcontroller, on the very first prototype of the pyboard
  • 2nd Oct 2013: register micropython.org
  • 4th Oct 2013: first commit in what is now the main repository
  • late Dec 2013: source code up on GitHub
  • 21st June 2014: last of the Kickstarter rewards sent out (for the first Kickstarter)

The Early Days of MicroPython – YouTube.

April 29, 2019 is the sixth ‘birthday’ of MicroPython. At the April Melbourne Meetup, Damien George, creator of MicroPython, delves into his archives and shows the earliest code and notes about the goals of the language. The material pre-dates the first git commit! Listen in as Damien reveals how and why the language began and evolved. It’s a nice way to celebrate MicroPython’s sixth birthday!

In newsletter #8 from MicroPython, Damien published some never-before-seen details about the start of MicroPython.

Here is an excerpt from the initial notes. The title is “Python board” and the date is 29 April 2013:

Python board 29/4/2013

The smallest, cheapest python.

A piece of hardware that is small and cheap, runs python scripts, and has good low-level access to hardware. If we can do it with a single chip, that would keep it small and cheap. Need then something with a large amount of flash and a decent amount of RAM, that also is cheap enough. Atmel SAM’s have order 1MiB flash and 128KiB SRAM, for around $10 one-off.

Main features:

  • Implements Python 3 core language.
  • Flash presents as a flash drive with vfat filesystem.
  • Put python scripts on flash and it runs them (maybe have a (multicolour?) led that flashes on error and writes a “core” dump to the flash). This led can also double as a user output led.
  • Can run multiple scripts on once.

Our strength would be small, cheap, simple, easy to replicate.

Can have a range of boards with different features. But all must be basically compatible and capable of running the same scripts.

Adafruit 2019 2841

Pybv1 1

Schem

In addition to the open-source software, the PyBoard (2013) is open-source hardware.

You can learn more about MicroPython and keep up-to-date with developments via the following resources:


Open source hardware month @ Adafruit:


Ohm

October is open-source hardware month! Every single day in October we’ll be posting up some open-source stories from the last decade (and more!) about open-source hardware, open-source software, and beyond!

Have an open-source hardware (or software) success story? A person, company, or project to celebrate? An open-source challenge? Post up here in the comments or email [email protected], we’ll be looking for, and using the tag #OHM2019 online as well! Check out all the events going on here!


Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 38,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New Products 11/15/2024 Featuring Adafruit bq25185 USB / DC / Solar Charger with 3.3V Buck Board! (Video)

Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

Adafruit IoT Monthly — The 2024 Recap Issue!

Maker Business – Adafruit Daily — Apple to build another chip at TSMC Arizona

Electronics – Adafruit Daily — SMT Tip – Stop moving around!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !


No Comments

No comments yet.

Sorry, the comment form is closed at this time.