Software development
Java and C application libraries
A C language library, released as open source software under the LGPL license and free
to use also for commercial applications, is available on GitHub:
https://github.com/sfera-labs/iono-pi-c-lib
A simple Java library, released as open source software under the LGPL license and free
to use also for commercial applications, is also available on GitHub:
https://github.com/sfera-labs/iono-pi-java-lib
You can use these libraries to develop your application software, but you can also write
your low-level code in any language. All of Iono Pi’s digital input and output pins are
directly controlled using the corresponding GPIO lines from the Raspberry Pi boards (see
the “Input/Output mapping” table above).
Only the analog inputs are connected to an analog to digital converter chip, using the SPI
protocol.
Analog inputs
The AI1 and AI2 analog inputs on the terminal block, and the AI3 and AI4 pins on the on-
board analog inputs expansion header, are connected to a Microchip MCP3204 4-channel
12-Bit A/D converter. The MCP3204 is connected to the Raspberry Pi via the SPI interface.
The MCP3204 is a very well supported chip, particularly easy to use from software on the
Raspberry Pi.
The MCP3204 data sheet contains all the information you need to control the operations of
the A/D converter. You should also take into account the effects of the analog front-end
circuitry to convert the values read from the A/D converter to the actual voltage values.
The Iono Pi library uses a 0.007319 conversion factor for the AI1 and AI2 inputs with a
0÷30V range, and 0
.
000725 for AI3 and AI4 inputs with a 0÷3V range.
23
User Guide