Set the logic output level for the pin.

        :type value: bool
        :param value: True for a logic high
17662
def write(self, value):
        
        if self.inverted:
            value = not value
        m = getattr(self.chip, self.method)
        m(value=value, **self.arguments)
80612
@Override
    public void setValue(Pin pin, double value) {

        // validate range
        if(value <= getMinSupportedValue()){
            value =  getMinSupportedValue();
        }
        else if(value >= getMaxSupportedValue()){
            value = getMaxSupportedValue();
        }

        // the DAC only supports integer values between 0..4095
        int write_value = (int)value;
        try {
            // create data packet and seed targeted value
            byte packet[] = new byte[3];
            packet[0] = (byte) MCP4725_REG_WRITEDAC;
            packet[1] = (byte) (write_value >> 4); // Upper data bits (D11.D10.D9.D8.D7.D6.D5.D4)
            packet[2] = (byte) (write_value << 4); // Lower data bits (D3.D2.D1.D0.x.x.x.x)

            // write packet of data to the I2C bus
            device.write(packet, 0, 3);

            // update the pin cache and dispatch any events
            super.setValue(pin, value);
        }
        catch (IOException e) {
            throw new RuntimeException("Unable to write DAC output value.", e);
        }
    }
279022
def interface(self, value):
        
        self._interface = value
        if isinstance(value, int):
            self._device_number = value
        else:
            self._serial_number = value
399132
def set_is_executable(self, value):
        
        if value is None or not isinstance(value, bool):
            raise TypeError("IsExecutable must be set to a bool")
        else:
            self.__is_executable = value
467889
def set_voltage(self, value, channel=1):
        
        cmd = "V%d %f" % (channel, value)
        self.write(cmd)
1296426
def set_gpio_pin(self, pin_number, setting, dest_addr_long=None):
        
        assert setting in const.GPIO_SETTINGS.values()
        self._send_and_wait(
            command=const.IO_PIN_COMMANDS[pin_number],
            parameter=setting.value,
            dest_addr_long=dest_addr_long)
1192576
def set(self, channel, state):
        """"""
        checked_val = self._check_dac_val(channel, state)
        self._dac_enabled = 0x40
        self.i2c.write8(self._dac_enabled, checked_val * 255)
24554
def set_value(self, value):
        
        if value:
            self.setChecked(Qt.Checked)
        else:
            self.setChecked(Qt.Unchecked)
232402
def boolean(value):
    '''
    
    '''
    if value is None or isinstance(value, bool):
        return value

    try:
        return bool(int(value))
    except ValueError:
        lower_value = value.strip().lower()
        if not lower_value:
            return None
        if lower_value in ('f', 'false', 'n', 'no', 'off'):
            return False
        if lower_value in ('on', 't', 'true', 'y', 'yes'):
            return True
        raise Invalid('Unable to parse boolean {0}'.format(value))
195957
def set_boolean(self, option, value):
        
        if not isinstance(value, bool):
            raise TypeError("%s must be a boolean" % option)

        self.options[option] = str(value).lower()
603495
def setsebool(boolean, value, persist=False):
    '''
    
    '''
    if persist:
        cmd = 'setsebool -P {0} {1}'.format(boolean, value)
    else:
        cmd = 'setsebool {0} {1}'.format(boolean, value)
    return not __salt__['cmd.retcode'](cmd, python_shell=False)
363222
def setActivations(self, value):
        
        #if self.verify and not self.activationSet == 0:
        #    raise LayerError, \
        #          ('Activation flag not reset. Activations may have been set multiple times without any intervening call to propagate().', self.activationSet)
        Numeric.put(self.activation, Numeric.arange(len(self.activation)), value)
        self.activationSet = 1
1265240
def _output_pins(self, pins):
        
        [self._validate_channel(pin) for pin in pins.keys()]
        # Set each changed pin's bit.
        for pin, value in iter(pins.items()):
            if value:
                self.gpio[int(pin/8)] |= 1 << (int(pin%8))
            else:
                self.gpio[int(pin/8)] &= ~(1 << (int(pin%8)))
        # Write GPIO state.
        self._write_gpio()
64683
def set_level(self, val):
        """"""
        speed = self._value_to_fan_speed(val)
        if val == 0:
            self.off()
        else:
            set_command = ExtendedSend(self._address,
                                       COMMAND_LIGHT_ON_0X11_NONE,
                                       self._udata, cmd2=speed)
            set_command.set_checksum()
            self._send_method(set_command, self._on_message_received)
1132657
async def digital_pin_write(self, pin, value):
        

        command = (PrivateConstants.SET_DIGITAL_PIN_VALUE, pin, value)

        await self._send_command(command)
1146682
def set_level(self, val):
        """"""
        if val == 0:
            self.off()
        elif val == 255:
            self.on()
        else:
            setlevel = 255
            if val < 1:
                setlevel = val * 255
            elif val <= 0xff:
                setlevel = val
            change = setlevel - self._value
            increment = 255 / self._steps
            steps = round(abs(change) / increment)
            print('Steps: ', steps)
            if change > 0:
                method = self.brighten
                self._value += round(steps * increment)
                self._value = min(255, self._value)
            else:
                method = self.dim
                self._value -= round(steps * increment)
                self._value = max(0, self._value)
            # pylint: disable=unused-variable
            for step in range(0, steps):
                method(True)
            self._update_subscribers(self._value)
56319
@Override
    public void setPercentValue(GpioPinAnalogOutput pin, Number percent){
        setPercentValue(pin.getPin(), percent);
    }