Preface |
|
vii | |
|
|
1 | (42) |
|
|
1 | (1) |
|
|
1 | (9) |
|
1.2 Getting Started, Out of the Box |
|
|
10 | (7) |
|
1.3 Verifying You Have the Latest Version of the OS on Your Bone |
|
|
17 | (1) |
|
1.4 Running the BoneScript API Tutorials |
|
|
18 | (3) |
|
|
21 | (4) |
|
1.6 Editing Code Using the Cloud9 IDE |
|
|
25 | (2) |
|
1.7 Running JavaScript Applications from the Cloud9 IDE |
|
|
27 | (2) |
|
1.8 Running Applications Automatically |
|
|
29 | (1) |
|
1.9 Finding the Latest Version of the OS for Your Bone |
|
|
30 | (3) |
|
1.10 Running the Latest Version of the OS on Your Bone |
|
|
33 | (5) |
|
1.11 Updating the OS on Your Bone |
|
|
38 | (1) |
|
1.12 Backing Up the Onboard Flash |
|
|
39 | (2) |
|
1.13 Updating the Onboard Flash |
|
|
41 | (2) |
|
|
43 | (46) |
|
|
43 | (2) |
|
2.1 Choosing a Method to Connect Your Sensor |
|
|
45 | (1) |
|
2.2 Input and Run a JavaScript Application for Talking to Sensors |
|
|
46 | (4) |
|
2.3 Reading the Status of a Pushbutton or Magnetic Switch (Passive On/Off Sensor) |
|
|
50 | (5) |
|
2.4 Reading a Position, Light, or Force Sensor (Variable Resistance Sensor) |
|
|
55 | (4) |
|
2.5 Reading a Distance Sensor (Analog or Variable Voltage Sensor) |
|
|
59 | (2) |
|
2.6 Reading a Distance Sensor (Variable Pulse Width Sensor) |
|
|
61 | (4) |
|
2.7 Accurately Reading the Position of a Motor or Dial |
|
|
65 | (6) |
|
2.8 Acquiring Data by Using a Smart Sensor over a Serial Connection |
|
|
71 | (3) |
|
2.9 Measuring a Temperature |
|
|
74 | (4) |
|
2.10 Reading Temperature via a Dallas 1-Wire Device |
|
|
78 | (3) |
|
2.11 Sensing All Sorts of Things with SensorTag via Bluetooth v4.0 |
|
|
81 | (5) |
|
2.12 Playing and Recording Audio |
|
|
86 | (3) |
|
3 Displays and Other Outputs |
|
|
89 | (20) |
|
|
89 | (1) |
|
3.1 Toggling an Onboard LED |
|
|
90 | (2) |
|
3.2 Toggling an External LED |
|
|
92 | (2) |
|
3.3 Toggling a High-Voltage External Device |
|
|
94 | (1) |
|
3.4 Fading an External LED |
|
|
95 | (2) |
|
3.5 Writing to an LED Matrix |
|
|
97 | (4) |
|
|
101 | (1) |
|
3.7 Writing to a NeoPixel LED String |
|
|
102 | (2) |
|
3.8 Using a Nokia 5510 LCD Display |
|
|
104 | (2) |
|
3.9 Making Your Bone Speak |
|
|
106 | (3) |
|
|
109 | (20) |
|
|
109 | (1) |
|
4.1 Controlling a Servo Motor |
|
|
110 | (4) |
|
4.2 Controlling the Speed of a DC Motor |
|
|
114 | (3) |
|
4.3 Controlling the Speed and Direction of a DC Motor |
|
|
117 | (5) |
|
4.4 Driving a Bipolar Stepper Motor |
|
|
122 | (4) |
|
4.5 Driving a Unipolar Stepper Motor |
|
|
126 | (3) |
|
|
129 | (52) |
|
|
129 | (1) |
|
5.1 Running Your Bone Standalone |
|
|
129 | (3) |
|
5.2 Selecting an OS for Your Development Host Computer |
|
|
132 | (1) |
|
5.3 Getting to the Command Shell via SSH |
|
|
133 | (2) |
|
5.4 Getting to the Command Shell via the Virtual Serial Port |
|
|
135 | (2) |
|
5.5 Viewing and Debugging the Kernel and u-boot Messages at Boot Time |
|
|
137 | (5) |
|
5.6 Verifying You Have the Latest Version of the OS on Your Bone from the Shell |
|
|
142 | (1) |
|
5.7 Controlling the Bone Remotely with VNC |
|
|
143 | (4) |
|
5.8 Learning Typical GNU/Linux Commands |
|
|
147 | (2) |
|
5.9 Editing a Text File from the GNU/Linux Command Shell |
|
|
149 | (1) |
|
5.10 Using a Graphical Editor |
|
|
150 | (1) |
|
5.11 Establishing an Ethernet-Based Internet Connection |
|
|
151 | (3) |
|
5.12 Establishing a WiFi-Based Internet Connection |
|
|
154 | (6) |
|
5.13 Sharing the Host's Internet Connection over USB |
|
|
160 | (4) |
|
5.14 Setting Up a Firewall |
|
|
164 | (1) |
|
5.15 Installing Additional Packages from the Debian Package Feed |
|
|
165 | (2) |
|
5.16 Removing Packages Installed with apt-get |
|
|
167 | (1) |
|
5.17 Copying Files Between the Onboard Flash and the MicroSD Card |
|
|
168 | (1) |
|
5.18 Freeing Space on the Onboard Flash or MicroSD Card |
|
|
169 | (4) |
|
5.19 Installing Additional Node.js Packages |
|
|
173 | (2) |
|
5.20 Using Python to Interact with the Physical World |
|
|
175 | (1) |
|
5.21 Using C to Interact with the Physical World |
|
|
176 | (5) |
|
|
181 | (46) |
|
|
181 | (1) |
|
6.1 Accessing Your Host Computer's Files on the Bone |
|
|
181 | (1) |
|
6.2 Serving Web Pages from the Bone |
|
|
182 | (2) |
|
6.3 Interacting with the Bone via a Web Browser |
|
|
184 | (2) |
|
6.4 Displaying GPIO Status in a Web Browser |
|
|
186 | (3) |
|
6.5 Continuously Displaying the GPIO Value via jsfiddle |
|
|
189 | (4) |
|
6.6 Continuously Displaying the GPIO Value |
|
|
193 | (2) |
|
|
195 | (4) |
|
|
199 | (2) |
|
6.9 Sending an SMS Message |
|
|
201 | (1) |
|
6.10 Displaying the Current Weather Conditions |
|
|
202 | (2) |
|
6.11 Sending and Receiving Tweets |
|
|
204 | (3) |
|
6.12 Wiring the IoT with Node-RED |
|
|
207 | (10) |
|
6.13 Serving Web Pages from the Bone by Using Apache |
|
|
217 | (4) |
|
6.14 Communicating over a Serial Connection to an Arduino or LaunchPad |
|
|
221 | (6) |
|
|
227 | (18) |
|
|
227 | (1) |
|
|
227 | (2) |
|
7.2 Building and Installing Kernel Modules |
|
|
229 | (2) |
|
7.3 Controlling LEDs by Using SYSFS Entries |
|
|
231 | (2) |
|
7.4 Controlling GPIOs by Using SYSFS Entries |
|
|
233 | (3) |
|
|
236 | (2) |
|
7.6 Using the Installed Cross Compiler |
|
|
238 | (3) |
|
|
241 | (2) |
|
7.8 Creating Your Own Patch File |
|
|
243 | (2) |
|
|
245 | (24) |
|
|
245 | (1) |
|
|
246 | (2) |
|
8.2 I/O with C and libsoc |
|
|
248 | (3) |
|
|
251 | (2) |
|
8.4 I/O with C and mmap() |
|
|
253 | (4) |
|
8.5 Modifying the Linux Kernel to Use Xenomai |
|
|
257 | (4) |
|
|
261 | (8) |
|
|
269 | (46) |
|
|
269 | (1) |
|
9.1 Using a Seven-Inch LCD Cape |
|
|
269 | (2) |
|
9.2 Using a 128 x 128-Pixel LCD Cape |
|
|
271 | (4) |
|
9.3 Connecting Multiple Capes |
|
|
275 | (5) |
|
9.4 Moving from a Breadboard to a Protoboard |
|
|
280 | (1) |
|
9.5 Creating a Prototype Schematic |
|
|
281 | (4) |
|
9.6 Verifying Your Cape Design |
|
|
285 | (6) |
|
9.7 Laying Out Your Cape PCB |
|
|
291 | (11) |
|
9.8 Migrating a Fritzing Schematic to Another Tool |
|
|
302 | (3) |
|
9.9 Producing a Prototype |
|
|
305 | (5) |
|
9.10 Creating Contents for Your Cape Configuration EEPROM |
|
|
310 | (1) |
|
9.11 Putting Your Cape Design into Production |
|
|
310 | (5) |
A Parts and Suppliers |
|
315 | (6) |
Index |
|
321 | |