int delayone = 2; int delaytwo = 1; int delaythree = 1; int delayfour = 1; int xPinOne = 3; int laserPin = 4; int xPinTwo = 5; int yPinOne = 6; int yPinTwo = 9; int zPinOne = 10; int zPinTwo = 11; //int int ledPin = 9; // LED connected to digital pin 9 byte incomingByte; int currentX = 0; int currentY = 0; //byte imager[32768]; void setup() { pinMode(laserPin, OUTPUT); lasermove(0,0); // nothing happens in setup //lasermove(currentX,currentY); laser(0); //Serial.begin(115200); Serial.println("init complete"); } void loop() { directmove(0,0,0); for (int megaletter = int('a'); megaletter < (int('z')+1); megaletter++){ drawletter(char(megaletter), 9); } } void drawletter(char alphabeat, int loops) {for (int passes = 0; passes 500) { xcoord = 500; } if (xcoord <= 255) { analogWrite(zPinTwo, 0); analogWrite(zPinOne, 255-xcoord); } else { analogWrite(zPinOne, 0); analogWrite(zPinTwo, xcoord-255); } } void yposn(int ycoord){ ycoord = 500 - ycoord; if (ycoord > 500) { ycoord = 500; } if (ycoord <= 255) { analogWrite(yPinTwo, 0); analogWrite(yPinOne, 255-ycoord); //analogWrite(yPinTwo, 255-ycoord); } else { analogWrite(yPinOne, 0); analogWrite(yPinTwo, ycoord-255); //analogWrite(yPinOne, ycoord-255); } } void lefthandedsquare(){ //right handed square for (int i = 0; i<500; i=i+1) {lasermove(i,0); } for (int i = 0; i<500; i=i+1) {lasermove(500,i); } for (int i = 500; i>0; i=i-1) {lasermove(i,500); } for (int i = 500; i>0; i=i-1) {lasermove(0,i); } } void righthandedsquare(){ //left handed square for (int i = 0; i<500; i=i+1) {lasermove(0,i); } for (int i = 0; i<500; i=i+1) {lasermove(i,500); } for (int i = 500; i>0; i=i-1) {lasermove(500,i); } for (int i = 500; i>0; i=i-1) {lasermove(i,0); } }