This README will present the project, the code and how to run it.
This project was done in the context of a university assignment of the University of Chile on 2018.
This code programs a Tour Guide Lego Mindstorms prototype, which follows and remembers a path drawn by a black line in a white font. Then it is capable of repeating the same path without the drawn path.
This is a prototype for tour guide robots that can lead tourists or visitors and give information about the place or expositions.
The robot is composed of a Lego Mindstorms NXT Brick with two Light Sensors at the front and two Motors as wheels.
This repository contains a TourGuide.java
file, which when added to the NXT Brick begins a calibration of colors, then follows the black line until the end of the line identified by detecting black on both sensors.
To store and retrieve the moves in constant time but with unbounded memory, a linked-list stack is implemented. But in order to replicate the line, the stack is reversed before the replication. To avoid this, a queue might have been implemented, but in an array it would have had constant memory, and in a linked list either the queue or the dequeue would have taken linear time to get to the end of the queue. Prioritizing the running time performance, the linked-list stack implementation was preferred.
Before modding, make sure to setup your environment and personalize your proyect.
- Download Java Development Kit (JDK).
- Download an IDE: Visual Studio Code (or Eclipse or IntelliJ).
- Open the project from your IDE and download Java extensions.
Java basic knowledge might help understanding and developing.
A full guide to program NXT Bricks can be found here.