![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Starter code for Georgia Tech ECE 2036 Summer 2014 Lab 2
Dependencies: 4DGL-uLCD-SE PinDetect mbed
Diff: tempModule.h
- Revision:
- 0:356124c0bafc
- Child:
- 1:839d22d423bd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tempModule.h Tue Jun 17 20:03:41 2014 +0000 @@ -0,0 +1,40 @@ +#include "uLCD_4DGL.h" + +class TempModule +{ +public: + // Constructors + TempModule(PinName pin); + TempModule(PinName pin, float vx, float vy); + // Reading temperature values + float read(); + // Set Functions + void setBaseVx(float); // This sets the lowest velocity of vx + void setBaseVy(float); // This sets the lowest velocity of vy + // Get Functions/Member Functions + float getVx(); // Calculates a speed based off of the temp + float getVy(); + float getVx(uLCD_4DGL *); // Same thing as getVx(), except it + // also writes the temp to the screen. + +private: + // Data members are suggestions, feel free to add/remove + AnalogIn _sensor; + float roomTemp; + float holdTemp; + float basevx; + float basevy; + int counter; +}; + +TempModule::TempModule (PinName pin) : _sensor(pin) +{ + // Constructor code goes here + // you can ignore initializing _sensor, we've already done that +} + +TempModule::TempModule (PinName pin, float vx, float vy) : _sensor(pin) +{ + // Constructor code goes here + // you can ignore initializing _sensor, we've already done that +} \ No newline at end of file