Implementation of Computer Graphics and Multimedia project.
In order to compile and run this project you need to install some dependences on your machine. Let's see how to prepare a Debian based distribution.
You can install the library runing the following commands as root:
apt-get update
apt-get install freeglut3-dev
You can download this library from: http://www.ijg.org/
Once you downloaded the library extract it, enter to the jpeg-9b directory and run the following commands as root:
./configure
make
make install
ranlib /usr/local/lib/libjpeg.a
ldconfig /usr/local/lib
You can compile the game using the Makefile. You only need to enter to the root directory of the project and run:
make
To run the game execute the command:
./foodcollection <nRows> <nCols> [--training]
Notice that nRows is the number of rows of the map and nCols is the number of cols of the map.
ESCexit the game.- The arrows moves the player tank.
A,S,D,Wmoves the player tank.Rrestarts the map.Tswitch the training mode on/off.J,K,L,Imoves the camera.Spacebarshots the tank.+and-increase and decrease speed factor.
In order to run the game using the Arduino game controller you need to install the Arduino IDE and the following libraries:
- Adafruit Sensor: https://github.com/adafruit/Adafruit_Sensor
- Adafruit ADXL345: https://github.com/adafruit/Adafruit_ADXL345
- DHT sensor library: https://github.com/adafruit/DHT-sensor-library
The next step is to connect all the sensors to the Arduino board following the next specification:
Signal-->Digital 3--->GND+-->5V
SDA->A4SCL->A5GND->GNDVCC->5V
SEL->Digital 2VERT->A1HORZ->A0GND->GNDVCC->5V
Trig->Digital 4Echo->Digital 5GND->GNDVCC->5V
Black->GNDRed->5VPurple->A2
Once you have prepared the Arduino environment you can flash the arduino sketch available on the arduino_sketch folder of the project.