You are previewing The SparkFun Guide to Processing.
O'Reilly logo
The SparkFun Guide to Processing

Book Description

The SparkFun Guide to Processing is a hands-on introduction to Processing for non-coders.

Table of Contents

  1. Cover Page
  2. Title page
  3. Copyright page
  4. Dedication
  5. Contents in Detail
  6. Foreword by Nathan Seidle
  7. Introduction
    1. Why Start Making with Processing?
    2. Who This Book is For
    3. A Note to Teachers
    4. What’s in This Book
    5. The Processing Community
    6. Online Resources
  8. Project 0: Getting Started with Processing
    1. About Processing
      1. A Programming Language
      2. A Tool for Art and Design
      3. An Open Source Project
    2. Installing Processing
    3. The IDE
      1. A Quick Tour
      2. The Preferences Window
    4. Hello World
    5. Anatomy of a Sketch
      1. A Two-Part Recipe
      2. Syntax
      3. Data Types
    6. Cartesian Coordinate Plane
  9. Project 1: Pixel Art
    1. Gather Your Materials
    2. Drafting Your Pixel Art
    3. Translating Your Sketch into Code
    4. Adding Color
    5. Order Matters
    6. Removing or Modifying Your Outlines
    7. Scaling Your Sketch to Epic Proportions
    8. Taking It Further
  10. Project 2: Holiday Card
    1. Gather Your Materials
    2. Drawing More Shapes!
      1. Ellipses
      2. Lines
      3. Quadrilaterals
      4. Triangles
    3. Programming a Digital Collage
      1. Setting the Stage
      2. Gluing Down the Pieces
    4. Printing to the Console
    5. Taking It Further
  11. Project 3: A First Dynamic Sketch
    1. More on Variables
      1. Anatomy of a Variable
      2. Where to Use a Variable
    2. Math in Processing
    3. Logic
      1. Inside if() Statements
      2. A Refresher on Relational Operators
      3. Logical Operators
    4. Following the Bouncing Ball
      1. Moving in One Direction
      2. Creating Walls
    5. Trails of Color and Multiple Variables
      1. Reusing Code
      2. Manipulating Individual Shapes
    6. Taking It Further
  12. Project 4: Interactive Time-Based Art
    1. Built-In Values
      1. Finding the Mouse and Keypresses
      2. Telling Time
      3. Putting Built-In Values into Action
    2. Extending your Range
    3. Transformation Functions
    4. An Abstract Clock
      1. Comparing the Major Time Functions
      2. Spicing It up!
    5. Sharing Your Project!
    6. Taking It Further
  13. Project 5: Enter the Matrix
    1. What is a Matrix?
    2. Thinking with Matrices
      1. Translation Revisited
      2. Rotation Revisited
      3. Scaling Revisited
    3. Hacking Your Previous Projects
    4. Taking It Further
  14. Project 6: Image Processing with a Collage
    1. Finding an Image to Use
    2. The PImage Data Type
    3. Using Your Image in a Sketch
      1. Image Modes
      2. Transformation
    4. A Photo Collage
      1. Multiple Images
      2. Returning to the Matrix
      3. Scattered Photos
    5. Applying Tints
    6. Filter Basics
    7. Processing Objects
    8. Taking It Further
  15. Project 7: Playing with Text
    1. The String Data Type
    2. Basic Text Functions
    3. Text Modifiers
    4. Fonts
      1. Creating a Font
      2. Loading a Font
    5. A Simplified Typewriter
      1. Fetching Letter Keys
      2. Useful Delays
    6. A Data Dashboard
      1. Fetching Statistics and Setting Up
      2. Indicating Mouse Quadrant
      3. Showing Time and Mouse Coordinates
    7. Taking It Further
  16. Project 8: Two Drawing Programs
    1. More Mouse Variables
    2. Event Functions
    3. Rainbow Doodles
      1. Implementing Mousedragged ()
      2. Implementing Mousepressed ()
    4. A Simple Painting Program
      1. Creating a Color-Changing Feedback Box
      2. Changing the Pen Color
    5. Taking It Further
  17. Project 9: A Maze Game
    1. Gather Your Materials
    2. More Ways to Read Input
      1. Working with ASCII and Keycode
      2. Driving Shapes
    3. Building the Maze Game
      1. Generating a Maze
      2. Writing the Sketch
      3. Detecting Wall Touches with get()
      4. Adding the Victory Condition
    4. Adding a Makey Makey Controller
      1. Meeting the Makey Makey
      2. Building a Controller
      3. Connecting the Makey Makey to Your Computer
    5. Taking It Further
  18. Project 10: Manipulating Movies and Capturing Video
    1. What is a Library?
      1. Adding Libraries to Processing
      2. Using Libraries in Your Sketch
      3. Calling Library Functions
    2. Adding Your Own Videos to a Sketch
    3. Applying Tints and Filters
    4. Introducing for() Loops and Arrays
    5. Capturing Video
      1. Modifying the Setup() Function
      2. Displaying Live Capture
    6. Creating a Photo Booth
      1. Adding the Setup() Function
      2. Creating the draw() Loop
    7. Taking It Further
  19. Project 11: Audio Processing with Minim
    1. Gather Your Materials
    2. Introducing the Minim Library
    3. Creating a Single-Song Audio Player
    4. Introducing Minim’s Audiosample Class
    5. Improving Your Audio Player with Metadata
    6. Visualizing Sound
      1. Setting Up Audio Input
      2. Drawing Sound
    7. Recording Audio to Create a Soundboard
      1. Creating the Class Objects
      2. Writing the setup() and draw() Functions
      3. Recording and Playing Samples in an Event Function
    8. Taking It Further
  20. Project 12: Building a Weather Dashboard with JSON Data
    1. What Does JSON Data Look Like?
    2. Arrays of JSON Objects
    3. Getting Weather Data in JSON
    4. Using JSON Data in Processing
    5. Writing a Custom Data Parsing Function
      1. Starting a New Function Tab
      2. Listing Data Variables
      3. Writing a Basic Custom Function in update_data
      4. Parsing Your Weather Data in a Custom Function
    6. Drawing the Weather Dashboard in the Main Tab
    7. Pulling a Weather Icon from the Web
    8. Taking It Further
  21. Project 13: Using Sensors with Processing and Arduino
    1. Gather Your Materials
    2. What is a Microcontroller?
    3. What is Arduino?
    4. The Sparkfun Digital Sandbox
    5. Installing the Arduino Software
      1. Installing Arduino and Drivers on Windows
      2. Installing Arduino and FTDI Drivers on OS X
      3. Installing Arduino on Ubuntu Linux
    6. Introducing the Arduino IDE
    7. Selecting Your Board and Choosing a Port
    8. An Arduino Hello World
      1. Exploring an Arduino Sketch
      2. Writing the setup() Function
      3. Writing the loop() Function
    9. Analog Versus Digital
    10. Reading Versus Writing Data
    11. Reading Data from Sensors
    12. Creating the Sensor Data Dashboard in Processing
      1. Importing Libraries and Creating Variables
      2. Preparing Processing for Serial Communication
      3. Fetching Your Serial Data
      4. Testing the Serial Connection
      5. Visualizing Your Sensor Data
    13. Logging Sensor Data with Processing
    14. Taking It Further
      1. Sending Data from Processing to Arduino
      2. Receiving Processing Data on an Arduino
  22. Index
  23. About the Sparkfun Guide Series
  24. Coming Soon
  25. Updates