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

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
主站蜘蛛池模板: 昌都县| 深州市| 运城市| 永康市| 奎屯市| 黎平县| 嘉荫县| 丹凤县| 义乌市| 平谷区| 垦利县| 崇左市| 扎鲁特旗| 西峡县| 衡水市| 苍南县| 合山市| 晴隆县| 泽州县| 建宁县| 吴川市| 阳西县| 堆龙德庆县| 万年县| 清原| 饶阳县| 宝坻区| 郯城县| 开封县| 濉溪县| 南昌市| 闽侯县| 肇州县| 满洲里市| 宁安市| 兴海县| 建始县| 兴城市| 富宁县| 夹江县| 山西省|