|
Re: the main code
A movie is made up of a series of still images that give the appearance of continuous motion. The robot controller works like that: each pass through the loop (that statusflag.NEW_SPI_DATA == 1) is like a new movie frame. A snapshot is taken of the input data and processed by your code, then the controller takes a snapshot of your output values and sends them to the robot.
If the loop stops it would be like stopping a movie. You'd get a frozen frame, or a robot with a frozen set of output values. That while( TRUE ) loop is the crank that keeps the movie going.
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
|