Starting work on implementing structures
This commit is contained in:
parent
974ae853b9
commit
670ca56b0b
3 changed files with 72 additions and 10 deletions
11
src/main.cpp
11
src/main.cpp
|
|
@ -1,6 +1,9 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
#include "hoymiles.h"
|
||||
#include "modbus.h"
|
||||
|
||||
|
|
@ -10,7 +13,13 @@ int main(){
|
|||
int port {502};
|
||||
|
||||
Dtu dtu {ip_address.c_str(), port};
|
||||
dtu.readTest();
|
||||
|
||||
bool buttonPressed{false};
|
||||
for(int i{0}; i<10; i++){
|
||||
dtu.readTest(0x1034, 2);
|
||||
std::clog << std::endl;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue