Well, I just threw away a PCB because my JST-XH 4-pin connector didn't fit.
There's a lot of confusion about the pitch of these connectors: 2.54mm as many seem to think, or 2.5mm as the spec says.
Most Eagle footprints use 2.54mm, so I made my own using 2.5mm and it doesn't fit.
Now, I spent the last hour measuring the pitch of these connectors (I have 10 of them),
and comparing them against pin-headers, breadboards, female dupont connectors etc. under a microscope.
The pitch is 2.54mm every time.
I checked the invoice, I checked the dealer (Farnell) information, I checked the datasheet. They all say 2.5mm.
I checked the connectors; the look like JST-XH and it says "4" at the top and "H JST" at the bottom just like in the spec.
Does someone have an explanation?
(picture attached)