I have made this code with my group
now we want to edit it and make the code read voltage of a battery but we're not sure how to edit it because the professor want it in the same form as below and by the simple C
Please don't forget to put comments so I would know what you actually changed
float ThresholdExceeded = 0;
char x[] = " out of 3.3v \n";
volatile unsigned int i=2001;
void setup()
{
ADC12CTL0 = ADC12SHT02 + ADC12ON; // Sampling time, ADC12 on
ADC12CTL1 = ADC12SHP; // Use sampling timer
ADC12IE = 0x01; /