Exercise: Arduino Sensor to Actuator through Pure Data

Objective

Map a physical measurement through Pure Data from an Arduino input to output.

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 patches are available in the same materials folder as this file.

This exercise is almost identical to the previous 1.c.ii.3 exercise, only the mapping is from a sensor to an actuator position, which requires a different numerical mapping.

Steps and observations

  1. Open the sensor-to-actuator.pd patch in Pd-extended.
  2. Open the connection to the Arduino using one of the serial port name message objects.
  3. After it starts, you should see time and analog values appear in the patch.
  4. The console should show the outgoing servo commands.
  5. Attach an analog sensor to A0 and hobby servo to Pin 4 as illustrated and see the change in display.

Comments

A actuator output is more annoying than an LED when driven by noisy data. Can you add filtering to the Pd patch to smooth the output signal?

Other Files

  1. sensor-to-actuator.fzz
  2. sensor-to-actuator.pd
  3. Arduino-server.pd