Can the Arduino read sensor data from a pin while the delay() function is in effect?

Nguyễn Hào

New member
Can the Arduino read sensor data from a pin while the delay() function is in effect?
A. Yes
B. No
 
Answer: B
Explanation: The delay() function is used to suspend operations for a specified amount of time. This is really handy for certain operations like viewing data on the Serial Monitor. However, this has a very serious drawback; it suspends ALL operations during this time, i.e. no mathematical calculations, no sensor data inputs, etc. for the time it is in effect.
 

Tìm kiếm

Back
Top