DriveMethod

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() to change drive method. Call it before call output(). But you can call io.drive() while output.

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

Drive Method List

See drive methods on each device detail.

Below is obniz Board Series drive methods.

TypeVoltageMax CurrentMaximum FrequencyDetail
push-pull5v5v1A<=250khz(Recommend)Default. Over-current Over-heating protection
push-pull3v3v1mA(Recommend)<=80MhzBest effort over-current protection
open-drain<=5v1mA(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.