You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi i have notices that in relay module in _relayConfigure pins are not set to high when relay is type inverse - there is short period of time when relays is set active - i have added to it control w gate and it's opening/closing gate on every reboot of device.
Simple fix is to set pin to high in same loop where it's set as output.
Changed code:
void _relayConfigure() {
for (unsigned int i=0; i<_relays.size(); i++) {
pinMode(_relays[i].pin, OUTPUT);
if (_relays[i].type == RELAY_TYPE_LATCHED || _relays[i].type == RELAY_TYPE_LATCHED_INVERSE) {
pinMode(_relays[i].reset_pin, OUTPUT);
}
if (_relays[i].type == RELAY_TYPE_INVERSE) {
//set to high to block short opening of relay
digitalWrite(_relays[i].pin, HIGH);
}
_relays[i].pulse = getSetting("relayPulse", i, RELAY_PULSE_MODE).toInt();
_relays[i].pulse_ms = 1000 * getSetting("relayTime", i, RELAY_PULSE_MODE).toFloat();
}
}
The text was updated successfully, but these errors were encountered:
Hi i have notices that in relay module in _relayConfigure pins are not set to high when relay is type inverse - there is short period of time when relays is set active - i have added to it control w gate and it's opening/closing gate on every reboot of device.
Simple fix is to set pin to high in same loop where it's set as output.
Changed code:
The text was updated successfully, but these errors were encountered: