Surveyor Robotics Journal
   



email: support@surveyor.com

Surveyor Corporation home page

Subscribe to a syndicated RSS feed.

Subscribe with Bloglines

Archives
November 2008
October 2008
September 2008
August 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
Februray 2006
January 2006

       
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 -
  • the MOTORS command now has a comma between the left and right motor settings, so parentheses are no longer needed for negative values, e.g. MOTORS 50, -50
  • we fixed a bug in the BLOB function which ignored the color # and only used color #0, so BLOB 5 would have returned results from BLOB 0
  • we increased the maximum program size from 1024 to 4096 bytes

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 ...