diff --git a/sketch_apr29a/sketch_apr29a.ino b/sketch_apr29a/sketch_apr29a.ino new file mode 100644 index 0000000..f376a4a --- /dev/null +++ b/sketch_apr29a/sketch_apr29a.ino @@ -0,0 +1,18 @@ +#include +const int GPIOCoil = 0; + +bool coils[10]; +const int pinToRead = 2; + +ModbusSerial mb (Serial, 10); + +void setup() { + Serial.begin(9600); + pinMode(pinToRead, INPUT); + mb.addIsts(0); +} + +void loop() { + mb.setIsts(0 digitalRead(pinToRead)); + mb.task(); +}