In the previous chapter, we learned about the Cloud9 IDE that comes preinstalled on the BeagleBone standard Debian distribution. It also comes with the preinstalled BoneScript library. This library provides you functions to communicate with various electronic components that can be connected to BeagleBone. These components can be LEDs, buttons, buzzers, various sensors, motors, and others. Connecting external components to BeagleBone needs some manual work such as attaching jumper wires, soldering, or using breadboard. This can be tedious for a new user. Fortunately, BeagleBone comes with four onboard LEDs. We can directly program them without doing any manual connection. In this chapter, we will blink onboard LEDs by our program using BoneScript functions.
The following topics will be covered in this chapter:
Digital I/O
Digital I/O functions –
pinMode()
anddigitalWrite()
Program to turn onboard LED ON and OFF
Quick program to blink onboard LED
Make our program...