![](https://csdnimg.cn/release/download_crawler_static/9145699/bg10.jpg)
XV • CONTENTS IN DETAIL
Writing a Custom Data Parsing Function ................................... 220
Starting a New Function Tab .............................................. 220
Listing Data Variables ............................................................ 221
Writing a Basic Custom Function in update_data ............ 222
Parsing Your Weather Data in a Custom Function ......... 224
Drawing the Weather Dashboard in the Main Tab .................... 227
Pulling a Weather Icon from the Web ........................................ 229
Taking It Further .............................................................................. 231
Project 13
Using Sensors with Processing and Arduino .......................... 232
Gather Your Materials ..................................................................... 234
What Is a Microcontroller? ........................................................ 234
What Is Arduino? ............................................................................... 235
The SparkFun Digital Sandbox ....................................................... 235
Installing the Arduino Software ................................................ 237
Installing Arduino and Drivers on Windows ................. 237
Installing Arduino and FTDI Drivers on OS X ............... 238
Installing Arduino on Ubuntu Linux ................................. 239
Introducing the Arduino IDE ......................................................... 240
Selecting Your Board and Choosing a Port ............................ 242
An Arduino Hello World ................................................................. 243
Exploring an Arduino Sketch ............................................. 243
Writing the setup() Function ............................................. 243
Writing the loop() Function .............................................. 244
Analog Versus Digital ...................................................................... 246
Reading Versus Writing Data .......................................................... 246
Reading Data from Sensors ........................................................... 247
Creating the Sensor Data Dashboard in Processing ............. 250
Importing Libraries and Creating Variables .................. 250
Preparing Processing for Serial Communication ........ 251
Fetching Your Serial Data ................................................... 252
Testing the Serial Connection ......................................... 254
Visualizing Your Sensor Data ............................................. 256
Logging Sensor Data with Processing ....................................... 259
Taking It Further .............................................................................. 261
Sending Data from Processing to Arduino .................... 261
Receiving Processing Data on an Arduino ..................... 263
INDEX ..................................................................................................... 266
www.it-ebooks.info