A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By eqsOne
#62876 You're welcome! The 'max' parameter calculates the maximum of two numbers. If 'math.h' is properly included it should actually compile:

Code: Select all#include <math.h>

___________________
Edit: Hmm, just googled this and there seems to be an issue with 'min/max' in IDE 1.6.5. indeed. Not even sure if math.h is actually needed for 'min/max' to work.
Anyway, seems you can try adding the 'max' definition directly to the sketch like this:

Code: Select all#define max(a,b) ((a)>(b)?(a):(b))