Sunday, June 20, 2010

Arduino learning-8

delay(ms)
Pauses a program for the amount of time as specified in milliseconds, where 1000 equals 1 second.
delay(1000); // waits for one second
millis()
Returns the number of milliseconds since the Arduino board began running the current program as an unsigned long value.
value = millis(); // sets ‘value’ equal to millis()
Note: This number will overflow (reset back to zero), after approximately 9 hours.
min(x, y)
Calculates the minimum of two numbers of any data type and returns the smaller number.
value = min(value, 100); // sets 'value' to the smaller of
// 'value' or 100, ensuring that
// it never gets above 100.
max(x, y)
Calculates the maximum of two numbers of any data type and returns the larger number.
value = max(value, 100); // sets 'value' to the larger of
// 'value' or 100, ensuring that
// it is at least 100.
Related Posts Plugin for WordPress, Blogger...
Disclaimer: All the information in this blog is just gathered from different sites in the web and placed here and I am not the owner for these content

Popular Projects

Followers

My Blog List

Give Support

Give Support
Encourage me Through Comments & by Following