added wait for USB Device to enumerate to some examples

added CV_MANUFACTURER_START
This commit is contained in:
Alex Shepherd
2022-02-27 18:21:52 +13:00
parent b35c1fbbd0
commit 6f91d4f7d4
3 changed files with 9 additions and 2 deletions

View File

@@ -95,6 +95,8 @@ void notifyDccSigOutputState( uint16_t Addr, uint8_t State)
void setup()
{
Serial.begin(115200);
elapsedMillis millisWaitedForUSB = 0;
while(!Serial && (millisWaitedForUSB < 3000)); // Wait up to 3 seconds for USB to Connect
// Configure the DCC CV Programing ACK pin for an output
pinMode( DccAckPin, OUTPUT );