Beagle Board -

digitalWrite(pin, value, [callback])

Write a HIGH or LOW to a digital I/O pin.

NOTE: The 4 USRx LEDs are all able to operate as digital output pins, giving you an always-available output to test your software.


  • pin: the BeagleBone pin identifier
  • value: the logic level to set the pin
  • callback: called upon completion

Return value


  • x.err: error status message


var b = require('bonescript');
b.pinMode('USR0', b.OUTPUT);
b.digitalWrite('USR0', b.HIGH);

Build and execute instructions

  • The USR0 LED is built in, so no circuit assembly is required.
  • Look for it to go high when you run the example code.
  • Alter the code to set it low and run it again.

See also


Related functions


Last updated by cortezjuanjr on Thu Jun 27 2013 20:26:04 GMT-0000 (UTC).