#include "test.h"
IoTik::Device t(IoTik::Pins::P1);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
t.init();
/*char v[50];
char* n = t.getName();
char* s = "1";
strcat(v, n);
strcat(v, s);
Serial.println(1);
Serial.println(v);
Serial.println(2);
char* r = v;
t.setName(r);
Serial.println(t.getName());*/
t.setName("Test");
Serial.println(t.getName());
t.attachUpdate([] (char* name, char* vtype, float val) {
Serial.print(name);
Serial.print(" ");
Serial.print(vtype);
Serial.print(" ");
Serial.println(val);
});
}
void loop() {
t.tick();
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}