Date: Thu, 16 Jul 2015 11:00:00 -0400
<p>Visit our <a href="http://pythonpodcast.com?utm_source=rss&utm_medium=rss">site</a> for more news, information and past episodes of Podcast.__init__!</p> <h3>Summary</h3> <p>We talked to Damien George about his work on the Micro Python interpreter and the PyBoard SOC (Systom On a Chip). The combination of the interpreter and SOC allows Python developers to get involved in hardware hacking, as well as letting electronics afficionados try their hand at development. Damien explained to us where this fits in with the expanding landscape of low cost embedded devices and why you should get one to start playing with it.</p> <h3>Brief Introduction</h3> <ul> <li>Date of recording – June 29th, 2015</li> <li>Hosts – Tobias Macey and Chris Patti</li> <li>Follow us on iTunes, Stitcher or TuneIn</li> <li>Give us feedback! (iTunes, Twitter, email, Disqus comments)</li> <li>You can donate (if you want)!</li> <li>Overview – Interview with Damien George from the Micro Python project</li> </ul> <h3>Interview with Damien George</h3> <ul> <li>Introductions <ul> <li>Postdoc in Theoretical Physics</li> </ul> </li> <li>How did you get introduced to Python?</li> <li>What problem were you trying to solve when you first had the idea to create the Micro Python board and interpreter? <ul> <li>Not really <img alt=":)" class="wp-smiley" src="https://i0.wp.com/www.podbean.com/smilies/icon_smile.gif?w=1200&utm_source=rss&utm_medium=rss" /></li> <li>Python lets you get things done quickly</li> <li>Abstracts the hardware really well</li> </ul> </li> <li>In the Kickstarter video you mention that Micro Python is a complete re-implementation of Python optimized to run on a micro-controller. How hard was it to create an alternative Python implementation? Did you have hard decisions to make as to what to include given the limitations of the hardware? <ul> <li>To start with, was it even possible? <ul> <li>Proof of Concept: Get a REPL running on the board</li> </ul> </li> <li>Lots of tricks to get things to fit into RAM <ul> <li>Stuffing integers into pointers</li> <li>Optimizing RAM at various points</li> <li>Runs the parser 4 times, looking for different things each time</li> <li>Lots of things are stored in ROM in the built-in Flash</li> </ul> </li> <li>Very fine efficiency trade off between code size, memory usage, speed.</li> <li>REPL runs in 1K of RAM! <ul> <li>Most of this is the parse tree</li> </ul> </li> <li>20 line script might take ~5K RAM</li> <li>128K RAM on the Micro Python board</li> <li>Not 100% Python – but 90% – the most useful parts</li> </ul> </li> <li>I know that people who have developed alternative Ruby implementations have run into issues due to the lack of a formal specification. Has the fact that there <em>is</em> a specification for Python made your job easier? <ul> <li>Definitely, Python is very well defined</li> <li>Well documented</li> <li>Already multiple implementations</li> </ul> </li> <li>The WiPy chip seems like an interesting device. What are some ways in which it could be put to use? A Micro Python cluster for instance? <ul> <li>Small, cheap, low power little wireless chip that also runs Python</li> <li>You can telnet in and have a Python REPL</li> <li>Part of the Internet of Things</li> </ul> </li> <li>What changes did you have to make to get the Python interpreter to run without an underlying operating system?</li> <li>When you were designing the hardware, what were some of the requirements that you were targeting in terms of performance or peripherals? <ul> <li>Wanted the best chip for the least money</li> <li>Didn’t know ahead of time how many resources were required</li> </ul> </li> <li>What level of hardware knowledge is required to start working with the Micro Python board? <ul> <li>Virtually none</li> <li>Just need to plug into USB and login with a terminal program to get a Python prompt</li> <li>Can change frequency of CPU, turn on/off LEDs, etc.</li> <li>Connecting peripherals requires some hardware knowledge</li> <li>Module namespace to make hardware management easier</li> </ul> </li> <li>For anyone who is interested in writing libraries, what kinds of restrictions do they need to be aware of? <ul> <li>Be aware of RAM size limitations</li> <li>Prety much anything that will fit will work</li> <li>Libraries with C extensions won’t work because they rely on the CPython API</li> </ul> </li> <li>What license is used for the Micro Python interpreter and the PyBoard? Are the compatible with commercial uses? <ul> <li>MIT License</li> <li>Hardware schematics are open source as well, open and accessible design</li> </ul> </li> <li>What are some of the most interesting/innovative projects that you have seen people make with the Micro Python board or runtime? <ul> <li>Damien attempted to make a quadcopter – not completely finished</li> <li>Micro Python controlled guitar – PyBoard connected to actuators to play guitar</li> </ul> </li> <li>How does the experience of using Micro Python compare to some of the other hardware projects that are popular right now such as Arduino, Raspberry Pi or Tessel? <ul> <li>PyBoard in between Arduino and Raspberry Pi <ul> <li>More approachable than Arduino</li> <li>Not a full OS like Raspberry Pi</li> </ul> </li> <li>Tessel similar to Micro Python but runs Javascript</li> </ul> </li> <li>EU Space Agency (Europe’s version of NASA) interested in Micro Python <ul> <li>Prepared to fund Micro Python development to explore possibilities of space based applications <ul> <li>Code needs to be well written and with few bugs</li> <li>See if it can be used for real-time systems</li> </ul> </li> </ul> </li> </ul> <h3>Picks</h3> <ul> <li>Tobias <ul> <li><a href="http://www.imdb.com/title/tt1586752/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Machine Gun Preacher</a> – Real life story of Sam Childers’ work in Southern Sudan</li> <li><a href="https://play.google.com/store/apps/details?id=com.obreey.reader&hl=en&utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Pocket Book Android App</a> – E-Book app with good UI/UX and solid feature set</li> <li>Online access to digital media through local library memberships <ul> <li><a href="https://www.hoopladigital.com/home;jsessionid=BA909933ECAB99A033C57A5620A272E4?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Hoopla Digital</a></li> <li><a href="http://app.overdrive.com/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Overdrive</a></li> </ul> </li> </ul> </li> <li>Chris <ul> <li><a href="https://en.wikipedia.org/wiki/Ramen?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Real Ramen</a></li> <li><a href="http://www.redhat.com/summit/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">RedHat Summit</a></li> <li><a href="https://github.com/mairin/selinux-coloring-book/blob/master/PDF/en/selinux-coloring-book_USLetter-Stapled.pdf?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">The SELinux Coloring Book</a></li> </ul> </li> <li>Damien <ul> <li><a href="http://mosh.mit.edu?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">MOSH</a> – Mobile shell, resilient SSH that allows for resuming sessions across networks, computer sleeps, etc.</li> </ul> </li> </ul> <h3>Keep in Touch</h3> <ul> <li>Twitter <ul> <li><a href="https://twitter.com/micropython?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">@micropython</a></li> <li><a href="https://twitter.com/damienpgeorge?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">@damienpgeorge</a></li> </ul> </li> <li>GitHub – <a href="https://github.com/micropython?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">micropython</a></li> </ul> <p>The intro and outro music is from Requiem for a Fish <a href="http://freemusicarchive.org/music/The_Freak_Fandango_Orchestra/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">The Freak Fandango Orchestra</a> / <a href="http://creativecommons.org/licenses/by-sa/3.0/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">CC BY-SA</a><img alt="" height="0" src="https://analytics.boundlessnotions.com/piwik.php?idsite=1&rec=1&url=https%3A%2F%2Fwww.pythonpodcast.com%2Fepisode-15-damien-george-talks-to-us-about-micropython%2F&action_name=Damien+George+Talks+To+Us+About+MicroPython+-+Episode+15&urlref=https%3A%2F%2Fwww.pythonpodcast.com%2Ffeed%2F&utm_source=rss&utm_medium=rss" style="border: 0; width: 0; height: 0;" width="0" /></p>