

If device IO has multiple drive method, configure it for change output power or voltage.

By default, obniz choose "Most powerful push-pull" for output. use [io.drive()](https://obniz.github.io/obniz/obnizjs/classes/obnizcore.components.peripheralio.html#drive) to change drive method. Call it before call output(). But you can call io.drive() while output.

```javascript
// Javascript Example

obniz.io0.pull("5v");
obniz.io0.drive("open-drain");
obniz.io0.output(true); // output open-drain with 5v pull-up

```

## Drive Method List

> [drive class Reference](https://obniz.github.io/obniz/obnizjs/classes/obnizcore.components.peripheralio.html#drive)
> [drive API Reference](/reference/websocket/io#request-output_type)

See drive methods on each device detail.

Below is **obniz Board Series drive methods.**

drive() argument | Drive method and Voltage | Max Current | Maximum Frequency | Detail
---|---|---|---|---
`5v` | push-pull 5v | 1A  | <=250khz(Recommend) | Default. Over-current Over-heating protection
`3v` | push-pull 3v | 1mA(Recommend) | <=80Mhz | Best effort over-current protection
`open-drain` | open-drain <=5v | 1mA(Recommend) | <=80Mhz |  

#### Push Pull

Standard output method. It output VCC voltage when true. GND(0v) for false.

#### Open Drain

When false, same as push-pull. When true, IO changed to High Impedance. This is used for bi-directional communication or different voltage communication.
