Posts tagged: processing

My talk at Art.on.Wires

By admin, June 11, 2011 12:14 pm

At the Art.on.Wires Festival in May I talked about three recent projects: spacehoppers, my visualization of the Londons bicycle hire system, and NetChimes. I discussed some of the technical details about how these projects were realised and reflected upon the process of building those interactions. I aso demoed the NetChimes audio feed with participants in the audience tuning in, during the talk. Art.on.Wires had a really good feel this year, very cozy, with lots of people learning, hacking, chatting and making things happen. There were several live performances involving collaboration with off-site musicians and dancers, with live feeds streaming in from around the world. My friend Jason Geistweidt had a preview of work he has been doing in the process of creating the World Opera, involving dancers from southern California and dancers in Oslo interacting via life-size video projections and audio. Nice stuff.

Video of my talk is below, but note the title is “Connecting the Physical and the Digital” and not “Of Bits and Bikes” which I presented in London at sameAs.

Testing the Boris Bike-o-meter

By admin, January 16, 2011 10:50 pm

I’ve been working on the physical side of my ambient display for a Barclay’s Cycle Scheme docking station on Theobald’s road – one that I use pretty often. The challenge for this display is that it uses a motor and drive assembly harvested from an obsolete HP printer. Properly, anything requiring precise positioning should use a stepper motor, but that’s not what I found inside the printer. It uses a simple cheapie induction motor. So, I’m considering it a design challenge/constraint.

There was a plastic optical calibration strip somewhere in the assembly but that’s long gone. So precise positioning will be rudimentary, as the vagaries of induction drive do not always yield reliable results. My tradeoff for the display is to zero-out the motor for every display cycle instead of skipping directly from one number to the next. Each number will have its own drive time and the motor supply is regulated to keep it as constant as possible to minimise the likelihood that the motor will be slower or faster depending on supply voltage.

This test is just to make sure the drive times for digits and the serial communication are all working properly. Next steps are connecting it to the web API and making it look pretty!

Completing the tooth of Blueness

By admin, June 28, 2008 12:48 am

The tracking turtle is almost complete. I’ve added the bluetooth arduino board (Arduino BT), though with a bit of trouble getting it to communicate with Processing via firmata. Serial port keeps getting “clogged up”. However, the sensor wheels and IR slot sensor are working as planned.

Resistors for the IR emitter+sensor combo are visible in the undercarriage.

How to Use a WiiMote in a Processing Sketch

By admin, May 15, 2008 2:09 pm

There has been a lot of development to reverse engineer the Wiimote so you can use it in new and interesting ways (see Johnny Lee’s stuff, for example). However, most artists and designers probably aren’t really familiar with programming in C#. Luckily, you can use the Wiimote in Processing, so you can get up and running pretty quickly, and start creating interactive sketches. There are a lot of steps involved, so I thought a short summary would be useful. It is geared for people using an Intel Mac (MacBook or MacBookPro), because that’s what I have.

You need several pieces of software for this to work correctly, ideally the latest versions. Download these to your desktop or a working folder, and unzip the archives:

  1. Processing. Ideally, this should already be installed and running on your system. See the Processing website for details.
  2. WiiRemoteJ. This is a Java library written by Michael Diamond (aka Cha0s), that listens to the Bluetooth port on your Mac and can format the Wiimote information for Java, which is what Processing is written in. Click on the downloads link, and then select a file called something like: “WiiRemoteJ v1.3.zip.gz”.
  3. Bluecove. This is a bit of software that implements something called the JSR082 API. It provides a way for Java programs to access the Bluetooth hardware on your system. You want the file called something like: “bluecove-2.0.2.jar”.
  4. Wrj4p5. This a library that converts the WiiRemoteJ information to somthing easy to work with in Processing. Follow this link and click on the wr4jp5 package, then select the zip file that is the latest release, like something listed under: alpha_004).
  5. A demo Processing sketch to see if it all works (originally written by Classiclll).

Once you’ve downloaded all of that stuff and have unzipped it, do the following steps:

  1. First, you need to set up WiiRemoteJ and bluecove to work with Java on your computer. So, open up the following directory on your computer: YourHardDrive/System/Library/Java/Extensions
  2. Copy the following files into this directory:
    • WiiRemoteJ.jar (from the WiiRemoteJ files you unzipped above)
    • bluecove-2.0.2.jar (from the bluecove files you unzipped above)
  3. Now, in your main Processing folder (located in Applications/Processing/libraries), you need to create a folder called wrj4P5.
  4. In the new wrj4P5 folder, create a new folder called Library.
  5. Now copy the following files into Library:
    • WiiRemoteJ.jar (from the WiiRemoteJ files you unzipped above)
    • bluecove-2.0.2.jar (from the bluecove files you unzipped above)
    • wrj4P5.jar (from the wrj4P5 files you unzipped above)
  6. Finally, open a new sketch in Processing and cut and paste the demo code into it.
  7. When you run this new code, it should run without generating any error messages in red. If you get those, doublecheck the steps above. Hopefully, your sketch should look like this picture:
    Demo Wii Code
  8. Here’s where it gets tricky. Your system is now waiting to hear from the Wiimote. You should wait 4 or 5 seconds and simultanously press Buttons 1 and 2 on your Wiimote. This tells the Wiimote to look for something to connect to.
  9. If everything is going well, the bluecove software will detect this signal and you should receive a message like: Discover called # 0. The box will start to wiggle if you move the wiimote and the display area will show any keys you press.
  10. Always shut down gracefully by turning off the Wiimote (press power button) and then closing your sketch. You’ll get the message: “Remote disconnected… Please Wii again.
  11. Then close your sketch window and you will get a confirmation: “BlueCove stack shutdown completed”

Troubleshooting:

Pairing the Wiimote with Processing is pretty flaky. It’s often inconsistent and you may have to try several times to get it to work. Sometimes, it’s helpful to shut off the power to the Wii and restart your sketch. Always wait a few moments after your sketch starts so that the bluetooth communications can fire up and get ready to hear from the Wii. These problems will probably be ironed out as the various bits of software are improved. Time will tell. In the meantime, have fun trying it out and be sure to look at the Processing website discussion board for code samples.

Panorama Theme by Themocracy