diff --git a/server/plugins/BELAUGens.cpp b/server/plugins/BELAUGens.cpp index 235797d576b..7369ec8d064 100644 --- a/server/plugins/BELAUGens.cpp +++ b/server/plugins/BELAUGens.cpp @@ -679,6 +679,9 @@ void DigitalOut_Ctor(DigitalOut* unit) { (int)ZIN0(2); // method of writing; 1 = writeOnce; 0 = write on change -- cannot change after construction unit->mDigitalPin = (int)fDigital; unit->mLastOut = 0; + // initialize first buffer + pinMode(context, 0, unit->mDigitalPin, OUTPUT); + digitalWrite(context, 0, unit->mDigitalPin, unit->mLastOut); if ((unit->mDigitalPin < 0) || (unit->mDigitalPin >= context->digitalChannels)) { rt_printf("DigitalOut warning: digital pin must be between %i and %i, it is %i \n", 0, context->digitalChannels,