/* * main.c */ int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer // Use 1 MHz DCO factory calibration DCOCTL = 0; BCSCTL1 = CALBC1_1MHZ; DCOCTL = CALDCO_1MHZ; P1DIR = 0xFF; // Set P1.0 to output direction setupTriggerPulse(); setupGpioEchoInterrupt(); while(1) { switch(j % NUM_PROG) { case 0: prog1(); break; case 1: prog2(); break; case 2: prog3(); break; case 3: prog4(); break; } } }
int main() { cout << "Hello World ! - Welcome to chapter 14 " << endl << endl; prog1 (); prog2 (); prog3 (); prog4 (); prog5 (); prog6 (); prog7 (); prog8 (); prog9 (); prog10(); prog11(); cout << "\n\n\n "; }