arduino Create simple function


Example

int squareNum (int a) {
    return a*a;
}

int : return type

squareNum : function name

int a : parameter type and name

return a*a : return a value (same type as the return type defined at the beginning)

C - Arduino function anatomy