Computing / Computer Science

Comments and White Space


RobotC is a free-form programming language. This means that when you write a program, multiple spaces, tabs, and line returns are ignored by the NXT. This allows us to use these ignored structures to format our program and make it easier to read. If wanted, we could put all of our commands on one line. Here is what the above example program would look like if we did:

Task [string]label { } Introduction

When you open a new RobotC program, you start with a blank slate, with no instructions. The NXT/RobotC was designed with a number of rules that force us to write or programs in a certain way. Our first rule of RobotC is:

1. NXT actions shall reside within tasks.

Line Following_Fuzzy Logic Line Follower

This Fuzzy Logic Line Follower goes beyond the simple binary approach (turn right if dark, turn left if light) by creating a grey-scale approach to light and dark. The implementation uses the advanced concepts of sensor blocks, data wires, variables and math blocks in a simple and straight forward approach.

Waddle Bot

Waddle Bot Unit 0

Waddle Bot Unit 0 Lesson 1

Line Following

Have students work through the "Line Following"  video lesson from the "Behaviors" page in "NXT Video Trainer 2.0" from Carnegie Mellon University's Robotics Academy.

"Line Following"

Advanced Flow Charts

The attached PowerPoint file contains the Instructional Material for the Advanced Flow Charts lesson.  The last slide uses as an example, but other tools may be used. 

LucidChart currently offers a free classroom license if an educator registers with a .edu email address.

Advanced Flow Charts