General formula for LED resistor is ...
\$\huge R = \frac{V_{Supply} - V_{LED}}{I_{LED}}\$
Where:
- \$I_{LED}\$ is your chosen LED drive current which should be less than the maximum value stated in the LED's spec sheet.
- \$V_{LED}\$ is the minimum forward voltage of the LED at your chosen \$I_{LED}\$