Digital components can be of an input or output type. A push button is an input type digital component. It does not make sense to write on a push button. LEDs and buzzers are output type digital components. We can program a digital I/O pin on BeagleBone to communicate with both the input and output type of components. However, it has to be specified first whether we are going to use that pin as an input or output pin. Once specified, the pin acts in that direction only. We will learn in detail about this in the next chapter. To blink an LED, we need to specify that we are going to use that pin as the output. Then only we can program it to turn on or off.
Debian on BeagleBone comes with a preinstalled Node.js library called BoneScript. It provides simple Arduino-like functions to interface the BeagleBone hardware. So, it becomes easier to program in BoneScript if there is prior experience in programming Arduino. The Bone101 page that we...