Sensor coding by detecting magnitude of an electrical parameter