The introduction of the Raspberry Pi, an inexpensive, powerful single board computer, has contributed to the explosion of today’s makerspace. Add a little hardware, some Java, Python, or C++ code, and suddenly, you have a robocar, a low-cost media center, a Wi-Fi connected weather station or, in my case, an easily controllable model railroad.
In 2015, I posed a question, “Can I create a web application, written in Java, for the Raspberry Pi that would make it easier for people to program controller sequences for their hardware without knowing a programming language; with mouse clicks and drop-down menus?” The answer was a resounding “Yes” and thus, Breezy4Pi was born.
Breezy4Pi enables a user to dynamically model the inputs and outputs of hardware mounted on the Raspberry Pi, map the inputs to trigger the execution of macros which, in turn, manipulate components such as semaphores and motors that have been mapped to the hardware’s outputs. The mapping is done using mostly drop-down menus while the creation of macros and event triggers are akin to filling in the cells of a spreadsheet, once again using mostly drop-down menus. Although, Breezy4Pi is young, I’m finding it to be my preferred way of programming the train yard control panels and traffic light simulators on my model railroad.
Hardware attached to the Raspberry Pi is treated as boards, both mounted and unmounted. A mounted board means that it is configured and operational. In this example, we are modeling part of a traffic intersection with various pins of an I/O extender, such as an MCP23S17, being mapped to semaphore component LEDs. Clicking on the ‘Test’ button runs a small test program that helps the user verify the component’s physical connection.
Events are triggered in response to changes in input conditions. Here, these five inputs will each start the execution of an individual macro when it transitions from high to low.
Here is a partial example of a macro. Each component on each mounted board has a set of functions that the macro can execute such as, ‘Turn On’, Pulse, etc. Everything is symbolically referenced so that a user doesn’t need to know how a component is mapped to an I/O extender pin but merely that one wants to blink the “Walk” light, for example.
In conclusion, combining the maturity and power of Java with the power of the Raspberry Pi has yielded a powerful sequence controller that will only become more powerful over time. Add in a REST interface and one could query from a remote machine how hardware is attached to the Raspberry Pi, how it is configured and even execute macros remotely. Best of all, Breezy4Pi is free for personal use. Check it out at www.Breezy4Pi.com and on GitHub.