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

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.

主站蜘蛛池模板: 白朗县| 白朗县| 微山县| 伽师县| 三都| 班玛县| 老河口市| 稻城县| 龙井市| 和田市| 肥西县| 大港区| 治县。| 彭水| 济南市| 若羌县| 陆丰市| 唐河县| 正宁县| 天台县| 临邑县| 尼勒克县| 黑河市| 枣阳市| 墨脱县| 新竹县| 临西县| 新河县| 怀远县| 清远市| 新密市| 惠来县| 固始县| 钦州市| 赣州市| 永新县| 抚顺市| 东辽县| 新巴尔虎右旗| 中方县| 驻马店市|