NetLogo/GoGo-Extension — pull request #5 by MinasTyuru (2012-08-11 00:39:55+00:00)
Title: Add GoGoSense Compatibility

The GoGoSense project is a project to expand the capabilities of the GoGo Board. This commit adds a command to NetLogo called "msensor." This requests an extended sensor value from the GoGo Board or independent GoGoSense board (which can connect to NetLogo directly, or connect to the GoGo Board).

The sensor request is sent in the form [out header] 0b11100000 [sensor number high byte] [low byte]. 0b11100000 does not collide with any of the commands listed in the GoGo Board serial protocol. The connected board responds with [in header] [sensor value high byte] [low byte], in the same way as it would reply to a normal sensor request.

This commit does not yet support burst mode for the extended sensor bank.

This commit also contains debug code. Each instance of GoGoController has a public String, debugText. Various methods append output to this string: specifically, when a method is waiting for input from the GoGo Board, it writes "[description of expected input]_[received input as hex string] ." For example, when waiting for the first reply header, "RH1_0xFF " could be appended to the string. Users can access the string with the command gogo:debug, and clear it with gogo:clear.