feat:init IOT project #6
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 <Arduino.h>
|
||||||
|
#include "Program.h"
|
||||||
|
|
||||||
|
Program* program;
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// put your setup code here, to run once:
|
program = new Program();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
// put your main code here, to run repeatedly:
|
program->loop();
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user