Beagle Board - beagleboard.org

BeagleBone Functions

    Basic Functions
  • digitalWrite
  • attachInterrupt
  • Simple demo apps
  • Blink LED #1
  • Blink LED #2
  • analogWrite with Slider
  • analogRead with Slider
  • Oscilliscope demo
  • Weather Station demo
  • Early prototypes
  • Blockly
Not Connected
Did you know (that this page can connect with your BeagleBoard?
Type in your IP address here:
Connected
Your board is connected!
Detected: BeagleBoard Version 1.0Download ISO

DigitalWrite

/// The function can run on both the Beaglebone and Beaglebone Black. (JASON PLEASE CONFIRM)
// This function sets the binary logic for the GPIO pins on the Beaglebone. The pin values can be //dynamically set to DGND or 3.3V with the usage of this function.

Syntax


digitalWrite(ledPin_#, HIGH_or_LOW);

edPin_#: A user defined GPIO pin on the beaglebone on the P8 or P9 header. Note, that the P9_15 GPIO line is a pin used in debugging and should be avoided for GPIO use when using bonescript

HIGH_or_LOW: The user should user either the macro ‘HIGH’ or ‘LOW’, which correlates to ‘1’ or ‘0’. Setting a GPIO pin as ‘HIGH’ will set the output voltage to be 3.3V. Setting the pin ‘LOW’ will set the voltage to DGND or ~0V.

Code Example

//This example is to toggle both an on board as well as external LED every ~1 second. The onboard LED //is located next to the Ethernet port and the reset button. The hardware setup required is a standard LED //and a ~100 Ohm resistor. The anode of the LED should be connected to pin 23, on the P9 header. The cathode should be connected in series with resistor, which is connected to DGND.

Connected

Circuit Diagram

/**NEED FRITZING PART UPDATED** Connected

Schematic Diagram

/**NEED FRITZING PART UPDATED** Connected