O'Reilly logo

Programming the BeagleBone by Yogesh Chavan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Digital I/O functions - pinMode() and digitalWrite()

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required