Author Archives: Scott

Draw a line based on a color in a video

 

Swap out a color with another one in a video

 

I’ve got no strings

Wireless communication is pretty rad. At the end of the day though, it’s all about radios that act as modems. A modem is a device that takes digital information (like serial communication) modulates these signals for transmission, the demodulates them on the other end to feats on the gooey insides of the signal.

We have a number of options for wireless communication, we’ll start easy, and move our down the ladder of difficulty.

  • Bluetooth : a pretty simple protocol that can be used to transmit data like sensor information, but also more complex signals like audio. The modems used with the Arduino are pretty simple and just create a serial connection between the computer and the microcontroller
  • Xbee : slightly more complex. Modems need to be configured to communicate with each other.
    • configure serially
      • easiest with a usb-serial adapter
      • CoolTerm is great for talking with the modems (key emulation to CR)
      • Put into command mode with “+++”
      • ATID (PAN ID number)
      • ATMY (self ID)
      • ATDH (destination high)
      • ATDL (destination low)
      • ATWR (saves)
      • Xbee shield needs to be on USB switch
  • GSM (similar to WiFi & Ethernet, but much cooler)

Putting it all together

Code from class, circuit schematics, etc. are at the bottom

Let’s get the chocolate in the peanut butter

Continue reading

Images

Download this folder

  • loadPixels()
  • updatePixels()
  • pixels[]
  •  PImage
    • loadImage()
    • can be local or remote
    • image()
  • tint()
    • opacity, etc.
  • Video
    • Capture class

  • Movie class


  •  

moving on up

  • objects
    • class
    • constructor
    • (new tabs!)
  • arrays
    • arrays plus for loops

 

 

code from class

 

 

Animation

code from class

Primitive Drawing

Processing :: Setup//draw (just like loop())

  • size
  • width and height
  • background
  • coordinate system
  • line
  • point
  • ellipse (ellipseMode)
  • stroke/nostroke/fill/nofill
  • rect (rectMode)
  • mouseX mouseY

code from class

Some notes on your RGB LEDs

So we didn’t get the chance to do color mixing with the LEDs, but I hope you all try it out. Here’s some notes on them….

Continue reading

Tricking the machines

So far, we’ve managed to get the micro controller to read digital & analog inputs, ad set a variety of fancy LED effects. Now it’s time to make some even more fancy things happen.

The microcontroller has the ability to red variable voltages, but what about sending out a variable voltage? Unfortunately, unless we’re using a high end microcontroller with a built in DAC (digital to analog converter), there’s no way to get a true analog voltage out of the microcontroller. However, we can fake it with a technique called Pulse Width Modification (PWM).

Continue reading