I'm working on a project for school and I would really like to know how long it takes for the arduino to send a logic "1" to a pin (for ex. pin 13) when I have:
int led = 13;
void setup() { pinMode(led, OUTPUT); }
void loop() { digitalWrite(led, HIGH); }
so actually I want to know the time between telling the pin to go HIGH and the pin actually being HIGH..
I know it ain't long but I need it to make a prediction of the accuracy of a steppermotor driven project..
Either one takes just a couple clock cycles, so something like 130-200nS. 0.13 to 0.2uS. 0.00013 to 0.0002mS
The bootloader startup, other sketch startup, setup() and then loop() will add some time between power on and the pin actually going high (assuming you have a small pulldown like 10K to Gnd so the pin ins't floating until actually commanded high).
The loop() { } function adds something like 12uS for each pass, so if your code was
Oh, ok man so actually I would never notice it for my use we are making a simple engraving machine the only thing that will affect the acuracy will be the degree of the stepper.
Thank you for the quick response, it's my first post on the forum and I really like it already