Sensor question

so I’ve decided to streaming issue for now, and focus on my sensor. It stops at “made it through send” but before “made it through end”. Any ideas as to why the program would terminate just before the “wire.endtransmission”?

#include <NewSoftSerial.h>
#include <Wire.h>
#include <SD.h>
int CS=8;
NewSoftSerial nss (3,4);
char inData[151]; 
byte index = 0; 
int HMC6352=0x42;
int slave;
byte heading[2];
int i, headingval;
long id = 1;
void setup()
{
  slave=HMC6352>>1;
  Serial.begin (115200);
  Serial.println("start");
  nss.begin (9600);
  pinMode (CS,OUTPUT);
  if(!SD.begin(CS))
  {
    Serial.println("Card Failure");
    return;
  }
}
void loop()
{
  for( int j=0;j<10000;j++)
  {
    while(nss.available() > 0)
    {

      char inChar = nss.read();
      if (index < (151))
      {
        inData[index++] = inChar;
        inData[index] = '\0';
        if (index == (151))
        {
          File gps = SD.open("gps.txt",FILE_WRITE);
          gps.print(inData);
          gps.close();

          Serial.print(inData);

          index=0;
        }
      }
    }
  }
  Serial.println("made it to wire");
  Wire.beginTransmission(slave);
  Serial.println("made it to trans");
  Wire.send("A");
  Serial.println("made it through send");
  Wire.endTransmission();
  Serial.println("made it through end");
  Wire.requestFrom(slave,2);
  Serial.println("made it to i");
  i=0;
  Serial.println("made it to for");
  for(int z=0;z<100;z++);
  {
    Serial.println("made it inside wire for");
    if(Wire.available()&&i<2)
    {
      heading[i]=Wire.receive();
      headingval=heading[0]*256+heading[1];
      int whole = headingval/10;
      int frac=headingval%10;
      Serial.println(whole,frac);

    }

  }

}

should I have posted this in a new topic since I'm not really asking a question about serial stuff anymore?

should I have posted this in a new topic since I'm not really asking a question about serial stuff anymore?

Yes.

btricha2:
so I've decided to streaming issue for now, and focus on my sensor. It stops at "made it through send" but before "made it through end". Any ideas as to why the program would terminate just before the "wire.endtransmission"?

What do you mean by "terminate"?

You know, it's frustrating when someone posts code that has a whole lot of debugging displays in it, displays that would be very helpful in understanding the problem, and they choose not to post those displays, but just say the program "terminates".

my apologies

here is a section of the display on the serial monitor

$GPGSV,3,1,12,25,65,237,35,29,57,331,32,05,56,4.23,109012631.83,-1448.8,0,35,19,-5.made it to wire
made it to trans
made it through send
made it to wire
made it to trans
made it through send
made it to wire
made it to trans
made it through send
made it to wire
made it to trans
made it through send
made it to wire
made it to trans
made it through send
77,2,378
$PMTKCHL,002,0.00,0.00,-2940.3,56,13,6B,-9.24,2,3
00$PMTKANT,0*45

"

I don't see Wire.begin() in your code.