Fun with Splines

I did these a little while ago in Processing but I love them. It’s just a grid of circles and splines that connect the centers at random. (These are Catmull-Rom splines, to be precise. They’re the same thing that I used for the projections in “Hello World.”) By clicking the arrow keys you can add more circles or more splines. If you want, you can download the Processing .PDE file here.

GSWA 6: Talking to the Cloud

Okay, chapter 6 of Getting Started with Arduino, “Talking to the Cloud,” has been the bane of my arts technology existence. I did most of this chapter about three weeks ago and couldn’t get it to work. The problem is that the book as a whole seems to progress like this:

  • Chapter 1: No real information
  • Chapter 2: A tiny bit of information but no practical work
  • Chapter 3: A tiny bit more information but still no practical work
  • Chapter 4: A tiny bit of practical work
  • Chapter 5: A little bit more practical work
  • Chapter 6 (this chapter): About 1000% more complicated than all the rest of the book put together
  • Chapter 7: A tiny bit of information to wrap things up

It really felt like getting thrown into the deep end. However, I finally got it to work. Here is the chronicle of my adventure:

  • Copy and paste code into Arduino and Processing IDEs (because this one uses both).
  • Get intractable errors in Processing because the code was written for v. 1 and we’re now in v. 2
  • Spend much time searching the web, determine that all of the Java libraries must be installed manually
  • Get the Processing code running (see first photo above) but get such miserably low numbers for output that no light would be detectable
  • Revise Processing code to search for more common terms with the hope to being able to see things (see second photo)
  • With Processing apparently working right, turn to physical components of Arduino
  • Reconstruct the physical circuit because I took it apart after three weeks (having even schlepped it around with me in a box on the bus and train from Salt Lake City to Orem)
  • Plug the Arduino board in to my computer
  • Have the Arduino shut off and get alarming error message from computer (see third photo)
  • Spend much time fiddling with USB connection, pull out brand new, back-up Arduino board, plug it in and see that it works, recreate circuit on new board, get same problems, notice lots of heat on bottom of first board, think that I have destroyed things, fret much
  • Search web for help and learn that there may be a short-circuit (without even really knowing what this would mean)
  • Eventually discover that I put the ground wire on the same positive rail of the breadboard as the power. Oops.
  • Put the ground wire on the negative rail (the way the illustration told me to do it in the first place), board powers up, problem solved.
  • Back to Arduino IDE, compile and upload sketch, have lights blink to indicate successful upload, but see nothing happening with LEDs
  • Mess around with light sensor and the button on the breadboard to no effect
  • Check the serial monitor in Arduino and see a steady stream of strange data that is absolutely not in the right format
  • Read book again, see “important message” about serial port selection
  • Go back to Processing, uncomment code that lists serial port connects and find that my Arduino is connected to port 5 and not the expected port 0
  • Change port in Processing, rerun sketch, and suddenly see much blinking on Arduino board
  • LEDs light up! Button turns them on and off! Success! (See last, triumphant photo above)

Okay, that was not fun but I was convinced that I would never make it work so I feel very, very happy now. And I already finished chapter 7 (although I haven’t yet posted it to this web page because I’m an extremely linear guy), so I’ll post this chapter, post that one, and then try to do a small, creative project (which I have been planning – more or less – for a few weeks), and call it quits. But here we go for now!

Completed:

  • Getting Started with Arduino, 2e, Ch. 6: Talking to the Cloud (1 exercise – but a really, really big one)
  • Sketches (i.e., code) can be downloaded from http://db.tt/f6x9Q4NA

GSWA 4: Really Getting Started with Arduino

Chapter 4 of Getting Started with Arduino is appropriately entitled “Really Getting Started with Arduino,” because this is the first chapter where we actually start hooking up wires and writing code. The goals of this chapter are relatively simple:

  • Hook up an LED to the Arduino
  • Put a pushbutton on the breadboard
  • Connect the wires and write the code so the pushbutton can turn on the LED, first as a momentary switch (i.e., the LED only lights up as long as you hold the button) and then as a toggle switch (i.e., click it once to have the LED turn on and stay on, then click it again to have it turn off and stay off)

