Drawing Machine Beta

Work in Progress :

Built of the Drawing Machine , going through the first test pattern .


The hardware : a Arduino and a Adafruit MotorShield connected to a computer.

The principle is : 4 function in the Arduino : up , down , right , left , theses functions are triggered by serial information such as “u” ,”d” ,”r” ,”l”  ;

//http://www.ladyada.net/make/mshield/use.html

#include <AFMotor.h>
AF_Stepper motor1(100, 1);           // nb step/360o , side of the shield
AF_Stepper motor2(100, 2);
int mSpeed = 80;                     // speed rpm
int style = INTERLEAVE;               // SINGLE    DOUBLE     INTERLEAVE    MICROSTEP
char vvvv;
boolean mLow = false ;

void setup() {
  Serial.begin(56000);                // serial communication speed
  Serial.println("Stepper test!");
  delay(2000);
  motor1.setSpeed(mSpeed);
  motor2.setSpeed(mSpeed);
}

void loop() {
  vvvv = Serial.read();
  if (vvvv == 'r'){
    right(1,style);
    mRelease();
  }
  if (vvvv == 'l'){
    left(1,style);
    mRelease();
  }
  if (vvvv == 'u'){
    up(1,style);
    mRelease();
  }
  if (vvvv == 'd'){
    down(1,style);
    mRelease();
  }
}

void right (int steps, int style) {
  Serial.println("right");
  while (steps--) {
    motor1.step(1, FORWARD, style);
    motor2.step(1, FORWARD, style);
  }
}
void left (int steps, int style) {
  Serial.println("left");
  while (steps--) {
    motor1.step(1, BACKWARD, style);
    motor2.step(1, BACKWARD, style);
  }
}
void down (int steps, int style){
  Serial.println("down");
  while (steps--){
    motor1.step(1, FORWARD, style);
    motor2.step(1, BACKWARD, style);
  }
}
void up (int steps, int style){
  Serial.println("up");
  while (steps--){
    motor1.step(1, BACKWARD, style);
    motor2.step(1, FORWARD, style);
  }
}

void mRelease (){
  if (mLow){
    motor1.release();
    motor2.release();
  }

}

on the other side vvvv is running and sending theses info through loops ,bangs and to the rs232 node .

first test hello world!

what the image is supposed to look like

and what the vvvv patch looks like

11-09-08 Mechanical Update

result

new test

working on exporting / drawing SVG files from Inkscape  (opensource vector software) :  the original files are from this page