Coder Social home page Coder Social logo

mjbraun95 / shortest-path-road-mapper Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5.66 MB

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

C++ 87.62% Makefile 7.37% C 5.01%
atmel microcontroller firmware cpp makefile lcd-display hardware dijkstra shortest-path circuits

shortest-path-road-mapper's Introduction

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.

shortest-path-road-mapper's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.