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

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.

主站蜘蛛池模板: 蛟河市| 阿坝县| 怀宁县| 广水市| 柞水县| 邵阳市| 潼关县| 息烽县| 湖南省| 江都市| 崇礼县| 祁连县| 新丰县| 龙江县| 昌平区| 墨竹工卡县| 本溪| 苗栗市| 铁力市| 雷山县| 罗平县| 南靖县| 奇台县| 明水县| 布拖县| 鲁山县| 长沙市| 洪泽县| 辽阳市| 巫山县| 玛曲县| 双辽市| 时尚| 塘沽区| 昔阳县| 重庆市| 玉溪市| 竹山县| 民权县| 晋江市| 额敏县|