Starting work on implementing structures

This commit is contained in:
TraYali 2024-03-13 16:54:03 +01:00
parent 974ae853b9
commit 670ca56b0b
3 changed files with 72 additions and 10 deletions

View file

@ -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;
}