Programming for Sculptors

ARTS-A0407 – Digital Sculpture 3 (2cr)

Lecture 5, 23.1.2020


  • Examples
  • A bit about conditional statements and variables
  • Assignment 2

Examples: Kati Hyyppä

Hyyppä's Vimeo channel:

and website:

Examples: Eun Young Park

List of examples by Matti Niinimäki (

Controlling a servo with an Arduino 2

Let's code a program that starts a servo sequence when a button is clicked and stops the sequence on the next click.

#include <Servo.h>

int BUTTON_PIN = 2;
int SERVO_PIN = 9;
Servo myservo;

bool buttonClicked = false;
bool runServo = false;
unsigned int nextServoMovement = 0;

void setup() {

void loop() {
  bool buttonState = digitalRead(BUTTON_PIN);
  if ( buttonState == LOW && buttonClicked == false) {
    Serial.println("Button clicked");
    runServo = !runServo;
    buttonClicked = true;
  } else if (buttonState == HIGH) {
    buttonClicked = false;

  if (runServo) {
    unsigned long now = millis();
    if (now > nextServoMovement) {
      nextServoMovement = now + 500;  

Assignment 2

Poem with movement, project ideas

Animating with movement

Movement as a character

Implement one element of a kinetic sound sculpture

Record motors with a contact mic

Assgnment 2

Let's start working today. Submit your work on Wednesday 29.1. after class. If your work is unfinished we can discuss if you should continue working on it on the final project.


Submission: Record a video, send a link to the video and a short description by email to



Try to find an electronic battery operated device (for example a toy) for the circuit bending/toy hacking workshop on Thursday 30.1.