Surveyor Robotics Journal |
|||||
|
Surveyor Corporation home page
Subscribe to a syndicated RSS feed. Archives |
Wed, 27 Dec 2006 test version of SRV-1 firmware with C interpreter As discussed previously, we now have a version of SRV-1 firmware that includes a C interpreter as an alternative to BASIC. A set of SRV-1 specific functions have been included - motors(), ir(), imgcap(), scan(), blob(), colorcap(), colorset(), colorget(), bitdir(), bitset(), bitget() - so it should be possible to develop a variety of interesting behaviors that are controlled by onboard code. Here's a code sample that uses some of these functions ... /* capture color sample for scan() function */ int _x, _y, _z, _ymin, _ymax, _umin, _umax, _vmin, _vmax; main() { int ix; imgcap(); colorcap(1, 30, 50, 1, 5); colorget(1); print(_ymin _ymax _umin _umax _vmin _vmax); do { imgcap(); scan(1); print("test" _x _y _z); ix = input(); } while (ix != 65); /* continue running until input = 'A' */ } We'll start to build a libary of code samples, and welcome contributions from users. There are now 2 versions of firmware - one that includes BASIC and one the includes C. The BASIC version is almost identical to the 120206 firmware release, with 3 minor changes -
Here are the latest download links for both versions of firmware -
Please post any problems, suggestions, and/or interesting code samples on the Surveyor Robotics Forum. Posted Wed, 27 Dec 2006 13:57 | HTML Link | see additional stories ... |
||||