Your problem is in that attach statement, you don't put a pin number there you put a 0 if wired to pin 2 or 1 if wired to pin 3, those are the only two user interrupt options for a 328p based board.
So change:
attachInterrupt(CHA, checkDirection, RISING);
to
attachInterrupt(0, checkDirection, RISING);
Or assign the value of 0 to your CHA variable.
Lefty