Tutorial 38: Use an Arduino as a Slave with Python (Nanpy)
I wanted to use an Arduino as a slave with my Raspberry Pi for a project I was working on. The Arduino provides great digital and PWM outputs and has a built in analog-digital-converter allowing me to measure analog sensors. Although there are work-arounds using other ICs, the Arduino was a clean solution for me.
Interfacing the Raspberry Pi and Arduino for a custom solution can be quite a bit of work and requires you to know how to program in C++, the language of the Arduino. Fortunately I found Nanpy, a program solution made by Andrea Stagi that allows you to communicate with the Arduino using just Python scripts. A great tool for a beginner!
How to install and use the software can be a little challenging, so I thought it would be good to put together a tutorial on how to use it! Enjoy!