I was watching my kid play with a jack-in-the-box when I asked myself, "what if the jack-in-the-box were a smart device"? This question produced many other questions. "Could the pico engine handle as many events as a rotating crank could produce in a second?" "Could the engine be extended to directly handle hardware, specifically GPIO pins of a Raspberry Pi"?
The goals of this project are:
- Test the limits of Pico Labs' business rules engine.
- Build a working example of a pico engine IoT solution.
- Simulate an analog jack-in-the-box with software.
- Ability to play any music box song.
My hope is that when the jack-in-the-box is in the hands of a user they will have a difficult time at first telling that it is a smart device.
Why use Pico Labs' rules engine?
- The choice to use a rules engine comes from wanting a very dynamic device: being able to upload songs and modify source code without a lot of overhead. The choice to use Pico Labs' new business engine is partially bias. I am a developer for Pico Labs, so it's familiar and a fun project to test what I help develop.
What is a pico?
- Persistent Compute Objects, or picos, are like device trees in Linux. They are data and logic structures that describe a physical "thing". A pico keeps track of all data pertaining to a device, as well as the rules that are evaluated during device state changes. The pico engine enforces all rules on a pico and updates a pico's data.