warning: Creating default object from empty value in /home/dr_rick/onearmedman.com/modules/taxonomy/taxonomy.pages.inc on line 33.

physical computing

Other Cool Stuff

  • Math
    • max, min, contrain, randomSeed, random
  • Time
    • delay
      • important for adding pauses

Tutorial 1: Data and Serial

Arduino Hooked UpArduino Hooked UpNow we'll run the knight_rider_1 tutorial. Open up the files in the zip archive. All you need for this is to plug in the Arduino to your computer.

Once the board is plugged in, hit reset on the board, then click the Upload to I/O icon on the Arduino interface. Once that's done, click the Serial Monitor icon to see the numbers move up and down. Now you're talking (to the Arduino!)

Arduino Hooked Up

Arduino Hooked Up

Digital Read/Write

  • pinMode
    • takes the pin to be determined
    • takes the mode -> in or out
    • MUST do this for most pins. Forgetting this will get you in trouble

Control structures

  • if/else
    • simple branching
  • switch case
    • more complicate branching
    • for multiple cases

Data Types

  • numbers
    • byte 0 - 255
      • space saving! use this when possible!
    • int
      • handy for negative numbers and most other uses bigger than a byte

Intro

  • Voltage and Logic
  • Digital "Voltage"
    • LOW is 0V
    • HIGH is 5V

Arduino Coding Session

Today, we will run through the basics of Arduino programming. To follow along, please go to the reference section of the Arduino site and step through the functions as we go.

Also, download the files below. They are the Arduino code examples we'll follow once we start making real circuits.

YouTube, Your One Stop Shop For Bathroom Hacks

It's good to see that I have company. Here's my bathroom hack from fall of 2006, where I added audio triggered by the IR sensor on the 10th floor sink:

The best part was that I left a "record" button on the device underneath, so people could sample their own voices, music, sounds, whatever. Hence, audio graffiti.

Spy in the Lab

During the winter break of 2006-2007, Chris Hennelly and I spent a bunch of free time working on the Spy in the Lab project. The Spy was supposed to go to our friends at Tsinghua University and peek in on all the stuff they were doing. It didn't quite make it for that semester, but we got it working pretty close to 100% by the time we were done with break.

It was sitting in the 10 Years Running Show at the Chelsea Art Museum.

What's in the box?!: Inside this unassuming cardboard box sits an Internet-controlled robot with a camera and a range of sensors that keep it from destroying itself and those around it.What's in the box?!: Inside this unassuming cardboard box sits an Internet-controlled robot with a camera and a range of sensors that keep it from destroying itself and those around it.

The Command CenterThe Command Center

Copyright Mike Edwards 2006-2009. All content available under the Creative Commons Attribution ShareAlike license, unless otherwise noted.

Syndicate content