|
Order what you want, eat what you order...
I agree with Steve and Nate. I have this to add, though.
Basically you have a menu to pick from by setting the c_variablename constanst to 1 or 0. Once you pick from the menu, your choices get sent to the kitchen via the shiftout command you are asking about. It is your job to make sure you order what you wanted because that is what the master CPU is going to send you 40 times a second for the rest of your life (or until you reprogram your STAMP2).
As to your particular question, all those lines of code are turning your menu choices into the right string to output via the shiftout command.
Basically, by shifting left and adding in new constants that are either 1 or 0, you are building up a constant that has 1's and 0's in the right place for the shiftout command.
If you are a coding "tough guy" you can set the bits directly by just assigning dataInitA etc. to something in one step (e.g. dataInitA=$F8). While it is possible to do this, it is silly and very likely to cause you grief.
In the end, the best thing is to use the code as Innovation First intended.
Joe J.
|