add slave pump
This commit is contained in:
@@ -82,10 +82,15 @@ void ioHelperEdgeDetector(void);
|
||||
#define LED_KALTWASSER_DRAN_RT 22
|
||||
|
||||
#define LED_PUMPE_AN 11
|
||||
#define LED_SLAVE_PUMPE_AN BitPL6
|
||||
|
||||
#define OUT_PUMPE_STARTSTOP BitPB5
|
||||
#define OUT_PUMPE_PWM BitPB6
|
||||
|
||||
#define OUT_SLAVE_PUMPE_STARTSTOP BitPH6
|
||||
#define OUT_SLAVE_PUMPE_PWM BitPB4
|
||||
|
||||
|
||||
#define OUT_VENTIL_PUMPE BitPA0
|
||||
#define OUT_VENTIL_ABLASS BitPA1
|
||||
|
||||
@@ -119,9 +124,12 @@ void ioHelperEdgeDetector(void);
|
||||
#define IN_NOTAUS_ANLAGE BitPinF7
|
||||
#define IN_NOTAUS_SCHRANK BitPinK0
|
||||
|
||||
#define IN_KLATWASSER_DRAN 9
|
||||
#define IN_KLATWASSER_DRAN 6
|
||||
|
||||
#define BTN_BECKEN_FUELLEN 11
|
||||
#define BTN_BECKEN_LEEREN 12
|
||||
|
||||
#define BTN_SLAVE_BECKEN_FUELLEN 18
|
||||
#define BTN_SLAVE_BECKEN_LEEREN 19
|
||||
|
||||
#endif
|
||||
|
||||
17
pumpe.c
17
pumpe.c
@@ -21,4 +21,21 @@ void do_pumpe(){
|
||||
set_Output(LED_PUMPE_AN, 0);
|
||||
send_value(&mqtt_client, "/Filamentanlage/02_Wasserbecken/state/pumpe_warm", 0);
|
||||
}
|
||||
if(read_Input(BTN_SLAVE_BECKEN_FUELLEN, RISING)){
|
||||
set_Output(OUT_SLAVE_PUMPE_STARTSTOP, 1);
|
||||
set_Output(OUT_SLAVE_PUMPE_PWM, 1);
|
||||
//set_Output(OUT_VENTIL_ABLASS, 0);
|
||||
//set_Output(OUT_VENTIL_PUMPE, 0);
|
||||
set_Output(LED_SLAVE_PUMPE_AN, 1);
|
||||
send_value(&mqtt_client, "/Filamentanlage/03_Wasserbecken/state/pumpe_warm", 1);
|
||||
}
|
||||
|
||||
if(read_Input(BTN_SLAVE_BECKEN_LEEREN, RISING)){
|
||||
set_Output(OUT_SLAVE_PUMPE_STARTSTOP, 0);
|
||||
set_Output(OUT_SLAVE_PUMPE_PWM, 0);
|
||||
//set_Output(OUT_VENTIL_ABLASS, 1);
|
||||
//set_Output(OUT_VENTIL_PUMPE, 1);
|
||||
set_Output(LED_SLAVE_PUMPE_AN, 0);
|
||||
send_value(&mqtt_client, "/Filamentanlage/03_Wasserbecken/state/pumpe_warm", 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user