Foreword

In late 2012, I had an idea to build a tiny, low-powered computing machine that could run scripts directly on the “bare metal” of the underlying hardware. The aim was to make it extraordinarily easy for anyone—no matter his or her background nor technical skill level—to be able to make a digital device that uses 1’s and 0’s to control the real world. In my particular case, I wanted an easier way to program the little robots that I was building at the time.

At first I didn’t have any particular scripting language in mind for this device, but after investigating what would be a good choice for the language, and what people would like writing in and would find easy to learn, I chose Python.

I was also interested in running a Kickstarter campaign, to see if people liked the idea and to perhaps begin to build a community around the project. The first Kickstarter campaign that ran at the end of 2013 really did kick start MicroPython: it raised funds to build 3,000 pyboards upon which MicroPython would run; it brought nearly 2,000 people into the initial community; and it attracted some very talented programmers who volunteered their time and expertise to contribute to and improve MicroPython.

My background is theoretical physics, so I approach the design and development of MicroPython from a much more academic and research-oriented point of view, compared to simply engineering a solution to a problem. I believe this has been part of the reason for the success of MicroPython. From the outset it was not obvious that MicroPython would even work, that Python could at all be shrunk down to such a small size and run on tiny microcontrollers with very little memory. I treated the creation of MicroPython like a research project and I used analysis combined with many coding tricks, ignoring a lot of software development principles, in order to just get it working.

My general philosophy with MicroPython is to remain minimal yet usable. And the name embodies this: “micro” makes reference to microcontrollers and embedded systems, but also gives the feeling of minimalism. “Python” is the language and is a very pragmatic and usable language, designed so humans can enjoy programming. On the one extreme, making everything too minimal hurts (the ultimate minimalism is nothing!), but on the other extreme, adding masses of usability features leads to over burden and excessive resource usage. These ideas about balancing minimalism with pragmatism apply not just to the design and development philosophy of Micro­Python but also to the wider computing industry and even beyond.

Since the first Kickstarter MicroPython has seen fantastic growth, and I, along with many others in the community, have put an immense amount of work into Micro­Python, on both the hardware and software fronts. Today MicroPython stays true to its original goal of making it easy for anyone to digitally control the real world, and is widening its scope and seeing use by hobbyists and professionals, in education and research, as well as commercial products. MicroPython has actually formed its own little industry (soon to be much bigger!), and it’s very humbling to see one’s creation grow and attract interest from so many diverse people around the world, and for so many diverse applications.

MicroPython is constantly improving, the community of users is growing every day, and the future looks very bright indeed. I hope that MicroPython continues to inspire people, continues to help people learn, and continues to be used to build and control systems, from coffee makers to space satellites. Digital computing devices need to be programmed and MicroPython provides an efficient and enjoyable way to do just that.

Nicholas has been a great proponent of MicroPython since the early days and has contributed immensely to its development, most notably from the community and education side, and was key to the development and success of the micro:bit platform. He knows MicroPython very well, particularly from the point of view of an end user, and is well qualified to teach you about it.

So dive into it, read and enjoy this fantastic initiation into the world of MicroPython, and go out and build some amazing digital devices!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.122.162