One of the tutorials within the Lego Mindstorms NXT Software shows how to program a robot that follows a line using Boolean Logic. In the following, an improved version, based on Fuzzy-Logic, is presented. Although a little bit more complex, the program is still implemented using NXT-G Code.
Tufts University Center for Engineering Education and Outreach In this activity, we will learn how to create a robot that follows a line on the ground. It will use one light sensor to sense where the line is, and use this to control the motors to steer the car and stay on the line.
When programming with loops, you often must access data from previous iterations of the loop in LabVIEW. For example, if you are acquiring one piece of data in each iteration of a loop and must average every five pieces of data, you must retain the data from previous iterations of the loop.
As you move forward with LabView programming, you will see that most design patterns are impossible without the shift register. Anytime you are trying to keep track of something in a loop, you will need to use one.
The shift register is a key element of LabView programming. It allows looping structures, such as the For and While loop, to carry over values from one iteration into the next. This can be extremely powerful in allowing the developer to build up arrays of information, or retain state information about a program running in a loop.
LabVIEW 2009 LEGO MINDSTORMS NXT Module Help When using loops, it is often useful to have a result from the last iteration of the loop for the next iteration of the loop. This can be accomplished using Shift Registers; shift registers will pass values from previous iterations through the loop to the next iteration.
sounds like for your application you might want to use the Log Angle (red/blue/green) nodes to acquire your data. This lets
you sample at a specific rate for a given amount of time and saves the data to
a file called RedData.dat, BlueData.dat or GreenData.dat depending on the color
of the Log Angle you chose
Use front panel datalogging to record data for use in other VIs and in reports. For example, you can log data from a graph and use that data in another graph in a separate VI. Each time a VI runs, front panel datalogging saves the front panel data to a separate datalog file, which is in the format of delimited text.
LabVIEW 2009 LEGO MINDSTORMS NXT Module Help Logs Data from the specified sensor connected to the specified port. The data logging parameters are sample time and total time.For the Red Vis, the data is stored in the RedData.dat file on the NXT brick and can be viewed using the Data Viewer application.
The basic idea of datalogging is to run an experiment, but have a computer do
the tedious data recording for you. For instance, if you wanted to know how the
temperature changes during the course of an entire day, you