Objective

Visualize physical state data in Pure Data, transmitted from an Arduino using the USB serial bus.

Please review the notes for 1.c.ii.1 as all of them apply to this exercise as well. This exercise assumes you have an Arduino programmed with the OneInOneOutASCII sketch to communicate physical data to and from an Arduino.

The Pd patch is available in the same materials folder as this file. Note that there are two .pd patch files; the Arduino interface has been moved into an abstraction named Arduino-server.pd. This is a reusable patch which hides the details of the Arduino interface; this is the primary means in Pd for building modular systems with reusable parts.

For now, the Arduino abstraction is included with the exercise, but in general re-usable patches should be placed in a library folder included on the Pd load path.

Steps and observations

  1. Open the 1.c.ii.2_SensorToGui.pd patch in Pd-extended.
  2. You should see a window named 'GEM' open up. This is a graphical canvas which can be used to create 2D and 3D graphics.
  3. Open the connection to the Arduino using one of the serial port name message objects.
  4. After it starts, you should see time and analog values appear in the patch. The GEM window should show some change in intensity proportional to the input.
  5. Attach an analog sensor to A0 as illustrated and see the change in display.
  6. Review the GEM help and try modifying the graphical output in some way.

Comments

For a challenge, try creating a 3D display.