add relay for ec sensor
This commit is contained in:
parent
576860ae31
commit
9e539682e8
12
include/ec.h
12
include/ec.h
|
@ -3,6 +3,12 @@
|
|||
|
||||
#include <Arduino.h>
|
||||
|
||||
#define EC_PIN_RELAY_PROBE 27
|
||||
#define EC_PIN_RELAY_CALIBRATION 26
|
||||
#define EC_PIN_RELAY_RANGE 25
|
||||
|
||||
#define EC_CALIBRATION_RESISTOR_NC 100000
|
||||
#define EC_CALIBRATION_RESISTOR_NO 1000
|
||||
|
||||
|
||||
#define EC_PIN_ADC 4
|
||||
|
@ -24,6 +30,12 @@ void ec_setup() {
|
|||
ledcAttachPin(EC_PIN_FREQ, EC_PWM_CH);
|
||||
ledcWrite(EC_PWM_CH, 127);
|
||||
|
||||
pinMode(EC_PIN_RELAY_PROBE,OUTPUT); //LOW=Calibration/idle, HIGH=Probe connected
|
||||
pinMode(EC_PIN_RELAY_CALIBRATION,OUTPUT); //LOW=NC Calibration Resistor, HIGH=NO Calib. Res.
|
||||
pinMode(EC_PIN_RELAY_RANGE,OUTPUT); //LOW=NC Range Resistor, HIGH=NO Range Resistor
|
||||
digitalWrite(EC_PIN_RELAY_PROBE,LOW);
|
||||
digitalWrite(EC_PIN_RELAY_CALIBRATION,LOW);
|
||||
digitalWrite(EC_PIN_RELAY_RANGE,LOW);
|
||||
}
|
||||
|
||||
void ec_loop(unsigned long loopmillis, unsigned long pInterval) {
|
||||
|
|
Loading…
Reference in New Issue