Skip to content

Commit 4c379f3

Browse files
committed
update type and pin declaration
1 parent 8b74b8c commit 4c379f3

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

examples/Read_Flow_Rate/Read_Flow_Rate.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
// OF05ZAT;
2222
// OF05ZZT;
2323

24-
// pin -> interrupt pin
25-
FlowSensor Sensor(YFS201, D2);
24+
#define type YFS201
25+
#define pin D2 // pin -> interrupt pin
26+
27+
FlowSensor Sensor(type, pin);
2628
unsigned long timebefore = 0; // Same type as millis()
2729

2830
// Uncomment if use ESP8266 and ESP32

examples/Read_Flow_Rate_and_Volume/Read_Flow_Rate_and_Volume.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
// OF05ZAT;
2222
// OF05ZZT;
2323

24-
// pin -> interrupt pin
25-
FlowSensor Sensor(YFS201, D2);
24+
#define type YFS201
25+
#define pin D2 // pin -> interrupt pin
26+
27+
FlowSensor Sensor(type, pin);
2628
unsigned long timebefore = 0; // Same type as millis()
2729
unsigned long reset = 0;
2830

examples/Read_Volume/Read_Volume.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
// OF05ZAT;
2222
// OF05ZZT;
2323

24-
// pin -> interrupt pin
25-
FlowSensor Sensor(YFS201, D2);
24+
#define type YFS201
25+
#define pin D2 // pin -> interrupt pin
26+
27+
FlowSensor Sensor(type, pin);
2628
unsigned long timebefore = 0; // same type as millis()
2729
unsigned long reset = 0;
2830

0 commit comments

Comments
 (0)