I hope this is the right place to post this; if not, my apologies.
I recently 'inherited' an Arduino sketch for a design project I'm working on, and I noticed in every instance where digitalWrite() is used, a line calling for a 50ms delay immediately follows it, like so:
//Not posting the entire code seeing as it's 850 lines and most are irrelevant
digitalWrite(6, LOW);
delay(50);
digitalWrite(7, LOW);
delay(50);
Is it necessary to have all these delays? They don't add that much time, but I'm trying to optimize the speed with which the sketch runs, and unless taking the delays out will cause digitalWrite to malfunction, I would like to remove these lines if I don't need them.
Anyways, what's the verdict? Do I need these delays?
Thanks,
ECpower2