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

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.

主站蜘蛛池模板: 普安县| 玉树县| 昌图县| 四会市| 余庆县| 昌乐县| 台东县| 清新县| 万荣县| 巴南区| 阜新| 贵南县| 诸城市| 峨山| 漳浦县| 日照市| 辽阳市| 夏邑县| 凤翔县| 商河县| 卓尼县| 达拉特旗| 吴忠市| 辽阳县| 平武县| 西乌珠穆沁旗| 黑山县| 南阳市| 平湖市| 曲阜市| 库尔勒市| 罗山县| 乳山市| 丁青县| 临漳县| 伽师县| 阜城县| 德惠市| 山西省| 普洱| 伊川县|