GIRC Turn Codes

Here we make a 76 degree right turn in GIRC, and this information has to be sent over the USB/Serial cable to the microcontroller aboard the robot. This communication is done with a control code pair. As shown, the first control code specifies that the turn is to the right and less than 90 degrees. The second control code gives the amount of turn in degrees plus 33.

Why add 33? So that the ASCII value represents a printable character. I don’t want to have any hassles sending data through the serial port or reading a path data file in Notepad.

If the turn is greater than ninety degrees, the first control code changes and the second control code is the value of the turn less 90 plus 33, or less 57.

Here are the turn codes for the quadrants and axes:

Note that since left turns are negative values, the absolute value is taken and different control codes are used to distinguish from right turns.

Okay, so as seen in the first image, the numbers in the parentheses are what the robot sees for turn data. Now onto distance!

Advertisements

About engineerzero

Once and future engineer.
This entry was posted in Uncategorized and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s