IO Output controls voltage of terminal to drive electricity. It light up lights and rotate a motor.

io.output() function control output. Each device io has a unique number like 0, 1, 2,,,. For example, output a voltage on io number 0 performs like below.

// Javascript Example


Or using getIO() by specifying io number.

// Javascript Example


Actual output voltage depends on DriveMethod and device. Normally, default setting is "Push pull with Most powerful voltage".

Stopping output

Call io.end() to stop output. output(false) is not stopping method. It means "output low votlage".

Overcurrent Detection

obniz board series has overcurrent and overheating detection circuit. It will stop and restart output automatically. See more at device reference.

When a device detect overcurrent situation, obniz.js will receive below alert.

// Javascript Example

io1: heavy output. output voltage is too low when driving high

It means "actual output voltage is too low". So connected parts consume too much energy or wire is short circuit. In that situation circuit might stop and restart output very quickly.

Or you might receive below error.

// Javascript Example

[Error] Error: io1: output voltage is too low when driving high. io state has changed output to input

In that situation, circuit stop output instantly to protect drive circuit.

You should care connected parts and wires. If you need more power, consider below

  • When target is a power supply, connect another power source directly.
  • Connect two or more io and drive target from multiple ios.