From 4055f4d609f14a86acb3fc39fc773f06054f36d7 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Fri, 9 Aug 2019 09:24:17 +0700 Subject: [PATCH] Update WaterishOS-minimal2.0.ino --- .../WaterishOS-minimal2.0.ino | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/WaterishOS-minimal2.0/WaterishOS-minimal2.0.ino b/WaterishOS-minimal2.0/WaterishOS-minimal2.0.ino index 775187e..57cb0b1 100644 --- a/WaterishOS-minimal2.0/WaterishOS-minimal2.0.ino +++ b/WaterishOS-minimal2.0/WaterishOS-minimal2.0.ino @@ -6,7 +6,8 @@ byte ledPin=13; byte InteruptPinA=1; byte InteruptPinB=3; byte arduinoInterrupt=1; -FlowMeter sensor[12]= +FlowMeter sensorA[6]= FlowMeter(1); +FlowMeter sensorB[6]= FlowMeter(3); volatile boolean awakenByInterrupt = false; // Two pins at the MCP (Ports A/B where some buttons have been setup.) @@ -47,11 +48,7 @@ void handleInterrupt(){ // We will flash the led 1 or 2 times depending on the PIN that triggered the Interrupt // 3 and 4 flases are supposed to be impossible conditions... just for debugging. - uint8_t flashes=4; - if(pin==mcpPinA) flashes=1; - if(pin==mcpPinB) flashes=2; - if(val!=LOW) flashes=3; - + for(int sid=0;sid<=7)s // simulate some output associated to this for(int i=0;i