-
Notifications
You must be signed in to change notification settings - Fork 9
/
Pins.h
842 lines (805 loc) · 40.5 KB
/
Pins.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
#pragma once
//=====================================================================
// BASIC INSTRUCTIONS
// SELETC PROTOTYPE N: FOR YOUR CONFIGURATION line 152
// enter SSID_NAME and WIFI_PSW to mach your wiFi network line 115,116
//=====================================================================
/*------------------------------------------------------------------------------------------------------
The file details each pin used for your HW configuration.
You have first to define the configuration you are working on (ESP or other MCU)
and the type of peripheral you are using:see detailed table about it
Then you have to select the pins (for I2c, station output, shift registers, rain ....all other functions)
and assign it to a pin number, using following rule:
-pin <32 (or <48 ESP32) pin will be assigned to MCU GPIO pin numbers.
-pin >32 and <48 (or >48 && <64 ESP32) pin will be assigned to an first I2c extender (the one with the lowest address)
-pin >48 and <64 (or >64 && <80 ESP32) pin will be assigned to second I2c extender
-so on 16 pin at the time
This way you can use expander for all functions (interrupt donot work right now) and free most of the pins on MCU
------------------------------------------------------------------------------------------------------------------*/
// ===================================================================================================================
// HARDWARE CONFIGURATIONS GPIO channels #define
//
// RTC DS1307, DS33xx I2C channels def DS1307RTC = RTC_DS1307
// MCP7940 def DS1307RTC = RTC_MCP7940
// PCF8563 def DS1307RTC = RTC_PCF8563
// LCD Standard , GPIO 5 channels none
// Freetronic, ? def OPENSPRINKLER_ARDUINO_FREETRONICS_LCD
// I2C I2C ch def LCDI2C
// GLCD I2c 128*64 I2c channels def LCD_SSD1306 (= SD1106)_SSD AUTOMATIC ON MEGA
// I2C on RTC board 4kB I2C channels undef EEPROM_ESP(+++ Comment out #define EEPROM_ESP in libsel.h)
// on ESP8266 flash mem internal def EEPROM_ESP (+++#define EEPROM_ESP in libsel.h)
//ETHERNET std ENC SPI channels undef OPENSPRINKLER_ARDUINO_DISCRETE
// W5100 SHIELD SPI channels def OPENSPRINKLER_ARDUINO_W5100
// ESP8266 ESP32 WiFI none def OPENSPRINKLER_ARDUINO_W5100
//ADDITIONAL DEV, RF_REMOTE GPIO 2 Channels def ADDITIONAL_SENSORS
// FLUX_GAGE GPIO 1 + interrupt =MEGA_W5100 (ass.to mega GIO)
// =PCF8574_C(ass.to PCF8574&ESP8266)
// =ESP8266_C(ass.only to ESP8266)
// =SG21_ (for standard Tods Csaba board)
//===============================================additional options==============================================================
//Hostname you can access with http://NAME.local where name is OSxx=n. HW def HOST_NAM
//
#include <Arduino.h>
#include "Config.h"
#define ESP_DELAY 0
#define MIN_LCD_LINE 3
#define MAX_LCD_LINE 5
//#define DS1307RTC RTC_DS1307
//#define DS1307RTC RTC_MCP7940
#define DUMMY_PIN 0x1F
#ifdef ESP32
#define DUMMY_PIN 39 //unused pin
#endif
//#define SLEEP_START 20
#define STA_HIGH HIGH // normally 1 station output on
#define STA_LOW LOW // normally 0 station output off
/////ADDITIONAL PIN DEFAULT no sensor board
// ADDITIONAL PIN CAN BE DEFINED INDIVIDUALLY IN PROTOTYPE BOARD SECTION
// or USING ADDITIONAL_SENSOR defined ESP8266_C or PCF8574_C or SG21_
// tO DEFINE STANDARD PINOUTS for direct ESP8266 or PCFexpander or Csaba board
#if defined(ESP8266) || defined(ESP32)
#define PIN_RAINSENSOR DUMMY_PIN // rain sensor is connected to pin D3
#define PIN_FLOWSENSOR DUMMY_PIN // flow sensor (currently shared with rain sensor, change if using a different pin)
#define PIN_FLOWSENSOR_INT DUMMY_PIN // flow sensor interrupt pin (INT1)
#define PIN_EXP_SENSE DUMMY_PIN // expansion board sensing pin (A4)
#define PIN_CURR_SENSE DUMMY_PIN // current sensing pin (A7)
#define PIN_CURR_DIGITAL DUMMY_PIN // digital pin index for A7
#define PIN_SOILSENSOR_1 DUMMY_PIN // digital SoilSensor 1 (A7)
#define PIN_SOILSENSOR_2 DUMMY_PIN // digital SoilSensor 2 (A5)
#else //This is setting for oroginal O.S.
#define PIN_RAINSENSOR 11 // rain sensor is connected to pin D3
#define PIN_FLOWSENSOR 11 // flow sensor (currently shared with rain sensor, change if using a different pin)
#define PIN_FLOWSENSOR_INT 1 // flow sensor interrupt pin (INT1)
#define PIN_EXP_SENSE 4 // expansion board sensing pin (A4)
#define PIN_CURR_SENSE 7 // current sensing pin (A7)
#define PIN_CURR_DIGITAL 24 // digital pin index for A7
#define PIN_RF_DATA 28 // RF data pin
#define PORT_RF PORTA
#define PINX_RF PINA3
#endif
////////////////////////////////////////BASIC ESP8266 DEF //////////////////////////////
#if defined(ESP8266)
#define HOSTNAM
#define WIFIMANAGER 1
#define MESSAGE
#ifndef D1
#define D2 4
#define D1 5
#define D6 15
#endif
////////ota upload//////////
#define OTA_UPLOAD
//////////////////////////// I2C standard pins /////////////////////////
#define SDA_PIN D2 //:this is standard....it may be changed
#define SCL_PIN D1 //:this is standard ---it may be chaNGED
#define OS_HW_VERSION 0.0 // it will define releases
//------ ESP32 basic definitions-------------------------------------------------------
#elif defined(ESP32)
//#define WIFIMANAGER wifimanager not supported yet Hardcoded SSID and PSW!
#define SSID_NAME "TIM-30634327"//TP_LINK_C20B"
#define WIFI_PSW "paolo1948"
#ifndef D1
#define D2 21
#define D1 22
//#define D6 17
#endif
////////ota upload//////////
#define OTA_UPLOAD
//////////////////////////// I2C standard pins /////////////////////////
#define SDA_PIN D2 //:this is standard....it may be changed
#define SCL_PIN D1 //:this is standard ---it may be chaNGED
#define OS_HW_VERSION 0.0 // it will define releases
#else ////////////////////// flag for not compatible libraries ESP8266//////
#define SDFAT // SD card on
#define MY_PING // ping not available on ESP8266
#endif
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define PIN_BACKLIGHT_MODE POSITIVE
//////flags for additional sensors cases////////////////////////////////
#define MEGA_W5100 1
#define ESP8266_C 2
#define PCF8574_C 3
#define SG21_ 4
//////flags to define if button pins are switched to ground 0 or to Vcc 1
#define BUT1_ON 1
#define BUT2_ON 1
#define BUT3_ON 1
//////////////////////////contain definition ESP flash or I2C eeprom choise.
#include "libsel.h" // change only if you have EEPROM on I2C
//////////////////////////////////////////////////////////////////////////
//
// PIN ASSIGNEMENT
//
//////////////////////////////////////////////////////////////////////////
#define PROTO 13 ///////////////////////board type selection////////////
/////////////////////////////////////////////////////////////////////////
//////////////////////////////proto board 1////////////rear garden//////////////////////////////////
#if PROTO==1 // shift register
#define SDA_PIN D5 //:redefined
#define SCL_PIN D2 //:redefined
//#define OPENSPRINKLER_ARDUINO_W5100 //:required for ESP8266 not using shift registers
#undef OPENSPRINKLER_ARDUINO_DISCRETE //:shift registers
#define SHIFT_REG
#define BUTTON_ADC_PIN A0 // A0 is the button ADC input //:analog buttons
#define LCDI2C //:i2c LCD
//:no sd ....EMULATED ON fLASH
#define ADDITIONAL_SENSORS ESP8266_C //:additional sensors to ESP
//#undef EEPROM_ESP //modify in libsel.h EEPROM is now on flash
#elif PROTO==2
/////////////////////////////proto board 2//////////Vegetable garden board/////////////////////////////////////
#define PCF8574_M
//#define OPENSPRINKLER_ARDUINO_W5100 //:ONLY required for ESP8266 not using shift registers
#undef OPENSPRINKLER_ARDUINO_DISCRETE //:no shift registers
#define SHIFT_REG //: stations on PCF8574 n.1...7
#define I2C_SHIFT_REG //shift reg. controlled by PCF8574
//#define BUTTON_ADC_PIN A0 //:NO analog buttons
#define LCDI2C //: assign LCD address---default
//:no SD
#define PIN_BUTTON_1 0x24 //button are on PCF8574 expaneder
#define PIN_BUTTON_2 0x25
#define PIN_BUTTON_3 0x26
#define BUT1_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT2_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT3_ON 1 //PIN input:1= Vcc, 0 =GND
#define ADDITIONAL_SENSORS PCF8574_C //:additional sensors on PCF8574 n.0
#elif PROTO==3
////////////////////////////////////////////prtotype n.3 Ian Board///////////////////////////////////////////////////////
#define PCF8574_M
#define SDA_PIN 4
#define SCL_PIN 5
#define SHIFT_REG
#define I2C_SHIFT_REG //shift register controlled by PCF8574 follow custom pinout
#define PIN_SR_LATCH 0x22 // shift register latch pin
#define PIN_SR_DATA 0x24 // shift register data pin
#define PIN_SR_CLOCK 0x21 // shift register clock pin
#define PIN_SR_OE 0x23 // shift register output enable pin
#undef OPENSPRINKLER_ARDUINO_DISCRETE
//#define SDFAT
//#define PIN_SD_CS 16
#define EEPROM_ESP
#define PIN_BUTTON_1 0
#define PIN_BUTTON_2 2
#define PIN_BUTTON_3 15
#define BUT3_ON 1
#define DUMMY_PIN 0x25 //dummy pin for unused functions
#define LCDI2C
#define LCD_ADDR 0x20 // following are pin of the I2c lcd expander ....follow custom LCD pin definition
#define PIN_LCD_RS 0 // LCD rs pin
#define PIN_LCD_RW 7 // LCD rw pin dummy decl.
#define PIN_LCD_EN 1 // LCD enable pin
#define PIN_LCD_D4 2 // LCD d4 pin
#define PIN_LCD_D5 3 // LCD d5 pin
#define PIN_LCD_D6 6 // LCD d6 pin
#define PIN_LCD_D7 5 // LCD d7 pin
#define PIN_LCD_BACKLIGHT 4 // LCD backlight pin
#define PIN_BACKLIGHT_MODE NEGATIVE //POSITIVE
#elif PROTO==4 // ----------casetta board---------
#define PCF8574_M
//#define OPENSPRINKLER_ARDUINO_W5100 //:required for ESP8266 not using shift registers
#undef OPENSPRINKLER_ARDUINO_DISCRETE //:undef so shift registers
#define SHIFT_REG // shift registers
#define I2C_SHIFT_REG //: stations on PCF8574 n.1...7 ---default
//#define BUTTON_ADC_PIN A0 //:digital buttons ---> IO n.on PCF8574 n.0 pins: Ox00 <>0x02
#define LCDI2C //: assign LCD address default
//:no SD
#define PIN_BUTTON_1 0x25 //button are on PCF8574 expaneder
#define PIN_BUTTON_2 0x26
#define PIN_BUTTON_3 0x27
#define BUT1_ON 0 //PIN input:1= Vcc, 0 =GND
#define BUT2_ON 0 //PIN input:1= Vcc, 0 =GND
#define BUT3_ON 0 //PIN input:1= Vcc, 0 =GND
#define ADDITIONAL_SENSORS PCF8574_C //:additional sensors on PCF8574 n.0
#elif PROTO==5
///////////////////////////////test board/?with direct PCF8574 output?////////////////////////////////////
#define OPENSPRINKLER_ARDUINO_DISCRETE //:no shift registers pin definition is default?
#define I2C_SHIFT_REG //: stations on PCF8574 n.1...7
//#define BUTTON_ADC_PIN A0 //:digital buttons ---> IO n.on PCF8574 n.0 pins: Ox00 <>0x02
#define LCDI2C //: assign LCD address---default
//:no SD
#define ADDITIONAL_SENSORS PCF8574_C //:additional sensors on PCF8574 n.0
#define PCF8574_M
#define PIN_BUTTON_1 0x16 //button are on PCF8574 expaneder
#define PIN_BUTTON_2 0x0
#define PIN_BUTTON_3 0x10
//#define LCD_ADDR 0x3F
#define PIN_LCD_RS 0 // LCD rs pin
#define PIN_LCD_RW 1 // LCD rw pin
#define PIN_LCD_EN 2 // LCD enable pin
#define PIN_LCD_D4 4 // LCD d4 pin
#define PIN_LCD_D5 5 // LCD d5 pin
#define PIN_LCD_D6 6 // LCD d6 pin
#define PIN_LCD_D7 7 // LCD d7 pin
#define PIN_LCD_BACKLIGHT 3 // LCD backlight pin
#define ADDITIONAL_SENSORS PCF8574_C //:additional sensors on PCF8574 n.0
/////////////////////////////proto board 6//////////Swimming pool//PCF8574 with relay///////////////////////////////////
#elif PROTO==6
#define OPENSPRINKLER_ARDUINO_W5100 //only for MEGA (required for ESP8266 only when not using shift registers)
//#define SHIFT_REG //: stations on PCF8574 n.1...7 connected to shift register
#define OPENSPRINKLER_ARDUINO_DISCRETE //:no shift registers each station to different pin (on PCF8574 if I2C_SHIFT_REG defined)
#define I2C_SHIFT_REG //output to stations are connected to PCF8574 PINS
// PCF8574 pin out ----connected to relay module------------------------------ addr 0x3B
#define PIN_STN_S01 0x37
#define PIN_STN_S02 0x36
#define PIN_STN_S03 0x35
#define PIN_STN_S04 0x30
#define PIN_STN_S05 0x31
#define PIN_STN_S06 0x32
#define PIN_STN_S07 0x33
#define PIN_STN_S08 0x34
#define PCF8574_M //PCF8574 are used for i/o
#define STA_HIGH LOW // low station output on for Relay
#define STA_LOW HIGH // high station output off for Relay
//-------------------------buttons--------------------------------------------
//#define BUTTON_ADC_PIN A0 //:digital buttons ---> IO n.on PCF8574 n.0 pins: Ox00 <>0x02
#define PIN_BUTTON_1 0x21 //button are on second PCF8574 expaneder adr 0x39
#define PIN_BUTTON_2 0x22
#define PIN_BUTTON_3 0x23
#define BUT1_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT2_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT3_ON 1 //PIN input:1= Vcc, 0 =GND
//-------------LCD --------------------storage-----------------------add sensors---------
#define LCDI2C //: assign LCD address
#define LCD_ADDR 0x3F
//:no SD
//#define PCF8574_M
#define ADDITIONAL_SENSORS PCF8574_C //:additional sensors on PCF8574 n.0
#elif PROTO==7 // battery operated latching valves
#define BATTERY // for OpenSprinkler Solar battery powered
#define INA219 // if INA219 board is present
#define OSBEE 0 // ==0 if is a battery powered board
// OLED 128*64 DISPLAY
#define LCD_SSD1306
#define LCD_RST 12
#define LCD_ADDR 0x3c
#define OPENSPRINKLER_ARDUINO_W5100 //:required for ESP8266 not using shift registers
#define OPENSPRINKLER_ARDUINO_DISCRETE //direct connection pin relay board
//#define SHIFT_REG
// PCF8574 pin out ----connected to relay module------------------------------ addr 0x3F
#define PIN_STN_S01 0x24
#define PIN_STN_S02 0x23
#define PIN_STN_S03 0x22
#define PIN_STN_S04 0x00 //NA
#define PIN_STN_S05 0x00 //NA
#define PIN_STN_S06 0x00 //NA
#define PIN_STN_S07 0x00 //NA
#define PIN_STN_S08 0x00 //NA
#define PCF8574_M //PCF8574 are used for i/o
#define STA_HIGH LOW // low station output on for Relay
#define STA_LOW HIGH // high station output off for Relay
//#define DS1307RTC RTC_MCP7940
//-------------------------buttons--------------------------------------------
//#define BUTTON_ADC_PIN
//:digital buttons ---> IO n.on PCF8574 n.0 pins: Ox00 <>0x02
#define PIN_BUTTON_1 0x25 //button are on PCF8574 expaneder adr 0x3F
#define PIN_BUTTON_2 0x26
#define PIN_BUTTON_3 0x27
#define BUT1_ON 0 //PIN input:1= Vcc, 0 =GND
#define BUT2_ON 0 //PIN input:1= Vcc, 0 =GND
#define BUT3_ON 0 //PIN input:1= Vcc, 0 =GND
#define LCDI2C //:i2c LCD
//:no sd ....EMULATED ON fLASH
#define ADDITIONAL_SENSORS ESP8266_C //:additional sensors to ESP
#define EEPROM_ESP //modify in libsel.h
#elif PROTO==8 // standard OS Bee 2.0
#define DS1307RTC I2CRTC
//#define BATTERY // for OpenSprinkler Solar battery powered
//#define INA219 // if INA219 board is present
#define OSBEE 1 // ==0 if is a battery powered board
// OLED 128*64 DISPLAY
#define LCD_SSD1306
//#define LCD_RST 12
#define LCD_ADDR 0x3c
#define OPENSPRINKLER_ARDUINO_W5100 //:required for ESP8266 not using shift registers
#define OPENSPRINKLER_ARDUINO_DISCRETE //direct connection pin relay board
//#define SHIFT_REG
// PCF8574 pin out ----connected to relay module------------------------------ addr 0x3F
#define PIN_STN_S01 12
#define PIN_STN_S02 13
#define PIN_STN_S03 14
#define PIN_STN_S04 0x11 //NA
#define PIN_STN_S05 0x11 //NA
#define PIN_STN_S06 0x11 //NA
#define PIN_STN_S07 0x11 //NA
#define PIN_STN_S08 0x11 //NA
//#define PCF8574_M //PCF8574 are used for i/o
#define STA_HIGH LOW // low station output on for Relay
#define STA_LOW HIGH // high station output off for Relay
//#define DS1307RTC RTC_MCP7940
//-------------------------buttons--------------------------------------------
//#define BUTTON_ADC_PIN
//:digital buttons ---> IO n.on PCF8574 n.0 pins: Ox00 <>0x02
#define PIN_BUTTON_1 0x00 //button are on PCF8574 expaneder adr 0x3F
#define PIN_BUTTON_2 0x11
#define PIN_BUTTON_3 0x11
#define BUT1_ON 0 //PIN input:1= Vcc, 0 =GND
#define BUT2_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT3_ON 1 //PIN input:1= Vcc, 0 =GND
#define LCDI2C //:i2c LCD
//#define ADDITIONAL_SENSORS ESP8266_C //no additional sensors GPIO are all used for Valve control
#define EEPROM_ESP //modify in libsel.h
#elif PROTO==9 //________________________/Opensprinkler 3.0/________________________________________________________________
#define DS1307RTC I2CRTC
#define OPENSPRINKLER_ARDUINO_W5100 //only for MEGA (required for ESP8266 only when not using shift registers)
//#define SHIFT_REG //: stations on PCF8574 n.1...7 connected to shift register
#define OPENSPRINKLER_ARDUINO_DISCRETE //:no shift registers each station to different pin (on PCF8574 if I2C_SHIFT_REG defined)
//#define I2C_SHIFT_REG //output to stations are connected to PCF8574 PINS
// PCF8574 pin out ---------------------------------- addr 0x21
#define PIN_STN_S01 0x37
#define PIN_STN_S02 0x36
#define PIN_STN_S03 0x35
#define PIN_STN_S04 0x34
#define PIN_STN_S05 0x33
#define PIN_STN_S06 0x32
#define PIN_STN_S07 0x31
#define PIN_STN_S08 0x30
#define PCF8574_M //PCF8574 are used for i/o
#define STA_HIGH LOW // low station output on for OS 3.0
#define STA_LOW HIGH // high station output off for OS 3.0
//-------------------------buttons--------------------------------------------
//#define BUTTON_ADC_PIN A0 //:digital buttons ---> IO n.on PCF8574 n.0 pins: Ox00 <>0x02
#define PIN_BUTTON_1 0x21 //button are on PCF8574 expaneder adr 0x20
#define PIN_BUTTON_2 0x00 //button 2 is used for ESP flash
#define PIN_BUTTON_3 0x23
#define BUT1_ON 0 //PIN input:1= Vcc, 0 =GND
#define BUT2_ON 0 //PIN input:1= Vcc, 0 =GND
#define BUT3_ON 0 //PIN input:1= Vcc, 0 =GND
//-------------LCD --------------------storage-----------------------add sensors---------
#define LCDI2C //: assign LCD address
#define LCD_SSD1306 // OLED 128*64 DISPLAY
#define LCD_ADDR 0x3c
#define ADDITIONAL_SENSORS PCF8574_C //:additional sensors on PCF8574 n.0
#elif PROTO==10 // testbench
#define BATTERY // for OpenSprinkler Solar battery powered
#define INA219 // if INA219 board is present
#define OSBEE 0 // ==0 if is a battery powered board
// OLED 128*64 DISPLAY
#define LCD_SSD1306
#define LCD_RST 12
#define LCD_ADDR 0x3c
#define OPENSPRINKLER_ARDUINO_W5100 //:required for ESP8266 not using shift registers
#define OPENSPRINKLER_ARDUINO_DISCRETE //direct connection pin relay board
//#define SHIFT_REG
// PCF8574 pin out ----connected to relay module------------------------------ addr 0x3F
#define PIN_STN_S01 0x24
#define PIN_STN_S02 0x23
#define PIN_STN_S03 0x22
#define PIN_STN_S04 0x00 //NA
#define PIN_STN_S05 0x00 //NA
#define PIN_STN_S06 0x00 //NA
#define PIN_STN_S07 0x00 //NA
#define PIN_STN_S08 0x00 //NA
#define PCF8574_M //PCF8574 are used for i/o
#define STA_HIGH LOW // low station output on for Relay
#define STA_LOW HIGH // high station output off for Relay
//#define DS1307RTC RTC_MCP7940
//-------------------------buttons--------------------------------------------
//#define BUTTON_ADC_PIN
//:digital buttons ---> IO n.on PCF8574 n.0 pins: Ox00 <>0x02
#define PIN_BUTTON_1 0x25 //button are on PCF8574 expaneder adr 0x3F
#define PIN_BUTTON_2 0x26
#define PIN_BUTTON_3 0x27
#define BUT1_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT2_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT3_ON 1 //PIN input:1= Vcc, 0 =GND
#define LCDI2C //:i2c LCD
#define ADDITIONAL_SENSORS ESP8266_C //:additional sensors to ESP
#define EEPROM_ESP //modify in libsel.h
/////////////////////////////proto board 6//////////Swimming pool//PCF8574 with relay///////////////////////////////////
#elif PROTO==11 // ESP8266 with no peripheral: no button, no I2c, no LCD relay output on ESP pins !!blind mode!!
#define OPENSPRINKLER_ARDUINO_W5100 //only for MEGA (required for ESP8266 only when not using shift registers)
//#define SHIFT_REG //: stations on PCF8574 n.1...7 connected to shift register
#define OPENSPRINKLER_ARDUINO_DISCRETE //:no shift registers each station to different pin (on PCF8574 if I2C_SHIFT_REG defined)
//#define I2C_SHIFT_REG //output to stations are connected to PCF8574 PINS
// PCF8574 pin out ----connected to relay module------------------------------ addr 0x3B
#define PIN_STN_S01 0x00
#define PIN_STN_S02 0x02
#define PIN_STN_S03 9
#define PIN_STN_S04 10
#define PIN_STN_S05 12
#define PIN_STN_S06 13
#define PIN_STN_S07 14
#define PIN_STN_S08 15
//#define PCF8574_M //PCF8574 are used for i/o
#define STA_HIGH LOW // low station output on for Relay
#define STA_LOW HIGH // high station output off for Relay
//-------------------------buttons--------------------------------------------
//#define BUTTON_ADC_PIN A0 //:digital buttons ---> IO n.on PCF8574 n.0 pins: Ox00 <>0x02
#define PIN_BUTTON_1 0x21 //button are on second PCF8574 expaneder adr 0x39
#define PIN_BUTTON_2 0x22
#define PIN_BUTTON_3 0x23
#define BUT1_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT2_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT3_ON 1 //PIN input:1= Vcc, 0 =GND
//-------------LCD --------------------storage-----------------------add sensors---------
#define LCDI2C //: assign LCD address
//#define LCD_ADDR 0x3F
//#define PCF8574_M
#define ADDITIONAL_SENSORS PCF85
#elif PROTO==12 // ESP32 testbench
//#define BATTERY // for OpenSprinkler Solar battery powered
//#define INA219 // if INA219 board is present
//#define OSBEE 0 // ==0 if is a battery powered board
// OLED 128*64 DISPLAY
#undef WIFIMANAGER
#undef OTA_UPLOAD
#define DS1307RTC I2CRTC
#define LCD_SSD1306
#define LCD_RST 12
#define LCD_ADDR 0x3c
#define OPENSPRINKLER_ARDUINO_W5100 //:required for ESP8266 not using shift registers
#define OPENSPRINKLER_ARDUINO_DISCRETE //direct connection pin relay board
//#define SHIFT_REG
// PCF8574 pin out ----connected to relay module------------------------------ addr 0x3F
#define PIN_STN_S01 0x24
#define PIN_STN_S02 0x23
#define PIN_STN_S03 0x22
#define PIN_STN_S04 0x00 //NA
#define PIN_STN_S05 0x00 //NA
#define PIN_STN_S06 0x00 //NA
#define PIN_STN_S07 0x00 //NA
#define PIN_STN_S08 0x00 //NA
//#define PCF8574_M //PCF8574 are used for i/o
#define STA_HIGH LOW // low station output on for Relay
#define STA_LOW HIGH // high station output off for Relay
//#define DS1307RTC RTC_MCP7940
//-------------------------buttons--------------------------------------------
//#define BUTTON_ADC_PIN
//:digital buttons ---> IO n.on PCF8574 n.0 pins: Ox00 <>0x02
#define PIN_BUTTON_1 0x25 //button are on PCF8574 expaneder adr 0x3F
#define PIN_BUTTON_2 0x26
#define PIN_BUTTON_3 0x27
#define BUT1_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT2_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT3_ON 1 //PIN input:1= Vcc, 0 =GND
#define LCDI2C //:i2c LCD
//:no sd ....EMULATED ON fLASH
//#define ADDITIONAL_SENSORS ESP8266_C //:additional sensors to ESP ESP32_ER
#define EEPROM_ESP //modify in libsel.h
#elif PROTO==13 // ESP32 on HELTEC OLED LORA
#undef WIFIMANAGER
#undef OTA_UPLOAD
#define SDA_PIN 4
#define SCL_PIN 15
#define DS1307RTC I2CRTC
#define LCD_SSD1306
#define LCD_RST 16
#define LCD_ADDR 0x3c
#define OPENSPRINKLER_ARDUINO_W5100 //:required for ESP8266 not using shift registers
#define OPENSPRINKLER_ARDUINO_DISCRETE //direct connection pin relay board
//---------------------------new lorachannel settings------------------------------------------
#define LORA
#define SPI_MOSI 27
#define SPI_MISO 19
#define SPI_CS 18
#define SPI_SCLK 5
#define LORA_RST 14
#define LORA_IRQ 26
#define LORA_MAX_STA 8
#define EE_ADDRESS_RSSI (byte *)2301
#define EE_ADDRESS_N_NODES (byte *)2300
//-----------------------------------------------------------------------------------------------
//#define SHIFT_REG
// PCF8574 pin out ----connected to relay module------------------------------ addr 0x3F
#define PIN_STN_S01 0x24
#define PIN_STN_S02 0x23
#define PIN_STN_S03 0x22
#define PIN_STN_S04 0x00 //NA
#define PIN_STN_S05 0x00 //NA
#define PIN_STN_S06 0x00 //NA
#define PIN_STN_S07 0x00 //NA
#define PIN_STN_S08 0x00 //NA
//#define PCF8574_M //PCF8574 are used for i/o
#define STA_HIGH LOW // low station output on for Relay
#define STA_LOW HIGH // high station output off for Relay
//#define DS1307RTC RTC_MCP7940
//-------------------------buttons--------------------------------------------
//#define BUTTON_ADC_PIN
//:digital buttons ---> IO n.on PCF8574 n.0 pins: Ox00 <>0x02
#define PIN_BUTTON_1 0x25 //button are on PCF8574 expaneder adr 0x3F
#define PIN_BUTTON_2 0x26
#define PIN_BUTTON_3 0x27
#define BUT1_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT2_ON 1 //PIN input:1= Vcc, 0 =GND
#define BUT3_ON 1 //PIN input:1= Vcc, 0 =GND
#define LCDI2C //:i2c LCD
//:no sd ....EMULATED ON fLASH
//#define ADDITIONAL_SENSORS ESP8266_C //:additional sensors to ESP ESP32_ER
#define EEPROM_ESP //modify in libsel.h
//=========================================================================================
#elif PROTO==21 // ESP32 with SG21 board Testbench on Olimex EVB
//=========================================================================================mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, nb ,mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
#define SG21
#define OS217
#define EEPROM_ESP //must be also in libsel.h
#define SDA_PIN 16
#define SCL_PIN 17
#undef WIFIMANAGER
#undef OTA_UPLOAD
//#define DS1307RTC I2CRTC
//-------------- OLED 128*64 DISPLAY ------------------------------------------------------
#define LCDI2C //:i2c LCD
#define LCD_SSD1306
//#define LCD_SH1106 //also LCD_SSD1306 must be defined
#define LCD_RST DUMMY_PIN
#define LCD_ADDR 0x3c
//-------------- SHIFT REGISTER OUTPUT------------------------------------------------------
#define SHIFT_REG
#define PIN_SR_DATA 12 // shift register data pin
#define PIN_SR_CLOCK 13 // shift register clock pin
#define PIN_SR_OE 14 // shift register output enable pind
#define PIN_SR_LATCH 15 // shift register latch pin
//-------------------------buttons--------------------------------------------
//:digital buttons ---> IO n.on PCF8574 n.0 pins: Ox00 <>0x02
#define PIN_BUTTON_1 36
#define PIN_BUTTON_2 4
#define PIN_BUTTON_3 34
#define BUT1_ON 0 //PIN input:1= Vcc, 0 =GND
#define BUT2_ON 0 //PIN input:1= Vcc, 0 =GND
#define BUT3_ON 0 //PIN input:1= Vcc, 0 =GND
//:no sd ....EMULATED ON fLASH
//#define ADDITIONAL_SENSORS ESP8266_C //:additional sensors to ESP ESP32_ER
#define PIN_RAINSENSOR 5 // rain sensor is connected to pin D3
#define PIN_FLOWSENSOR 35 // flow sensor (currently shared with rain sensor, change if using a different pin)
#define PIN_CURR_SENSE 37 // current sensing pin (A7)
#define PIN_CURR_DIGITAL 37 // digital pin index for A7
#define PIN_SOILSENSOR_1 32 // digital SoilSensor 1 (A7)
#define PIN_SOILSENSOR_2 33 // digital SoilSensor 2 (A5)
#endif
///////////////////////////////////////////////END OF PROTOTYPE LIST//////////////////////////////////////////////////////////
//////check if libsel.h is correct//////////////////////////////////////
#ifdef EEPROM_ESP
//#undef EEPROM_ESP
#include "libsel.h"
#ifndef EEPROM_ESP
#error "file LIBSEL.H need to be corrected:uncomment #define"
#endif
#else
#include "libsel.h"
#ifdef EEPROM_ESP
#error "file LIBSEL.H need to be corrected:comment out #define"
#endif
#endif
//////////////////////////////////////////////////station control output///////
#ifdef OPENSPRINKLER_ARDUINO_DISCRETE /////////no shift register used
#ifndef I2C_SHIFT_REG
/* READ ME - PIN_EXT_BOARDS defines the total number of discrete digital IO pins
used to control watering stations. There are 8 stations per extender board, that
MUST have PIN_EXT_BOARDS x 8 pins defined below (otherwise you'll get out of range
issues with the array of pins defined in OpenSprinklerGen2.cpp) */
#define PIN_EXT_BOARDS 2
/* Use these pins when the control signal to switch watering solenoids on and off
is driven directly from the arduino digital output pins (i.e. not using a shift register
like the regular opensprinkler hardware) */
#ifndef PIN_STN_S01
#define PIN_STN_S01 46
#define PIN_STN_S02 44
#define PIN_STN_S03 42
#define PIN_STN_S04 40
#define PIN_STN_S05 47
#define PIN_STN_S06 45
#define PIN_STN_S07 43
#define PIN_STN_S08 41
#define PIN_STN_S09 32
#define PIN_STN_S10 34
#define PIN_STN_S11 36
#define PIN_STN_S12 38
#define PIN_STN_S13 33
#define PIN_STN_S14 35
#define PIN_STN_S15 37
#define PIN_STN_S16 39
#endif
//#define PIN_RF_DATA 30 // RF data pin - efault is 38
//#define PORT_RF
//#define PINX_RF
#else //digital station pinout on PCF8574
#define PIN_EXT_BOARDS 1
#ifndef PIN_STN_S01 //default PCF8574 pin out
#define PIN_STN_S01 0x20
#define PIN_STN_S02 0x21
#define PIN_STN_S03 0x22
#define PIN_STN_S04 0x23
#define PIN_STN_S05 0x24
#define PIN_STN_S06 0x25
#define PIN_STN_S07 0x26
#define PIN_STN_S08 0x27
#endif
#endif
#endif
// shift register grom gpio pins or
// trought PCF8574 (pin n.>=0x20 first PCF8574 pin >=0x30 second PCF8574)
#if defined(SHIFT_REG) //
#ifdef I2C_SHIFT_REG
// standard first PCF8574 Pinout
#ifndef PIN_SR_LATCH //pin already defined above
#define PIN_SR_LATCH 0x22 // shift register latch pin
#define PIN_SR_DATA 0x20 // shift register data pin
#define PIN_SR_CLOCK 0x23 // shift register clock pin
#define PIN_SR_OE 0x21 // shift register output enable pin
#endif
#else
//-----------------------ESP8266------------------------------------------
#ifndef PIN_SR_LATCH //pin already defined above
#define PIN_SR_LATCH D3 // shift register latch pin
#define PIN_SR_DATA D0 // shift register data pin
#define PIN_SR_CLOCK 10 // shift register clock pin
//#define PIN_SR_OE // shift register output enable pin
#endif
#endif// END ESP8266--------------------------------------------------------------------------
#endif
//
//
////////////////////////////////////////////////////LCD/////////////////////////////////////////
//
#ifdef OPENSPRINKLER_ARDUINO_FREETRONICS_LCD
/* Note - D4 on the Freetronics LCD shield clashes with the
chipselect pin for the SD card that is also D4 on some W5100 shields.
You may need to jumper it to D2 as described at:
http://forum.freetronics.com/viewtopic.php?t=770 */
// Freetronics LCD with pin D4 bridged to pin D2
#define PIN_LCD_RS 8 // LCD rs pin
#define PIN_LCD_EN 9 // LCD enable pin
#define PIN_LCD_D4 2 // LCD D4 pin
#define PIN_LCD_D5 5 // LCD D5 pin
#define PIN_LCD_D6 6 // LCD D6 pin
#define PIN_LCD_D7 7 // LCD D7 pin
#define PIN_LCD_BACKLIGHT 3 // LCD backlight pin
#define PIN_LCD_CONTRAST A1 // LCD contrast pin - NOT USED FOR FREETRONICS LCD (just set this to an unused pin)
/*
// Freetronics LCD
#define PIN_LCD_RS 8 // LCD rs pin - default = 19
#define PIN_LCD_EN 9 // LCD enable pin - default = 18
#define PIN_LCD_D4 4 // LCD d4 pin - default = 20
#define PIN_LCD_D5 5 // LCD d5 pin - default = 21
#define PIN_LCD_D6 6 // LCD d6 pin - default = 22
#define PIN_LCD_D7 7 // LCD d7 pin - default = 23
#define PIN_LCD_BACKLIGHT 3 // LCD backlight pin - default = 12
#define PIN_LCD_CONTRAST A1 // LCD contrast pin - NOT USED FOR FREETRONICS LCD (just set this to an unused pin)
*/
// some example macros with friendly labels for LCD backlight / pin control
#define LCD_BACKLIGHT_OFF() digitalWrite( PIN_LCD_BACKLIGHT, LOW )
#define LCD_BACKLIGHT_ON() digitalWrite( PIN_LCD_BACKLIGHT, HIGH )
#define LCD_BACKLIGHT(state) {if( state ){digitalWrite( PIN_LCD_BACKLIGHT, HIGH );}else{digitalWrite( PIN_LCD_BACKLIGHT, LOW );} }
#define BUTTON_ADC_PIN A0 // A0 is the button ADC input
#elif defined(LCDI2C) // ---------LCD BOARD with I2C interface-----------
#ifndef LCD_ADDR //--------if not defined in protoboard declarations these are defaults
#define LCD_ADDR 0x27
#endif
#if !defined(PIN_LCD_EN)&&!defined(LCD_SSD1306)
#define PIN_LCD_RS 0 // LCD rs pin
#define PIN_LCD_RW 1 // LCD rw pin
#define PIN_LCD_EN 2 // LCD enable pin
#define PIN_LCD_D4 4 // LCD d4 pin
#define PIN_LCD_D5 5 // LCD d5 pin
#define PIN_LCD_D6 6 // LCD d6 pin
#define PIN_LCD_D7 7 // LCD d7 pin
#define PIN_LCD_BACKLIGHT 3 // LCD backlight pin
#endif
#else ///////////////////////parallel LCD
// regular 16x2 LCD pin defines
#define PIN_LCD_RS 19 // LCD rs pin
#define PIN_LCD_EN 18 // LCD enable pin
#define PIN_LCD_D4 20 // LCD d4 pin
#define PIN_LCD_D5 21 // LCD d5 pin
#define PIN_LCD_D6 22 // LCD d6 pin
#define PIN_LCD_D7 23 // LCD d7 pin
#define PIN_LCD_BACKLIGHT 12 // LCD backlight pin
#define PIN_LCD_CONTRAST 13 // LCD contrast pin
#endif // OPENSPRINKLER_ARDUINO_FREETRONICS_LCD
//
//////////////////////////////////////////////BUTTON PINS//////////////////////////
//
#ifdef BUTTON_ADC_PIN
// ADC readings expected for the 5 buttons on the ADC input
#define RIGHT_10BIT_ADC 80 // right
#define UP_10BIT_ADC 150 // up
#define DOWN_10BIT_ADC 240 // down
#define LEFT_10BIT_ADC 400 // left
#define SELECT_10BIT_ADC 280 // select
#define BUTTONHYSTERESIS 16 // hysteresis for valid button sensing window
#define BUTTON_RIGHT 1 // values used for detecting analog buttons
#define BUTTON_UP 2 //
#define BUTTON_DOWN 3 //
#define BUTTON_LEFT 4 //
#define BUTTON_SELECT 5 //
#else //--------------------------------default digital pin assignement
#ifndef PIN_BUTTON_1
#define PIN_BUTTON_1 10 // 0x20// 31 // button 1
#define PIN_BUTTON_2 14 // 0x21// 30 // button 2
#define PIN_BUTTON_3 16// 0x22// 29 // button 3
#endif
#endif
//
//------------------------------------------------ NOT ENABLED----------------------------------
//
/*
#ifndef OPENSPRINKLER_ARDUINO_DISCRETE
// DC controller pin defines
#define PIN_BOOST 20 // booster pin
#define PIN_BOOST_EN 23 // boost voltage enable pin
#endif // OPENSPRINKLER_ARDUINO_DISCRETE
*/
//
//-----------------------------------------------------SPI PINS------------
//
#ifdef OPENSPRINKLER_ARDUINO_W5100 // Wiznet W5100
#define PIN_ETHER_CS 10 // Ethernet controller chip select pin - default is 10
#define PIN__CS 4 // SD card chip select pin - default is 4
// Define the chipselect pins for all SPI devices attached to the arduino
// Unused pins needs to be pulled high otherwise SPI doesn't work properly
#define SPI_DEVICES 0 // number of SPI devices
const uint8_t spi_ss_pin[] = // SS pin for each device
{
53, // SD card chipselect on standard Arduino W5100 Ethernet board
34 // Ethernet chipselect on standard Arduino W5100 Ethernet board
};
#else
#define PIN_ETHER_CS 53 // Ethernet controller chip select pin
#define PIN_SD_CS 34 // SD card chip select pin
#endif // OPENSPRINKLER_ARDUINO_W5100
//
///////////////////////////////////////////////////ADDITIONAL SENSORS PIN STANDARD DEFINITIONS////////////////
//
#if ADDITIONAL_SENSORS==MEGA_W5100
// You'll need to use different pins for these items if you have them connected
#define PIN_RAINSENSOR 18 // rain sensor is connected to pin D3
#define PIN_FLOWSENSOR 19 // flow sensor (currently shared with rain sensor, change if using a different pin)
#define PIN_FLOWSENSOR_INT 20 // flow sensor interrupt pin (INT1)
#define PIN_EXP_SENSE 21 // expansion board sensing pin (A4)
#define PIN_CURR_SENSE A3 // current sensing pin (A7)
#define PIN_CURR_DIGITAL A3 // digital pin index for A7
#elif ADDITIONAL_SENSORS==ESP8266_C //OPENSPRINKLER ARDUINO DISCRETE
#define PIN_RAINSENSOR D6 // rain sensor is connected to pin D3
#define PIN_FLOWSENSOR D3 // flow sensor (currently shared with rain sensor, change if using a different pin)
#define PIN_FLOWSENSOR_INT 0 // flow sensor interrupt pin (INT1)
#define PIN_EXP_SENSE D6 // expansion board sensing pin (A4)
#elif ADDITIONAL_SENSORS==SG21_ //CSABA SENSOR CODE STANDARD BOARD
#define PIN_RAINSENSOR 2 // rain sensor/programswitch input is connected to pin D3/INT2
#define PIN_FLOWSENSOR 11 // flow sensor (INT1)
#define PIN_CURR_SENSE 6 // current sensing pin (A6)
#define PIN_CURR_DIGITAL 25 // digital pin index for A6
#define PIN_SOILSENSOR_1 24 // digital SoilSensor 1 (A7)
#define PIN_SOILSENSOR_2 26 // digital SoilSensor 2 (A5)
#elif ADDITIONAL_SENSORS==PCF8574_C
#define PIN_RAINSENSOR D6 // rain sensor is connected to pin D3
#define PIN_FLOWSENSOR D5 // flow sensor (currently shared with rain sensor, change if using a different pin)
#define PIN_FLOWSENSOR_INT 5 // flow sensor interrupt pin (INT1)
#define PIN_EXP_SENSE D6 // expansion board sensing pin (A4)
#define PIN_CURR_SENSE A0 // current sensing pin (A7)
#define PIN_CURR_DIGITAL A0 // digital pin index for A7
#endif //ESP8266
#ifdef OSBEE
///////////////////////defines for OS Bee////////////////////////////////////////////////////
#define PIN_COM 0x21 //pin for valves return line
#define MAX_NUMBER_ZONES 3 //num.of zones_______________________needed
#define st_pins OpenSprinkler::station_pins //pins used for attached Zones
#define PIN_BST_PWR 14 //pin boost power____________________needed //for OS Bee 2.0
#define PIN_BST_EN 0x20 //bin boost enable___________________needed
#define OSB_SOT_LATCH 0 //value of option for non latching valves___for OS Bee 2.0
#if OSBEE==1
#define PIN_COM 02 //pin for valves return line
#define PIN_BST_PWR 15 //pin boost power____________________needed //for OS Bee 2.0
#define PIN_BST_EN 16 //bin boost enable___________________needed
//#define OSBEE_NOLATCH
#endif
////////////////////////////////////////////////////////////////////////////////////////////////
#endif