init main program object
This commit is contained in:
parent
30a198b3b5
commit
2c76f567b3
21
IOT/include/Program.h
Normal file
21
IOT/include/Program.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef PROGRAM_H
|
||||
#define PROGRAM_H
|
||||
|
||||
class Program{
|
||||
public:
|
||||
/**
|
||||
* @brief Construct the maine Program object
|
||||
*
|
||||
*/
|
||||
Program();
|
||||
|
||||
/**
|
||||
* @brief main loop function
|
||||
*
|
||||
*/
|
||||
void loop();
|
||||
|
||||
private:
|
||||
/* data */
|
||||
};
|
||||
#endif
|
10
IOT/src/Program.cpp
Normal file
10
IOT/src/Program.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include "Program.h"
|
||||
|
||||
|
||||
Program::Program(){
|
||||
|
||||
}
|
||||
|
||||
void Program::loop(){
|
||||
|
||||
}
|
@ -1,9 +1,12 @@
|
||||
#include <Arduino.h>
|
||||
#include "Program.h"
|
||||
|
||||
Program* program;
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
program = new Program();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
program->loop();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user