void main() { unsigned int x, y, button_press; // === Initialize system ================================================ IFG1=0; /* clear interrupt flag1 */ WDTCTL=WDTPW+WDTHOLD; /* stop WD */ button_press = FALSE; initMSP(); initLCD(); x=4; y=4; drawBox(x, y); while(1) { if (UP_BUTTON == 0){ y = y - 10; drawBox(x, y); } //the bulk of your code goes here } }
int main(void) { initMSP(); WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR |= 0x01; // Set P1.0 to output direction setupBlueToothConnection(); while (1) { serialPrintln("abcdefg"); serialPrintln("1234567"); } return 0; }