We show that the size of codes in projective space controls structural results for zeros of odd maps from spheres to Euclidean space. In fact, this relation is given through the topology of the space of probability measures on the sphere whose supports have diameter bounded by some specific parameter. Our main result is a generalization of the Borsuk--Ulam theorem, and we derive four consequences of it: (i) We give a new proof of a result of Simonyi and Tardos on topological lower bounds for the circular chromatic number of a graph; (ii) we study generic embeddings of spheres into Euclidean space, and show that projective codes give quantitative bounds for a measure of genericity of sphere embeddings; and we prove generalizations of (iii) the Ham Sandwich theorem and (iv) the Lyusternik--Shnirelman- Borsuk covering theorem for the case where the number of measures or sets in a covering, respectively, may exceed the ambient dimension.