Skip to content

mjbraun95/Shortest-Path-Road-Mapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Names:  Ang Li  Matthew Braun
IDs:    1550746 1497171
CMPUT 275, Winter 2019

Assignment 2: Directions Part 2

Included Files:
    client
        *circuit-wiring.txt
        *client.cpp
        *consts_and_types.h
        *lcd_image.cpp
        *lcd_image.h
        *map_drawing.cpp
        *map_drawing.h
        *circuit-wiring.txt
    server
        *digraph.cpp
        *digraph.h
        *dijsktra.cpp
        *dijsktra.h
        *edmonton-roads-2.0.1.txt
        *heap.h
        *Makefile
        *serialport.cpp
        *serialport.h
        *server.cpp
        *server_util.cpp
        *server_util.h
        *wdigraph.h
    *README

Wiring instruction:

    NOTE: In addition to this wiring you also have to download the .lcd files
        from eClass and put them on your SD card (after unzipping them).

    TFT Display:

        The display pins are numbered left to right in this document when they are being viewed
        with their labels showing right side up. Note you do not require the touchscreen for this assignment,
        so it is probably a lot easier to not wire the Y+/X+/Y-/X- pins.

        Display Pin     Arduino Mega Pin
        1 GND           BB GND bus
        2 Vin           BB Vcc (+ive) bus

        4 CLK           Pin 52
        5 MISO          Pin 50
        6 MOSI          Pin 51
        7 CS            Pin 10
        8 D/C           Pin 9

        19 CCS          Pin 6

    Zoom in and out buttons:

        Button          Arduino Mega Pin
        Zoom In         Pin 2
        Zoom Out        Pin 3

    Joystick connections:

        Joystick Pin    Arduino Mega Pin
        +5v             Vcc
        GND             GND
        VRx             Analog 1
        VRy             Analog 0
        SW              Pin 8


Server Makefile Target:
    - make: Builds the project.
    - make server: Links all object files.
    - make server.o & dijkstra.o & digraph.o & server_util.o & server.o, & serialport.o: Compile the relevant objects.
    - make clean: Removes all object files and executables.

Running Instructions:
    1.  In the directory containing the client files, open the terminal and enter
            $make upload 
        to compile and run the client on the Arduino board.
    2.  In the directory containing the server files, open the terminal and enter
            $make
            $./server
        to compile the server software and run its executable file.

    3. The server will now communicate with the Arduino program when pushing its joystick button, by sending the cursor's coordinates to the server. Click at two different coordinate points to view the shortest path between them via road. You can push the zoom buttons to zoom in & out.

List of Code Modified From the Template:
    client.cpp
        0a1,8
        9a18,25
        20c36
        59a76,217
        148a307,308
        161a322,352
        169,174d359

    server.cpp
        0a1,9
        3c12,13
        4a15
        5a17,149
        14,49c158,159

Notes and Assumptions:
    All of our modified code is located within client.cpp, server.cpp, README, and the server's Makefile.
    Our server.cpp is build upon the solution for part 1 provided in E-class.
    Run the Arduino first then launch the server.

About

A shortest-path via road calculator for any destination in Edmonton using Dijkstra's algorithm. Used with a microcontroller, a joystick, buttons, and an LCD display

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published