lauren cloutier / cloutier_a7_modular_programming
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PC20.h Source File

PC20.h

00001 // .h file for photocell sensor
00002 
00003 
00004 #ifndef PC20_H //if driver is not defined
00005 #define PC20_H //define driver
00006 
00007 #include "mbed.h" //includes mbed library for analog in (pin functions)
00008 
00009 class PC20{
00010     
00011     public: //variables are accessable in main function
00012     PC20 (PinName in2); //initialization function
00013     float A, B, C, R, V ;
00014  // float A, B, R, V ;  //variables to convert temperature reading
00015     float photo(); //photocell computation function
00016     
00017     private: //variables not accessable outside class
00018     AnalogIn _in2; //object to be used in initialization from .cpp file
00019     
00020 };
00021 
00022 #endif //ends define driver