Пример #1
0
void VDIP::processNXT(portConfig *portConfigBuffer)
{
	  char *name;
	  char *btAddress;
	  long	freeMemory;
          extern BT bt;
          if (myEEPROM.getResetStatus() == (byte) 0){
	    if(nxtQueryDevice(this,portConfigBuffer->usbDev,&name,&btAddress,&freeMemory)){
//	      Serial.print("btAddress: \"");
//	      Serial.print(btAddress);
//	      Serial.print("\"");
              bt.setRemoteAddress(btAddress);
              delay(100);
//	      Serial.print(myEEPROM.getResetStatus());
              myEEPROM.setResetStatus(1); // increments the "status" so that the ChapR knows it has been reset
//	      Serial.print(myEEPROM.getResetStatus());

              delay(1000);
              software_Reset();
            }
          }    
}
Пример #2
0
void VDIP::ejectNXT()
{  
     myEEPROM.setResetStatus(0);
}