Code for MSP430G2553 LaunchPad from TI. Flashlight with PWM, temperature sensor, and LiIon battery management