Raspberry Pi history, versions, pins and headers as a Java Maven library
FR
Frank Delporte
· Nov 13, 2019 · 2 min read
The best way to understand and learn something new, is to document it yourself. That’s what I’m doing in every step for my book-in-progress. And to fully get the pinnings and headers of the different Pi-boards, I decided to gather all info into a Java library with different enums to be able to auto-generate some content for the book and use in a few different example applications.
Maven repository
A first version is now available on Maven
, but will definitely be further extended as I’m working on the content of the book.
Raspberry Pi headers library in Maven repository
Source code
The sources are available on GitHub
. For example the list of available pin types:
public enum PinType {
POWER("Power", 0x990000),
GROUND("Ground", 0x000000),
DIGITAL("Digital", 0x009900),
DIGITAL_AND_PWM("Digital and PWM", 0xff7ff00),
DIGITAL_NO_PULL_DOWN("Digital without pulldown", 0x800080);
...
}
Example application: JavaFX visualization
As an example in the book this library is used to automatically generate this JavaFX view of a Pi header:
Raspberry Pi headers library in Maven repository
Auto-generated README
Some code in the sources (UpdateReadme.java) automatically generates a new readme file with all the info from the enums.
Pi models
Name
Label
Description
MODEL_A
Model A
Without ethernet connector
MODEL_B
Model B
With ethernet connector
COMPUTE
Compute Module
Pi on a 200-pin DDR2-memory-like module for integration in embedded devices