This blog is also available on Gemini (What's Gemini?)

Device::PCDuino -- Perl Module for Accessing I/O on the pcDuino


The Bodgery[1] (my makerspace) was donated a few pcDuinos[2]. These are great little devices, more powerful than the Raspberry Pi, and with a built-in WiFi adapter and Arduino-like pin headers.

One thing it lacked was a Perl interface to the I/O pins. I quickly fixed this oversight[3] with Device::PCDuino.

Currently, GPIO and ADC pins are implemented. PWM should be easy to work out. SPI and I2C look like they'll be a little more involved (see the Sparkfun examples in C[4]).

Usage is about as simple as can be. Use `set_output()` and `set_input()` to set the type you want for a given pin, then call `output()` and `input()` to set or receive values, respectively. See the POD docs and the "examples/" directory in the distribution for more details.