官术网_书友最值得收藏!

Chapter 2. Blinking Onboard LEDs

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() and digitalWrite()
  • Program to turn onboard LED ON and OFF
  • Quick program to blink onboard LED
  • Make our program better
  • Dancing LEDs
  • Dancing LEDs in both directions
主站蜘蛛池模板: 荆门市| 都匀市| 栖霞市| 永康市| 邯郸县| 涞水县| 文化| 昆山市| 左贡县| 华宁县| 昭平县| 京山县| 和平区| 都江堰市| 安康市| 嘉祥县| 辽宁省| 交城县| 廊坊市| 尖扎县| 金溪县| 天峻县| 平和县| 高要市| 女性| 揭东县| 澎湖县| 南阳市| 达孜县| 承德市| 罗定市| 元谋县| 靖宇县| 东源县| 墨竹工卡县| 临潭县| 靖州| 方山县| 宾阳县| 兴海县| 皮山县|