Rotating Projection Mapping Experiment

October 26th, 2013

Recently, I found a very good walkthrough of how to sync a projection over a rotating object. All I needed was an Arduino, Big Easy Motor Driver, a Stepper motor and a projector.

If you want to play around, here are the original sources: https://github.com/YCAMInterlab/ProCamToolkit/wiki/mapamok-with-Arduino-walkthrough

Note: I needed to change the code for the Arduino sketch to compensate for the 16 microsteps that the Big Easy Driver support, here is the important part:

void loop() { 

  scmd.readSerial();
  
  if(speed < 0.0001) return;
  
  digitalWrite(DIR_PIN, HIGH);
  
  float deg = 0.9;
  int steps = abs(deg)*(1.0/0.1125);
  float usDelay = (1/speed) * 70;
  
  for(int i=0; i < steps; i++){
    digitalWrite(STEP_PIN, HIGH);
    delayMicroseconds(usDelay); 
    
    digitalWrite(STEP_PIN, LOW);
    delayMicroseconds(usDelay);
    
    rotation += 0.1125;
  }
}

Here is the result, next step – 3d printing my own object and trying to sync a second projector.

photo

Leave a Reply

Your email address will not be published. Required fields are marked *