Ejemplo n.º 1
0
////////////////////////////////////////////////////////////////////////
//  TransmitASCII - Transmit an ASCII string.
//
//  ubyte list[] - The list of ASCII chars to send, defined as a list
//                 of unsigned bytes.
//
//  int count    - The number of characters to send.
////////////////////////////////////////////////////////////////////////
void TransmitASCII()
{
  headerList[0]= 1;
  headerList[0] |= 0x80;
  int i = nxtWriteRawHS(headerList[0], sizeof(headerList));
  i = nxtWriteRawHS(transmitList[0], sizeof(ubyte)* count);
  wait10Msec(10);
}
Ejemplo n.º 2
0
////////////////////////////////////////////////////////////////////////
//  TransmitBytes - Transmit a byte string as a list of raw numbers.
//
//  ubyte list[] - The list of raw numbers as unsigned bytes.
//
//  int count    - The number of bytes to send.
////////////////////////////////////////////////////////////////////////
void TransmitBytes()
{
  ubyte headerList[1];
  headerList[0]= count;
  nxtWriteRawHS(headerList, 1);
  nxtWriteRawHS(transmitList, count);
  wait10Msec(10);
}
Ejemplo n.º 3
0
void dataLog(int idx, int t, float f)
{
	ior = nxtWriteRawHS(idx, 2);
	wait1Msec(1);

	ior = nxtWriteRawHS(t, 2);
	wait1Msec(1);

	ior = nxtWriteRawHS(f, 4);
	wait1Msec(1);
}
Ejemplo n.º 4
0
////////////////////////////////////////////////////////////////////////
//  Exit Command Mode Function
//  This will put us into command mode.
////////////////////////////////////////////////////////////////////////
void ExitCommandMode()
{
  // Note: "13" is ascii representation for carriage return.
  // Get into command mode.
  ubyte commandMode[] = {'A','T','C','N',13};  // Enter Command mode.
	nxtWriteRawHS(commandMode[0], sizeof(commandMode));
}
Ejemplo n.º 5
0
////////////////////////////////////////////////////////////////////////
//  Enter Command Mode Function
//  This will put us into command mode.
////////////////////////////////////////////////////////////////////////
void EnterCommandMode()
{
  // Note: "13" is ascii representation for carriage return.
  // Get into command mode.
  ubyte commandMode[] = {'+','+','+'};  // Enter Command mode.
	wait10Msec(100);                      // Wait 1 second.
	nxtWriteRawHS(commandMode[0], sizeof(commandMode));
	wait10Msec(100);                      // Wait 1 second.
}
Ejemplo n.º 6
0
////////////////////////////////////////////////////////////////////////
//  Transmit
//  Transmit something.
////////////////////////////////////////////////////////////////////////
void Transmit() // string xmit_pkg)
{
  ubyte command[] = {'I','H','E','A','R','T','H','K','K'};
  nxtWriteRawHS(command[0], sizeof(command));
  wait10Msec(10);
}
Ejemplo n.º 7
0
////////////////////////////////////////////////////////////////////////
//  AT Command Mode Command
//  This will Send an AT Command with no modifiers or parameters.
////////////////////////////////////////////////////////////////////////
void GiveCommand(char FirASCII, char SecASCII, char Param)
{
  ubyte command[] = {'A','T',' ',FirASCII,SecASCII,13};
  nxtWriteRawHS(command[0], sizeof(command));
  wait10Msec(10);
}