I have a sketch where I am using the setup function to turn on an LED, amongst other things. The program also has some header files included.
When I run the code it takes approximately 10s to reach the setup() as the LED gets turned on after that and also the Serial.print commands get called in after 10 seconds.
If I remove a particular header file the LED lights up instantaneously and I can also see the text that I print in the setup function instantaneously.
The header file is of OTA (over the air). I am using the redbear ble module which has an nrf chip.
I was wondering if there is a way to get the setup function run without this delay. If not, if there is a way to at least turn on the LED before even the header files initialize. TIA.