Appendix A. Math Basics for NXT

When programming your robots, you may find many times that you need to perform some basic math in order to properly direct them. While I don't have the space to cover every possible mathematical calculation you may need, I do want to focus on three very simple subjects that you might find useful. The first is converting between degrees and rotations; the second is calculating travel distance based on the number of degrees or rotations you configure; and the third is a very short discussion of how the X/Y coordinate system works on your Brick.

Converting Between Degrees and Rotations

When it comes to the MOVE block's Duration setting on its configuration panel, I've found that most people generally have a preference ...

Get Lego Mindstorms NXT-G Programming Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.