This notebook demonstrates how to use Mathematica to send integers to real world devices via the bTop-2's digital IO ports. For the purpose of the demo we send out iterations of the Rule 30 cellular automaton. A wiring diagram is available from Perfectly Scientific, showing how to connect LED's to the bTop-2 such that upon running this notebook, the Rule 30 automaton appears on the LED's.
We begin, as always, by loading the BTopTools package.
If we connect (say) 5 LED's to the bTop-2, we can display on them every integer from 0 to 31. To make sure everything is connected correctly we start out with a simple loop to test every value.
Once everything is connected and every integer between 0 and 31 can be displayed, we can make a light show out of the Rule 30 automaton. The following code repeatedly applies Rule 30, starting with a single cell "on" in a sea of off cells.
Created by Mathematica (January 24, 2007)