Blog Home

mail2code lets you program via email

Arduino TeamJune 13th, 2023

Getting started with physical computing presents a challenge to newcomers, whether due to the cost of acquiring hardware, learning how to manipulate GPIO pins, or being able to easily view what others have done to achieve their results. Norbert Heinz, who runs the site and YouTube channel HomoFaciens, therefore decided to build a system that anyone can control by simply sending an email.

The aptly named “mail2code” project is based around an Arduino Uno Rev3 board, which has been connected to a wide variety of peripherals to help students and hobbyists alike learn different hardware. The setup includes a DC motor attached to a central gear and a faster gear for exploring motors and interrupts, an array of eight LEDs that can act as a binary counter, a die face to explore random numbers, and a stepper motor with an accompanying Hall effect sensor that is used to learn analog signals in response to rotation.

In order to interact with all of this hardware, users are required to submit an email to a mail server hosted on a Raspberry Pi. It, in turn, compiles the C++ code and flashes the Arduino before activating its connected camera and recording what happens next for one minute. Lastly, the code and video clip are uploaded to Heinz’s web server for everyone to view, and an email is also sent to the sender notifying them of their code’s execution.

To view mail2code in more detail, you can watch Heinz’s video below!