Beagle Board - beagleboard.org

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.

Arguments

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

Return value

callback(x)

  • x.err: error status message

Example

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

Topics

Related functions

Examples


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