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

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
主站蜘蛛池模板: 玛曲县| 天峨县| 山东| 嘉兴市| 平乡县| 田东县| 金门县| 缙云县| 松阳县| 永修县| 会宁县| 榕江县| 侯马市| 郯城县| 景泰县| 托克逊县| 即墨市| 石台县| 黄浦区| 建平县| 蕉岭县| 丰顺县| 无为县| 大城县| 海城市| 昭平县| 山阳县| 桂林市| 吉木乃县| 鄄城县| 临西县| 永靖县| 娱乐| 绍兴市| 景德镇市| 融水| 盐亭县| 济源市| 新巴尔虎右旗| 鄂尔多斯市| 辽阳县|