exercise 1

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 
00002 #include "mbed.h"
00003 
00004 void printStatus(void);
00005 
00006 class MyClass
00007 {
00008 public:
00009     MyClass(double messwert):_messwert(messwert)
00010     {
00011         
00012     }
00013     
00014    void printStatus(){
00015     printf("Status is now: %f\n", _messwert);
00016 }
00017 
00018 private:
00019     double _messwert;
00020 };
00021 
00022 MyClass messwert(0.0);
00023 
00024 
00025 
00026 
00027 
00028 int main()
00029 {
00030     while (1) {
00031 
00032         messwert.printStatus();
00033         wait_ms(500);
00034 
00035 
00036     }
00037 }