Create a programmable robot that can read commands from the user and store them in a self-designed linked list.
Have the programmed robot execute the read commands in successive order.
Display the commands that the robot has executed to the user for revision.
Create a class that can read input from the user and echo the read input back to the user. This should be done by outputting the read command to the user via the LCD screen on the NXT Brick. Since all of the commands tell the robot to execute a certain movement, the echoed input should be in the form of a dynamic map. The map should scroll accordingly as more commands are inputted (i.e. if the user wishes the robot to go right, the map should scroll left).
Have the robot execute the given commands in the order that they were assigned. The robot should turn accordingly and then move forward one step before executing the next command. The robot should only turn if it is necessary.
After the robot has finished executing all of the commands, the NXT Brick's LCD screen should output all of the commands that were inputted for the user to review them. This should also be done in the form of a scrollable map, in which the four buttons on the NXT Brick allow the user to scroll through the map however the user pleases.
There is no need for the LCD screen to draw a command if it is not going to be shown on the screen. Keep track of the (x,y) coordinates of all of the commands that are issued by the user, and skip drawing the ones that are not within the visible LCD screen.
The program should not have to iterate through the entire list every time a new command is added. This is inefficient and unnecessary; instead, have the program just append the newly added command to the end of the list.
For the robot to know which direction it should turn, the robot needs to know its current orientation. Also, the assumption must be made that the robot begins in the by facing forward. In other words, if the user were to issue the first command as a “back” command, the robot should turn around a full 180 degrees.
The linked list that is to be used in this project must be originally coded. The use of the LinkedList class that is provided in the API is not allowed.
The usage of threads and/or synchronization is not necessary for this project.
reu/programmable_robot_example.txt · Last modified: 2008/12/04 10:08 by akhandok