Distance Sensor Embedded Systems Project SID: 200864479 James Erringham-Bruce

Dependencies:   N5110 SRF02-JEB mbed

Revision:
1:f82359c58eda
Child:
2:01f697b856de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GraphPlot/Graph.h	Wed May 04 21:20:21 2016 +0000
@@ -0,0 +1,117 @@
+/*
+@file Graph.h
+@brief Header file containing member functions and variables
+@author James Erringham-Bruce
+*/
+
+#ifndef GRAPH_H
+#define GRAPH_H
+
+#include "mbed.h"           // mbed library
+#include "DataController.h"
+#include <deque>            // std::deque
+
+
+// creating the class used in plotting the graph
+class Graph
+{
+    // defining the public functions and variables
+public:
+    /**
+    @fn graphPlot
+    @brief plots a graph of distance on the
+    */
+    void plotGraph();
+    /**
+    @fn drawGraphAxis
+    @brief draws the axis of the graph
+    */
+    void drawGraphAxis();
+    /**
+    @fn drawBitmap
+    @brief draws the bit map for the vertical word used in the graph axis
+    */
+    void drawBitmap();
+    /**
+    @fn drawLines
+    @brief draws the lines between the points on the graph
+    */
+    void drawLines();
+
+    void drawLinesBackwards();
+
+
+    // defining the private functions and variables
+private:
+
+};
+
+
+// members initialies outside of the class//
+/**
+@var i
+@brief used as a global variable for iterations
+*/
+unsigned int i = 0;
+/**
+@var x
+@brief used as an x axis for drawing points on a graph
+*/
+unsigned int x = 20;
+
+int points[7] = {10 ,20 , 30 ,40 ,50 ,60, 70};
+
+/**
+@var verticalWord_bitmap
+@brief bitmap of the vertical word " distance "
+*/
+const bool verticalWord_bitmap[46][7] = {
+    { 0,0,0,1,1,0,0 },
+    { 0,0,1,0,1,0,1 },
+    { 0,0,1,0,1,0,1 },
+    { 0,0,1,0,1,0,1 },
+    { 0,0,0,1,1,1,0 },
+    { 0,0,0,0,0,0,0 },
+    { 0,0,0,0,0,1,0 },
+    { 0,0,1,0,0,0,1 },
+    { 0,0,1,0,0,0,1 },
+    { 0,0,1,0,0,0,1 },
+    { 0,0,0,1,1,1,0 },
+    { 0,0,0,0,0,0,0 },
+    { 0,0,0,1,1,1,1 },
+    { 0,0,1,0,0,0,0 },
+    { 0,0,1,0,0,0,0 },
+    { 0,0,0,1,0,0,0 },
+    { 0,0,1,1,1,1,1 },
+    { 0,0,0,0,0,0,0 },
+    { 0,0,0,1,1,1,1 },
+    { 0,0,1,0,1,0,1 },
+    { 0,0,1,0,1,0,1 },
+    { 0,0,1,0,1,0,1 },
+    { 0,0,0,0,0,1,0 },
+    { 0,0,0,0,0,0,0 },
+    { 0,0,0,0,0,1,0 },
+    { 0,0,0,0,0,0,1 },
+    { 0,0,1,0,0,0,1 },
+    { 1,1,1,1,1,1,0 },
+    { 0,0,1,0,0,0,0 },
+    { 0,0,0,0,0,0,0 },
+    { 0,0,1,0,0,1,0 },
+    { 0,0,1,0,1,0,1 },
+    { 0,0,1,0,1,0,1 },
+    { 0,0,1,0,1,0,1 },
+    { 0,0,0,1,0,0,1 },
+    { 0,0,0,0,0,0,0 },
+    { 0,0,0,0,0,0,1 },
+    { 1,0,1,1,1,1,1 },
+    { 0,0,1,0,0,0,1 },
+    { 0,0,0,0,0,0,0 },
+    { 1,1,1,1,1,1,1 },
+    { 0,0,0,1,0,0,1 },
+    { 0,0,1,0,0,0,1 },
+    { 0,0,1,0,0,0,1 },
+    { 0,0,0,1,1,1,0 },
+    { 0,0,0,0,0,0,0 }
+};
+
+#endif
\ No newline at end of file