Davon Cleary / Mbed 2 deprecated Lab2

Dependencies:   4DGL-uLCD-SE PinDetect SDFileSystem mbed-rtos mbed wave_player

Fork of ECE2036Lab2StarterCode by Joseph Lind

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers tempModule.h Source File

tempModule.h

00001 #ifndef TEMPMODULE_H
00002 #define TEMPMODULE_H
00003 #include "mbed.h"
00004 #include "uLCD_4DGL.h"
00005 
00006 class TempModule 
00007 {
00008 public:
00009     // Constructors
00010     TempModule(PinName pin);
00011     TempModule(PinName pin, float vx, float vy);
00012     // Reading temperature values
00013     float read();
00014     // Set Functions
00015     void setBaseVx(float); // This sets the lowest velocity of vx
00016     void setBaseVy(float); // This sets the lowest velocity of vy
00017     // Get Functions/Member Functions
00018     float getVx();  // Calculates a speed based off of the temp
00019     float getVy();   
00020     float getVx(uLCD_4DGL *); // Same thing as getVx(), except it 
00021                               // also writes the temp to the screen.
00022 
00023 private:
00024     // Data members are suggestions, feel free to add/remove
00025     AnalogIn _sensor;
00026     float roomTemp;
00027     float holdTemp;
00028     float basevx;
00029     float basevy;
00030     int counter;
00031 };
00032 #endif