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

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
主站蜘蛛池模板: 含山县| 武山县| 武宣县| 胶南市| 平昌县| 小金县| 宝鸡市| 贺兰县| 天祝| 泊头市| 额济纳旗| 新津县| 曲靖市| 秦安县| 乃东县| 榆林市| 叙永县| 政和县| 广宁县| 荥阳市| 鄂托克旗| 伽师县| 金乡县| 集安市| 永宁县| 德安县| 额敏县| 昭通市| 西峡县| 东乡族自治县| 祁东县| 衡水市| 玉林市| 永新县| 琼海市| 丰原市| 金坛市| 璧山县| 凤山市| 大安市| 平阳县|