BeagleBone Functions
Type in your IP address here:
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.
Circuit Diagram
/**NEED FRITZING PART UPDATED**
Schematic Diagram
/**NEED FRITZING PART UPDATED**
