Class 10 – Physical Interfaces

Topics

  • Graphical interface in Pd
  • Physical interface in Arduino
  • Final assignment briefing

Workshop

  • 3D graphics in Pd
  • Translate, rotate, color
  • Animation in Pd
  • Image and video in Pd
  • Keyboard and mouse interaction

Resources

Create a GEM graphics window

Draw a cube with outline

Counter object

Metro object (animation)

Auto-rotation patch

Communication port

Arduino patch for switch

int SW = 8;

void setup()
{
  pinMode(SW, INPUT);
  Serial.begin(9600);
}

void loop()
{
  byte value = digitalRead(SW);
  Serial.write(1-value);
  delay(50);
 }

Physical switch interface

GEM display window

Analog input patch

GEM window output

Potentiometer code

int POT = 5;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  int value1 = analogRead(POT);
  byte value2 = map(value1, 0, 1023, 0, 255);
  Serial.write(value2);
  delay(50);
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: