Run Python on old Arduino modules

Old Dogs, New Tricks

© Lead Image © margaritatkahcenko,

© Lead Image © margaritatkahcenko,

Article from Issue 284/2024

Reuse your old Arduino hardware while learning Python.

Snek [1] is a tiny embeddable language that can run on processors too small for MicroPython. It supports about 20 of the older Arduino modules (e.g., Duemilanove, LilyPad, Mega, Nano, and Uno), as well as Snekboard controllers and LEGO robotics projects that use the LEGO EV.

Snek is based on Python syntax, but it only supports a small subset of the full Python language. The Snek implementation on Arduino hardware allows you to build some enjoyable Python projects with just a few lines of code. The programming experience you gain in Snek can be used in larger Python 3 or MicroPython projects.

In this article, I introduce Snek by showing you how to install and set up some simple Arduino projects. None of these examples use more than 10 lines of code.


Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Light Painting

    In the photographic method of light painting, you expose a subject over an extended period of time while moving the light sources. With a little technical support from a Raspberry Pi Pico, you can achieve sophisticated results.

  • CircuitMess Nibble

    The Nibble kit by CircuitMess is a freely programmable mobile game console that makes getting started with microcontroller programming a breeze.

  • BBC micro:bit

    Designed for students, the BBC micro:bit, in conjunction with MicroPython and the Mu editor, can help you get started with microcontroller programming.

  • Perl: Arduino Project

    With a few lines of self-written firmware and a simple Perl script, Perlmeister Mike Schilli trains one of his Linux computers with a plugged in Arduino board to switch electrical equipment on and off using a relay. Enchanting.

  • Arduino programming for open hardware projects

    Whether you are building your own device or customizing one, Arduino technology often functions as the foundation for your open hardware project. Here's how to get started with Arduino products.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More