New to using the Spark here - I want to vary the amplitude of an LED is a sinusoidal manner through one of the analogue ports, but it seems there is no sine function to work with that I can find.
How do I generate a sine wave, say based upon the timer? Will be straightforward once I know how to find that function!
So you need to include that. I believe that sin(x) in traditional C is only available for double datatype, but in more modern compilers you can use double, float, and long double.
PaulR, you can also use a sine lookup table (256 bytes in size) if you want faster control but your application may not need it. There are plenty of Arduino examples to cull code from.