Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Plotter v2.0
- void up() {
- OnRev(OUT_B, 100);
- Wait(SEC_5);
- Off(OUT_B);
- }
- void down() {
- OnFwd(OUT_B, 100);
- Wait(SEC_10);
- Off(OUT_B);
- }
- void step10(int a, int b) {
- a*=100; b*=100;
- PosRegSetAngle (OUT_C, 0);
- PosRegAddAngle (OUT_A, 100);
- Wait(SEC_10);
- PosRegAddAngle(OUT_C, a);
- Wait(a*2);
- down();
- PosRegAddAngle(OUT_C, b);
- Wait(b*2);
- up();
- }
- void step6(int c, int d) {
- c*=100; d*=100;
- PosRegAddAngle(OUT_C, c);
- Wait(c*2);
- down();
- PosRegAddAngle(OUT_C, d);
- Wait(d*2);
- up();
- }
- task main() {
- PosRegEnable(OUT_AC, 40, 32, 40);
- step10(21,4 );
- step10(21,7 );
- step10(16,2 );
- step10(14,20);
- step10(13,22);
- step10(13,24);
- step10(12,27);
- step10(11,30);
- step10(11,31);
- step10(11,32);
- step10(10,32);
- step10(10,34);
- step10(9, 35);
- step10(9, 34);
- step10(9, 34);
- step10(8, 35);
- step10(8, 35);
- step10(8, 36);
- step10(7, 3 );
- step6(0,31);
- step10(7, 3 );
- step6(0,31);
- step10(7, 36);
- step10(7, 25);
- step6(4,5);
- step10(6, 2 );
- step6(0,8);
- step6(1,10);
- step6(6,3);
- step10(6, 10);
- step6(4,9);
- step6(6,3);
- step10(6, 9 );
- step6(5,10);
- step6(0,0);
- step6(2,4);
- step10(7, 6 );
- step6(5,0);
- step6(0,20);
- step10(7, 6 );
- step6(1,26);
- step10(7, 35);
- step10(7, 34);
- step10(8, 33);
- step10(10,30);
- step10(11,29);
- step10(12,27);
- step10(12,27);
- step10(13,26);
- step10(13,26);
- step10(13,25);
- step10(14,23);
- step10(15,22);
- step10(16,20);
- step10(16,20);
- step10(17,6 );
- step6(1,4);
- step6(0,3);
- step10(18,16);
- step10(18,15);
- step10(19,14);
- step10(20,11);
- step10(21,8 );
- step10(24,4 );
- step10(26,0 );
- PosRegSetAngle (OUT_C, 0);
- PosRegAddAngle (OUT_A, 100);
- Wait(SEC_10);
- }
Advertisement
Add Comment
Please, Sign In to add comment