Sine wave led fade in and out

Not sure if you want a sine wave specifically or just a nice looking fade in fade out on the LED.

Something that makes a convincing LED fade is a fibonacci sequence of delays. 1 2 3 5 8 13 21 etc. Then multiply by your minimum delay when you build your table.

As the LED gets brighter you need a larget step to make a detectible difference anyway. The Fibonacci sequence acts a lot like a log scale, but it is much faster to compute your table. I suspect a sine is going to seem like full bright 1/3 of the time and full dark 1/3 of the time....