Go Down

Topic: delay(1) in analogRead() (Read 683 times) previous topic - next topic

eighthave


I just saw that there is a delay(1) in the analogRead() function in wiring.c.  That seems like a very long delay.  Is there anyway to make it shorter?  I was hoping to be able to output all of the analogIns per 4ms cycle in Firmata.

mellis

I think I'll be removing it completely in Arduino 0008.  Previously (and before we had delayMicroseconds()), it seemed that some delay was necessary to prevent analogRead() from returning readings for the wrong pin.  Now it seems to work fine without the delay.  I'm not quite sure why, so I'd like to test it a bit more.

Go Up