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!


Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here: adafruit.com/editorialstandards

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

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 — Select Python on Microcontrollers Newsletter: PyCon AU 2024 Talks, New Raspberry Pi Gear Available and 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 — Halloween, WiLo, and more!

Maker Business – Adafruit Daily — The worlds largest car exporter: China

Electronics – Adafruit Daily — Are you grounded?

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.