User:Rune24

You enter a room, a solitary man leans against the wall. There is also a flask. It is also rather dark. >>look man You try to stare at the man, but your eyes water as you behold him. >>get ye flask No. >>north There is no exit to the north. >>south There is no exit to the south. You have been eaten by a grue. Resurrection in 10 minutes.

//Output Test by CP, RV, CS

using namespace std;
 * 1) include
 * 2) include 
 * 3) include 
 * 4) define PORT 0x378

int main { int x;

if(ioperm(PORT, 3, 1)){perror("ioperm");exit(1);}

for(x=0;x<12;x++) /*Wheel1 Forward*/ { outb(1,PORT); usleep(10000); outb(4,PORT); usleep(10000); outb(2,PORT); usleep(10000); outb(8,PORT); usleep(10000); }

for(x=0;x<12;x++) /*Wheel2 Forward*/ { outb(16,PORT); usleep(10000); outb(64,PORT); usleep(10000); outb(32,PORT); usleep(10000); outb(128,PORT); usleep(10000); }

for(x=0;x<12;x++) /*Wheel1and2 Forward*/ { outb(17,PORT); usleep(10000); outb(68,PORT); usleep(10000); outb(34,PORT); usleep(10000); outb(136,PORT); usleep(10000); }

for(x=0;x<12;x++) /*Wheel1 Backward*/ { outb(8,PORT); usleep(10000); outb(2,PORT); usleep(10000); outb(4,PORT); usleep(10000); outb(1,PORT); usleep(10000); }

for(x=0;x<12;x++) /*Wheel2 Backward*/ { outb(128,PORT); usleep(10000); outb(32,PORT); usleep(10000); outb(64,PORT); usleep(10000); outb(16,PORT); usleep(10000); }

for(x=0;x<12;x++) /*Wheel1and2 Backward*/ { outb(136,PORT); usleep(10000); outb(34,PORT); usleep(10000); outb(68,PORT); usleep(10000); outb(17,PORT); usleep(10000); }

/*Instructions: To rotate the stepper motor the count applied to D0 to D3 is 1, 4, 2, 8

Create a menu that: 1. Turn stepper to the right 360 2.Turn stepper to the right 360 fast 3. Turn stepper to the left 360 4. Turn stepper to the left 360 fast 5. Calibrate - Pressing R or L to move one step left or right.*/