code: def write_bit(self, registeraddress, value, functioncode=5):
          
          _checkFunctioncode(functioncode, [5, 15])
          _checkInt(value, minvalue=0, maxvalue=1, description='input value')
          self._genericCommand(functioncode, registeraddress, value)
docs: Write one bit to the slave.
  
          Args:
              * registeraddress (int): The slave register address (use decimal numbers, not hex).
              * value (int): 0 or 1
              * functioncode (int): Modbus function code. Can be 5 or 15.
  
          Returns:
              None
  
          Raises:
              ValueError, TypeError, IOError