Layout of the room before installation
Layout of the room after installation
Sample Algorithm for controlling actions in the room
BASIC ALGORITHM (Pseudocode): struct target[MAX] { int x_coord; int y_coord; int cellphone_status; } void enterPI_ISR() { if(detectCellPhone()) { visitors++ } } void exitPI_ISR() { if(detectCellPhone()) { visitors-- } } void timer() { for(int i = 0; i < visitors; i++) { target[i].x_coord = getX_position() target[i].y_coord = getY_position() target[i].cellphone_status = getCellPhoneStatus() } } void main() { for(;;) // INFINITE LOOP { if(visitors > 0) { for(int i = 0; i < visitors; i++) { if(target[i].cellphone_status == OFF) roof[target[i].x_coord, target[i].y_coord] = OFF if(target[i].cellphone_status == ON) roof[target[i].x_coord, target[i].y_coord] = DIM if(target[i].cellphone_status == DIALING) roof[target[i].x_coord, target[i].y_coord] = YELLOW if(target[i].cellphone_status == TALKING) roof[target[i].x_coord, target[i].y_coord] = TRANSPORT } } } }