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

Initial setup

If you've never turned on your BeagleBone Black, there will be a bit of initial setup required. You should follow the most up-to-date official instructions found at http://beagleboard.org/getting-started, but to summarize, here are the steps:

  1. Install the network-over-USB drivers for your PC's operating system.
  2. Plug in the USB cable between your PC and BeagleBone Black.
  3. Open Chrome or Firefox and navigate to http://192.168.7.2 (Internet Explorer is not fully supported and might not work properly).

If all goes well, you should see a message on the web page served up by the BeagleBone indicating that it has successfully connected to the USB network:

If you scroll down a little, you'll see a runnable Bonescript example, as in the following screenshot:

If you press the run button you should see the four LEDs next to the Ethernet connector on your BeagleBone light up for 2 seconds and then return to their normal function of indicating system and network activity. What's happening here is the Javascript running in your browser is using the Socket.IO (http://socket.io) library to issue remote procedure calls to the Node.js server that's serving up the web page. The server then calls the Bonescript API (http://beagleboard.org/Support/BoneScript), which controls the GPIO pins connected to the LEDs. This book won't be covering Bonescript, but this example is the quickest way to control some external hardware, so it's a great place to start.

主站蜘蛛池模板: 合川市| 夏邑县| 广东省| 开平市| 江安县| 六枝特区| 高密市| 堆龙德庆县| 鱼台县| 和静县| 湾仔区| 错那县| 赤水市| 肇庆市| 福清市| 保德县| 彝良县| 天全县| 长葛市| 大宁县| 永川市| 华亭县| 建瓯市| 武胜县| 尤溪县| 舟山市| 元江| 克什克腾旗| 兴城市| 定远县| 卓资县| 阿勒泰市| 全椒县| 高唐县| 龙岩市| 古丈县| 尚志市| 大姚县| 朝阳市| 涟源市| 周口市|