Reading RPM from a car

I am successfully able to read and interpret a VSS signal from my car on the arduino.

I'm using this to read frequency on my Arduino. Long story short, pin 5 reads VSS, and pin 6 reads RPM. I've tested both pins with my function generator, and it reads square waves with no problems.

I made sure that the VSS works before testing out the RPM. The VSS pulse from my sensor is read properly and I'm able to determine my vehicle's speed. I tried plugging the VSS signal into both pin 5 and 6, and they are both able to display onto the serial output with no issues.

However, when I hooked up my RPM signal to the arduino (12V pulse signal dropped down to <5V with a simple 2.2k/1k voltage divider), the RPM output is "-1" on the serial output. Has anyone ever come across this issue?

int vss, rpm;
  //VSS Pin 5
  if (FreqCount.available())
  {
    unsigned long count = FreqCount.read();
    Serial.print("VSS: ");

    vss = count * 10;
    Serial.println(vss);
  }


  //RPM Pin 6
  rpm = 500000 / pulseIn(6, LOW);
  Serial.print("RPM: ");
  Serial.println(rpm);

So what value does "pulseIn(6, LOW);" return?

I built that stuff 30 years ago, showing RPM, speed, fuel consumption and some more, measured from the ignition coil, a gear sensor and a fuel flow seansor, without any Forum to ask. It ran for 10 years and the only mishap was one internal cabel broken after some years.
Verify each step of the chain starting from the lowest level.

Be ware that pulseIn() returns zero if it times out. So if the engine isn't running, for example, this line:

rpm = 500000 / pulseIn(6, LOW);

could very well throw a divide by zero exception. Or at least it should; in the case of the Arduino the expression returns '-1'.

You need to qualify the return from pulseIn() to see if it's within the expected RPM range before using it in that equation.