public void step()
    {
        log.debug("============== Stepping "+tam.getId()+" currentState "+currentState+ " ================");
        switch (getState())
        {
        
        case READ_ID:
	        if(tam.isRobotPresent()){ // if there is a robot in the tam
	        	//try to read a value from it
	        	log.info("ID from robot: " + tam.getRobotDataReceived());
	        	if (tam.getRobotDataReceived() == 5)
	        		currentState = TAMState.WRITE_RAND;
	        }
	        break;
	     
        case WRITE_RAND:	       
        	if(tam.isRobotPresent()){ // if there is a robot in the tam
                int randomValue = 37;
        		//sends a random value between 0 and 10       
        		log.info("Sending " + randomValue +" to robot... ");
                tam.setRobotDataToSend(randomValue);
        		log.info("...done");
        		currentState = TAMState.READ_RAND;
        	}
	        break;
	        
        case READ_RAND:
        	if(tam.isRobotPresent()){ // if there is a robot in the tam
	        	//try to read a value from it
        		int value = tam.getRobotDataReceived();
	        	log.info("Random value from robot: " + value);
	        	if (value == 37){
	        		// it works
	        		log.info("Test success");
                    tam.setLedColor(LED_GREEN);
	        		currentState = TAMState.DONE;
	        	}
	        }
	        break;
	        
        case DONE:	       
        	log.info("Experiment done");
	        break;
        }
        log.debug("==============================");
        
    }