Simple concept and an excellent introduction to the entire system. I’m much more accustomed to working with Processing and, while the two are very closely related, they’re not identical and the differences are acutely obvious to me. Still, I’m trying to adapt.  Some of the differences include:

  • Explicitly declaring constants
  • Setting pins as input or output (obviously, this doesn’t happen in the software-only world of Processing)
  • “digitalRead” and “digitalWrite” as functions (again, because this is hardware now)
  • The use of “HIGH” and “LOW” as “ON” and “OFF” (I know the latter work but there is a strong institutional preference for the former)

On the other hand, much of the building and troubleshooting procedure is the same: go one tiny step at a time, when something goes wrong, take a closer look at how the machine is making sense of your code, and working through possible solutions one at a time, perhaps through commenting lines in and out. And save versions of your sketch!

So, the fact that I am now able to turn a small light on and off may not seem like much to most people, but it’s a significant journey from the virtual to the physical world for me. Onward and upward!

Completed:

  • Getting Started with Arduino, 2e, Ch. 4: Really Getting Started with Arduino (5 exercises)
  • Sketches (i.e., code) can be downloaded from http://db.tt/f6x9Q4NA

GSWA 1: Introduction

GSWA_01_ArduinoHomePage

Chapter 1 of Getting Started with Arduino (GSWA) is a very, very brief introduction. Basically, it contains the following:

  • The URLs for Processing (processing.org) and Arduino (arduino.cc).
  • A slightly tautological definition of interaction design: “Interaction Design is the design of any interactive experience.”
  • An explanation of the term “physical computing”: “[Physical computing] involves the design of interactive objects that can communicate with humans using sensors and actuators controlled by a behavior implemented as software running inside a microcontroller (a small computer on a single chip).”

And so, on to chapter 2!

Completed:

  • Getting Started with Arduino, 2e, Ch. 1: Introduction (0 exercises)
  • Sketches (i.e., code) can be downloaded from http://db.tt/f6x9Q4NA

“Hello World” @ RDT Video

Hello World @ RDT

La voilà!  The edited video from our fabulous art/technology creation, “Hello World.” Although I posted on this recently, here’s the basic idea: “Hello World” is a collaboration between my lovely wife, choreographer Jacque Lynn Bell, and me. I did the sound editing/design and created the projected visuals in Processing. The piece was performed by Repertory Dance Theatre (rdtutah.org) at the Rose Wagner Theatre in Salt Lake City, Utah, 4-6 October 2012. The videography and editing were both by Lynne Wimmer (thank you, Lynne!).

[The link below is supposed to load the video automatically – and sometimes it does – but you may need to click on it manually to see the video.]

http://www.youtube.com/watch?v=5lJFRMwEUNQ

“Hello World” Video from RDT (Now with Audio!)

La voilà!  The edited – and now sonified! –  video from our fabulous art/technology creation, “Hello World.” Although I posted on this recently, here’s the basic idea: “Hello World” is a collaboration between my lovely wife, choreographer Jacque Lynn Bell, and me. I did the sound editing/design and created the projected visuals in Processing. The piece was performed by Repertory Dance Theatre (rdtutah.org) at the Rose Wagner Theatre in Salt Lake City, Utah, 4-6 October 2012. The videography and editing were both by Lynne Wimmer (thank you, Lynne!).

Projections R Us

 

Tonight was “dig+it+art,” otherwise known as the Capstone Showing for the Arts Technology Certificate Program at the University of Utah. As I have been participating in this program all year for my sabbatical, I got to show a piece as well. My piece was entitled “Dots and Lines and Dance and All of Us.”

To create it, I recruited a group of dancers (mostly freshman modern dance students at the University of Utah but also my wife, Jacque, who is a professional modern dance choreographer) and had each of them improvise a 10-second sequence that I filmed with a Kinect hooked up to my MacBook and running through Processing. From there, I took the RGB video at 1 FPS and ran it through a nice, blurry B&W filter, placed the 100 resulting images on a grid in random order, and made it possible to connect the images from a dance with a Catmull-Rom spline. (Of course….) I also created videos of the point clouds and skeletons, also at 1 FPS. Each of the three parts – clouds, grid, and skeletons – was projected on a large wall. Lots of fun!