#use sony-ir.icb int data= 0; int rec; void main() { int counter= 0; int flag= 0; sony_init(1); while (!start_button()) { if (stop_button()) { flag= 1; counter++; } while (flag == 1) { if (!stop_button()) flag= 0; } printf("Group No.=%d\n",counter); } data = 10 * counter; start_process(Printing()); while (1) { rec= ir_data(1); if (rec == data) beep(); } } void Printing() { while (1) { printf("Recieving %d\n",rec); msleep(50L); } }