#include "mcc_generated_files/mcc.h" #include "stdlib.h" #include "pfodMenu.h" void main(void) { SYSTEM_Initialize(); // Initialize the device INTERRUPT_GlobalInterruptEnable(); // Enable the Global Interrupts INTERRUPT_PeripheralInterruptEnable(); // Enable the Peripheral Interrupts pfodParser_setup(); while (1) { pfodParser_parse(); if (cmd_A_var) { LED_RC0_SetHigh(); } else { LED_RC0_SetLow(); } } } unsigned long timeSec = 0; void TMR0_CallBack(void) { timeSec++; plot_X_var = timeSec; plot_1_var = 450+600+(rand()%100); plot_2_var = cmd_A_var; pfodParser_sendDataFlag = 1; // send data once per sec }