Automatic Resistance: Resistors Controlled by the Environment