You are on page 1of 237

12/30/12

NXT 2.0 Instructions Categories BASH C Celestial Lego Various

Contact Home Search

LEGO Mindstorms NXT 2.0 instructions


Instructions for building the Shooterbot, Robogator, Color Sorter, and Alpha Rex.

Table of contents
Introduction Programming the NXT with Linux Compiling an NXC program Shooterbot 1. Driving base Building guide 2. Color detection Building guide 3. Shooter Building guide 4. Locate objects Building guide Robogator 1. Jaws Building guide 2. Eyes Building guide 3. Legs Building guide 4. Tail Building guide Color Sorter 1. Dispenser Building guide 2. Color detector Building guide 3. Sorting tray Building guide 4. Color catapult Building guide Alpha Rex 1. Legs Building guide 2. Arms Building guide 3. Head Building guide 4. Color sensor Building guide

Programming guide Programming guide Programming guide Programming guide Programming guide Programming guide Programming guide Programming guide Programming guide Programming guide Programming guide Programming guide Programming guide Programming guide Programming guide Programming guide

Test guide Test guide Test guide Test guide Test guide Test guide Test guide Test guide Test guide Test guide Test guide Test guide Test guide Test guide Test guide Test guide

Introduction
The instructions for building the four main LEGO Mindstorms NXT 2.0 models are distributed only on software that does not support Linux. The instructions are reproduced here. Programming the NXT with Linux The accompanying programs supplied here are written in NXC. NXC is a simple C-like programming language supported by NBC. NBC allows you to write NXT programs and download them to the NXT. This configuration guide for NBC on Linux is useful. Compiling an NXC program A typical command to compile and download an NXC program by USB would be

nc- -=s flnm.x b d Sub ieaenc

Shooterbot
Can you build and program a Shooterbot to guard your room while you are away? 1. Driving base
Building guide
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program 1/237

12/30/12

NXT 2.0 Instructions

Can you build a Shooterbot to move forward and then move back again?

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

2/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

3/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

4/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

5/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

6/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

7/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

8/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

9/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

10/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

11/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program a Shooterbot to move forward on the test pad and then move in reverse to its start position?
/ sotro_.x / hoebt1nc / Mv fradadte rvre / oe owr n hn ees. ts mi ( ak an ) { / Mv frada 7%pwrfr2scns / oe owr t 5 oe o eod OFd(U_C,5;Wi (00; nw OTB 7) at 20) / Rvrea 7%pwrfr2scns / ees t 5 oe o eod ORv(U_C,5;Wi (00; ne OTB 7) at 20) / Bae / rk Of(U_C; f OTB)
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

12/237

12/30/12

NXT 2.0 Instructions

Test guide

Download your program. Place the Shooterbot on the test pad and run the program. 2. Color detection
Building guide

Can you build a Shooterbot to test colors on the test pad?

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

13/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program a Shooterbot to move forward, find the red line, turn around, and then move back to its start position?
/ sotro_.x / hoebt2nc / Mv fradt terdln,tr aon,admv bc t tesat / oe owr o h e ie un rud n oe ak o h tr / psto. / oiin / Ajs ti nme t si yu srae/bteypwr / dut hs ubr o ut or ufc atr oe #eieTR_IE15 dfn UNTM 70 ts mi ( ak an ) { ln t,t; og 0 1

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

/ Bigteclrsno o-ie / rn h oo esr nln

14/237

12/30/12

NXT 2.0 Instructions

/ Bigteclrsno o-ie / rn h oo esr nln StesrooFl (3; eSnoClrul S) / Rcr tetm we tefradmvmn sat / eod h ie hn h owr oeet trs t =Cretik(; 0 urnTc ) / Mv fradt terdln / oe owr o h e ie OFd(U_C,5; nw OTB 7) utl(NU_ECLR= SNO_) ni IPTRDOO = ESR3; t =Cretik(;/ Rcr tetm we tefradmvmn fnse 1 urnTc ) / eod h ie hn h owr oeet iihs Of(U_C; f OTB) / Tr 10dgest tergt / un 8 ere o h ih OFd(U_,7) ORv(U_,7) Wi (UNTM) Of(U_C; nw OTC 5; ne OTB 5; at TR_IE; f OTB) / Mv bc t tesat / oe ak o h tr OFd(U_C,5;Wi (1-t) Of(U_C; nw OTB 7) at t 0; f OTB) }

Test guide

Download your program. Place the Shooterbot on the test pad and run the program. 3. Shooter
Building guide

Can you build the Shooterbot to shoot balls at objects? You will have to build the shooter on the front of your Shooterbot.

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

15/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

16/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

17/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

18/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

19/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

21/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program Shooterbot to drive around and shoot while showing different colored lights?
/ sotro_.x / hoebt3nc / Dieaon adsotwiesoigdfeetclrdlgt. / rv rud n ho hl hwn ifrn ooe ihs #eieBLES7 dfn ULT #eieFAHDRTO 30 dfn LS_UAIN 0 #eieTR_IE30 dfn UNTM 00 itblesrmiig=BLES n ult_eann ULT; bo fr =fle ol ie as; ts fahn_ihs( ak lsiglgt ) { itrdfahs n e_lse; wie(ult_eann >0 hl blesrmiig ) { / Atraebtenterd gen adbu lms / lent ewe h e, re, n le ap StesrooRd (N3;Wi (LS_UAIN; eSnoClre I_) at FAHDRTO) StesrooGen(N3;Wi (LS_UAIN; eSnoClrre I_) at FAHDRTO) StesrooBu (N3;Wi (LS_UAIN; eSnoClrle I_) at FAHDRTO) } / Idct ta n blesrmi / niae ht o ult ean fr(e_lse =1 rdfahs< 1;rdfahs+ o rdfahs ; e_lse = 0 e_lse+) { StesrooRd (N3;Wi (LS_UAIN/2; eSnoClre I_) at FAHDRTO ) StesrooNn (N3;Wi (LS_UAIN/2; eSnoClroe I_) at FAHDRTO ) } / So teporm / tp h rga SoAlak (; tplTss ) } ts sot( ak ho ) { wie(re hl tu) { / Cekwehrt fr able / hc hte o ie ult i (re= fr) f tu = ie { / Rstte'ieable'fa t fle / ee h fr ult lg o as fr =fle ie as;
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program 22/237

12/30/12

NXT 2.0 Instructions

/ Dceettenme o blesrmiig / ermn h ubr f ult eann blesrmiigult_eann-; / T fr,mk mtrAd asnl 30dge rtto / o ie ae oo o ige 6 ere oain RttMtrx(U_,7,30 0 fle tu) oaeooE OTA 5 6, , as, re; } } } ts mv ( ak oe ) { wie(ult_eann >0 hl blesrmiig ) { / D arno tr / o adm un i ( = Rno () f 0 = adm 2) { / Lf tr / et un OFd(U_,7) ORv(U_,7) nw OTB 5; ne OTC 5; Wi (adm(UNTM); at Rno TR_IE) Of(U_C; f OTB) Wi (00; at 10) fr =tu; ie re Wi (00; at 10) } es le { / Rgttr / ih un OFd(U_,7) ORv(U_,7) nw OTC 5; ne OTB 5; Wi (adm(UNTM); at Rno TR_IE) Of(U_C; f OTB) Wi (00; at 10) fr =tu; ie re Wi (00; at 10) } } } ts mi ( ak an ) { / Mk teetsseeuesmlaeul atrmi ( i fnse / ae hs ak xct iutnosy fe an ) s iihd Peee (lsiglgt,sot mv) rcds fahn_ihs ho, oe; }

Test guide

Download the program. Place the Shooterbot in the middle of the test pad and run the program. 4. Locate objects
Building guide

Can you build the Shooterbot to protect your room? You will have to add the Ultrasonic Sensor to your Shooterbot.

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

23/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program the Shooterbot to scan your room and detect objects? If an object is closer than 40cm, the Shooterbot should shine a warning light and then shoot if the object does not move away.
/ sotro_.x / hoebt4nc / I a ojc i t coe sieawriglgtadte soti / f n bet s o ls, hn ann ih n hn ho f / teojc de ntmv aa. / h bet os o oe wy #eieBLES7 dfn ULT #eieFAHDRTO 20 dfn LS_UAIN 0 #eieTRSOD4 dfn HEHL 0 #eieWRIGTM 40 dfn ANN_IE 00 #eiesattrigpwr OFd(U_,pwr;ORv(U_,pwr; dfn tr_unn(oe) nw OTC oe) ne OTB oe)

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

ts mi ( ak an )

24/237

12/30/12

NXT 2.0 Instructions

ts mi ( ak an ) { ln t; og 0 itblesrmiig=BLES n ult_eann ULT; Stesrosed(4;/ Bigteutaoi sno o-ie eSnoLwpe S) / rn h lrsnc esr nln StesrooGen(3;/ Sttelm t so alcer eSnoClrre S) / e h ap o hw l-la wie(ult_eann >0 hl blesrmiig ) { sattrig(0; tr_unn 5) utl(esrS(4 <TRSOD;/ Sa frcoeojcs ni SnoU S) HEHL) / cn o ls bet Of(U_C;/ So trig f OTB) / tp unn t =Cretik(; 0 urnTc ) wie(Cretik( -t)<WRIGTM) hl (urnTc ) 0 ANN_IE {/ Ei tewrig-afahn rdlm / mt h ann lsig e ap StesrooNn (3;Wi (LS_UAIN; eSnoClroe S) at FAHDRTO) StesrooRd (3;Wi (LS_UAIN; eSnoClre S) at FAHDRTO) } i (esrS(4 <TRSOD f SnoU S) HEHL) { blesrmiigult_eann-; RttMtrx(U_,7,30 0 fle tu) / Sot oaeooE OTA 5 6, , as, re; / ho Wi (00;/ Gv mtrAtm t sot at 10) / ie oo ie o ho } StesrooGen(3;/ Sttelm t so alcer eSnoClrre S) / e h ap o hw l-la } Of(U_C;/ So trig f OTB) / tp unn TxOt(,LDLN4 "U O BLES,tu) etu 8 C_IE, OT F ULT" re; Wi (00; at 70) SoAlak (;/ So teporm tplTss ) / tp h rga }

Test guide

Download the program. Place the Shooterbot in the middle of the test pad and run the program.

Robogator
Can you build and program a Robogator that attacks objects and protects its territory? 1. Jaws
Building guide

Can you build a robot with jaws that open and close?

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

25/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

26/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

27/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

28/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

29/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

30/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

32/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

33/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

34/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program your robot to open and close its jaws?
/ rbgtr1nc / ooao_.x / Oe adcoetejw / pn n ls h as / Sml temtrrtto sedeeyti nme o mlieod / ape h oo oain pe vr hs ubr f ilscns #eieRTTO_APERSLTO 5 dfn OAINSML_EOUIN 0 / Teapoiae'ere prscn'rtto o mtrA / h prxmt dges e eod oain f oo ln dsa=0 og p_ ; ts mtrsedmntr( ak oo_pe_oio ) { ln mca0 mca1 / mc= mtrrtto cut og r__, r__; / r = oo oain on usge ln ta0 ta1 nind og __, __;
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program 35/237

12/30/12

NXT 2.0 Instructions

wie(re hl tu) { / Rcr tertto cutadtetm / eod h oain on n h ie mca0=Mtroainon (U_) ta0=Cretik(; r__ ooRttoCut OTA; __ urnTc ) Wi (OAINSML_EOUIN; at RTTO_APERSLTO) / Aan rcr tertto cutadtetm / gi, eod h oain on n h ie mca1=Mtroainon (U_) ta1=Cretik(; r__ ooRttoCut OTA; __ urnTc ) / Cluaeteaeaertto rt oe ta tm itra / aclt h vrg oain ae vr ht ie nevl dsa=(mca1-mca0 *10)/(__ -ta0; p_ (r__ r__) 00 ta1 __) } } ts bt ( ak ie ) { wie(re hl tu) { / Asm tejw aecoe t bgnwt -oe te / sue h as r lsd o ei ih pn hm OFd(U_,4) Wi (0) / Wi >RTTO_APERSLTO nw OTA 0; at 10; / at OAINSML_EOUIN utl(0>dsa;/ Wi utltejw hv oee adaepatclysil ni 1 p_) / at ni h as ae pnd n r rcial tl Of(U_) f OTA; / Coetejw / ls h as ORv(U_,4) Wi (0) ne OTA 0; at 10; utl(1 <dsa;/ Rvrerttosaengtv ni -0 p_) / ees oain r eaie Of(U_) f OTA; } } ts mi ( ak an ) { Peee (ie mtrsedmntr; rcds bt, oo_pe_oio) }

Test guide

Download and run the program. Your Robogator jaws should open and close. 2. Eyes
Building guide

Can you make your Robogator see objects and attack them if they get too close?

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

36/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

37/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program your robot to bite when objects get too close?
/ rbgtr2nc / ooao_.x / Oe adcoetejw we ojcsaecoe / pn n ls h as hn bet r ls / Sml temtrrtto sedeeyti nme o mlieod / ape h oo oain pe vr hs ubr f ilscns #eieRTTO_APERSLTO 5 dfn OAINSML_EOUIN 0 / Bt ojcswihcm coe ta ti / ie bet hc oe lsr hn hs #eieTRSOD4 dfn HEHL 0 / Teapoiae'ere prscn'rtto o mtrA / h prxmt dges e eod oain f oo ln dsa=0 og p_ ; ts mtrsedmntr( ak oo_pe_oio )
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

38/237

12/30/12

NXT 2.0 Instructions

{ ln mca0 mca1 / mc= mtrrtto cut og r__, r__; / r = oo oain on usge ln ta0 ta1 nind og __, __; wie(re hl tu) { mca0=Mtroainon (U_) ta0=Cretik(; r__ ooRttoCut OTA; __ urnTc ) Wi (OAINSML_EOUIN; at RTTO_APERSLTO) mca1=Mtroainon (U_) ta1=Cretik(; r__ ooRttoCut OTA; __ urnTc ) dsa=(mca1-mca0 *10)/(__ -ta0; p_ (r__ r__) 00 ta1 __) } } ts bt ( ak ie ) { Stesrosed(4;/ Bigteutaoi sno o-ie eSnoLwpe S) / rn h lrsnc esr nln wie(re hl tu) { utl(esrS(4 <TRSOD;/ Sa frcoeojcs ni SnoU S) HEHL) / cn o ls bet / Asm tejw aecoe t bgnwt -oe te / sue h as r lsd o ei ih pn hm OFd(U_,4) Wi (0) / Wi >RTTO_APERSLTO nw OTA 0; at 10; / at OAINSML_EOUIN utl(0>dsa;/ Wi utltemtrsos ni 1 p_) / at ni h oo tp Of(U_) f OTA; / Coetejw / ls h as ORv(U_,4) Wi (0) ne OTA 0; at 10; utl(1 <dsa;/ Rvrerttosaengtv ni -0 p_) / ees oain r eaie Of(U_) f OTA; } } ts mi ( ak an ) { Peee (ie mtrsedmntr; rcds bt, oo_pe_oio) }

Test guide

Download and run the program. Move your hand towards the Robogator's eyes. The Robogator's jaws should start biting. Move your hand away and the Robogator should stop biting. 3. Legs
Building guide

Can you build a robot that can walk?

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

39/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

41/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

42/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

43/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

44/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

45/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

46/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

47/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

48/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

49/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

50/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

51/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

52/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

53/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

54/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

55/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

56/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

57/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

58/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

59/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

60/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

61/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

62/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

64/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

65/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

67/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

68/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

69/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

70/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

71/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program the Robogator to walk forward and start biting when objects get too close?
/ rbgtr3nc / ooao_.x / Oe adcoetejw adwl fradwe ojcsaecoe / pn n ls h as n ak owr hn bet r ls / Sml temtrrtto sedeeyti nme o mlieod / ape h oo oain pe vr hs ubr f ilscns #eieRTTO_APERSLTO 5 dfn OAINSML_EOUIN 0 / Bt ojcswihcm coe ta ti / ie bet hc oe lsr hn hs #eieTRSOD4 dfn HEHL 0 / Wl fradfru t ti mn seswe a ojc i coe / ak owr o p o hs ay tp hn n bet s ls #eieMXSESFRAD3 dfn A_TP_OWR / Teapoiae'ere prscn'rtto o mtrA / h prxmt dges e eod oain f oo ln dsa=0 og p_ ; ts mtrsedmntr( ak oo_pe_oio ) { ln mca0 mca1 / mc= mtrrtto cut og r__, r__; / r = oo oain on usge ln ta0 ta1 nind og __, __; wie(re hl tu) { mca0=Mtroainon (U_) ta0=Cretik(; r__ ooRttoCut OTA; __ urnTc ) Wi (OAINSML_EOUIN; at RTTO_APERSLTO) mca1=Mtroainon (U_) ta1=Cretik(; r__ ooRttoCut OTA; __ urnTc ) dsa=(mca1-mca0 *10)/(__ -ta0; p_ (r__ r__) 00 ta1 __) } } ts bt ( ak ie ) { wie(re hl tu) { utl(esrS(4 <TRSOD;/ Sa frcoeojcs ni SnoU S) HEHL) / cn o ls bet / Asm tejw aecoe t bgnwt / sue h as r lsd o ei ih OFd(U_,4) Wi (0) / Wi >RTTO_APERSLTO nw OTA 0; at 10; / at OAINSML_EOUIN utl(0>dsa;/ Wi utltemtrsos ni 1 p_) / at ni h oo tp Of(U_) f OTA; ORv(U_,4) Wi (0) ne OTA 0; at 10;

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

72/237

12/30/12

NXT 2.0 Instructions

ORv(U_,4) Wi (0) ne OTA 0; at 10; utl(1 <dsa;/ Rvrerttosaengtv ni -0 p_) / ees oain r eaie Of(U_) f OTA; } } ts wl ( ak ak ) { itses n tp; wie(re hl tu) { utl(esrS(4 <TRSOD;/ Sa frcoeojcs ni SnoU S) HEHL) / cn o ls bet / Wl fradwiea ojc i coe / ak owr hl n bet s ls ses=0 tp ; wie(esrS(4 <TRSOD& ses<MXSESFRAD hl SnoU S) HEHL & tp A_TP_OWR) { RttMtrx(U_C -0,30 0 tu,tu) oaeooE OTB, 10 6, , re re; ses+ 1 tp = ; } } } ts mi ( ak an ) { Stesrosed(4;/ Bigteutaoi sno o-ie eSnoLwpe S) / rn h lrsnc esr nln Peee (ie mtrsedmntr wl) rcds bt, oo_pe_oio, ak; }

Test guide

Download the program. Place your alligator on the test pad and run the program. 4. Tail
Building guide

Can you build the tail and add sensors to the Robogator so it knows where its legs are?

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

73/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

74/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

75/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

76/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

77/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

78/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

79/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

80/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program Robogator to protect its territory: lunge forward, bite, and crawl back?
/ rbgtr4nc / ooao_.x / We a ojc i coe oe adcoetejw,wl frad / hn n bet s ls: pn n ls h as ak owr, / adte mv bc / n hn oe ak / Sml temtrrtto sedeeyti nme o mlieod / ape h oo oain pe vr hs ubr f ilscns #eieRTTO_APERSLTO 5 dfn OAINSML_EOUIN 0 / Bt ojcswihcm coe ta ti / ie bet hc oe lsr hn hs #eieTRSOD6 dfn HEHL 0 / Wl fradfru t ti mn seswe a ojc i coe / ak owr o p o hs ay tp hn n bet s ls #eieMXSESFRAD3 dfn A_TP_OWR
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

/ Teapoiae'ere prscn'rtto o mtrA / h prxmt dges e eod oain f oo

81/237

12/30/12

NXT 2.0 Instructions

/ Teapoiae'ere prscn'rtto o mtrA / h prxmt dges e eod oain f oo ln dsa=0 og p_ ; ts mtrsedmntr( ak oo_pe_oio ) { ln mca0 mca1 / mc= mtrrtto cut og r__, r__; / r = oo oain on usge ln ta0 ta1 nind og __, __; wie(re hl tu) { mca0=Mtroainon (U_) ta0=Cretik(; r__ ooRttoCut OTA; __ urnTc ) Wi (OAINSML_EOUIN; at RTTO_APERSLTO) mca1=Mtroainon (U_) ta1=Cretik(; r__ ooRttoCut OTA; __ urnTc ) dsa=(mca1-mca0 *10)/(__ -ta0; p_ (r__ r__) 00 ta1 __) } } ts bt ( ak ie ) { wie(re hl tu) { utl(esrS(4 <TRSOD;/ Sa frcoeojcs ni SnoU S) HEHL) / cn o ls bet / Asm tejw aecoe t bgnwt / sue h as r lsd o ei ih OFd(U_,4) Wi (0) / Wi >RTTO_APERSLTO nw OTA 0; at 10; / at OAINSML_EOUIN utl(0>dsa;/ Wi utltemtrsos ni 1 p_) / at ni h oo tp Of(U_) f OTA; ORv(U_,4) Wi (0) ne OTA 0; at 10; utl(1 <dsa;/ Rvrerttosaengtv ni -0 p_) / ees oain r eaie Of(U_) f OTA; } } ts wl ( ak ak ) { iti ses n , tp; / Uetetuhsnost aintelg iiily / s h oc esr o lg h es ntal OFd(U_,-0) nw OTB 10; utl( = SNO_) ni 1 = ESR1; Of(U_) RttMtr(U_,-0,4) f OTB; oaeoo OTB 10 5; OFd(U_,-0) nw OTC 10; utl( = SNO_) ni 1 = ESR2; Of(U_) RttMtr(U_,-0,4) f OTC; oaeoo OTC 10 5; wie(re hl tu) { / Wl fradwiea ojc i coe / ak owr hl n bet s ls ses=0 tp ; wie(esrS(4 <TRSOD& ses<MXSESFRAD hl SnoU S) HEHL & tp A_TP_OWR) { RttMtrx(U_C -0,30 0 tu,tu) oaeooE OTB, 10 6, , re re; ses+ 1 tp = ; } / Wl bc t teoiia psto / ak ak o h rgnl oiin Wi (00; at 10) wie(tp >0 hl ses ) { RttMtrx(U_C 9,30 0 tu,tu) oaeooE OTB, 0 6, , re re; ses- 1 tp = ; } } } ts mi ( ak an ) { Stesrosed(4;/ Bigteutaoi sno o-ie eSnoLwpe S) / rn h lrsnc esr nln Stesroc (1;/ Bigtetuhsnoso-ie eSnoTuh S) / rn h oc esr nln Stesroc (2; eSnoTuh S)

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

82/237

12/30/12

NXT 2.0 Instructions

Peee (ie mtrsedmntr wl) rcds bt, oo_pe_oio, ak; }

Test guide

Download the program. Place Robogator on the test pad and run the program.

Color Sorter
Can you build and program the Color Sorter to sort balls by color? 1. Dispenser
Building guide

Can you build a dispenser that separates balls one by one?

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

83/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

84/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

85/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

86/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

87/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

90/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

91/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

92/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

93/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

95/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

96/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

97/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

98/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

99/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

100/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

101/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

102/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

103/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

104/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

105/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

106/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

107/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

108/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

109/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

110/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

111/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

112/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

113/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

114/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

115/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

116/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

117/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

118/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

119/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

120/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

121/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

122/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

123/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

124/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

125/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

126/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

127/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

129/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

130/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

131/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

132/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

133/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program the dispenser to tilt and dispense one ball at a time?
/ clrotr1nc / oosre_.x / Dses oebl a atm / ipne n al t ie / Tenme o blst b sre / h ubr f al o e otd #eieBLS4 dfn AL / Gttedsesri asadr psto / e h ipne n tnad oiin vi rstdsesr( od ee_ipne ) { ORv(U_,8) ne OTB 0; utl( = SNO_) ni 1 = ESR1; Of(U_) f OTB; Wi (00; at 10) } / Dses oebl / ipne n al vi dses_al( od ipnebl ) { rstdsesr(; ee_ipne ) RttMtr(U_,6,70; oaeoo OTB 0 2) Wi (00; at 10) } ts mi ( ak an ) { iti n ; / Bigtetligmcaimstuhsno o-ie / rn h itn ehns' oc esr nln Stesroc (1; eSnoTuh S) i=0 ; wie(+ <BLS hl i+ AL) { dses_al(; ipnebl ) } }

Test guide

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

134/237

12/30/12

NXT 2.0 Instructions

Download your program. Place the Color Sorter in the middle of the test pad. Put a couple of balls in the dispenser and run the program. 2. Color detector
Building guide

Can you build a color detector that can recognise the different ball colors?

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

135/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

136/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you make a program that can tell the difference between the colors of the balls?
/ clrotr2nc / oosre_.x / Dses oebl a atm -dslyteclro ec bl / ipne n al t ie ipa h oo f ah al / Tenme o blst b sre / h ubr f al o e otd #eieBLS4 dfn AL / Gttedsesri asadr psto / e h ipne n tnad oiin vi rstdsesr( od ee_ipne ) { ORv(U_,8) ne OTB 0; utl( = SNO_) ni 1 = ESR1; Of(U_) f OTB; Wi (00; at 10)
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

137/237

} / Gtabl it tedsesrso / e al no h ipne lt vi la_al( od odbl ) { RttMtr(U_,6,30; oaeoo OTB 0 6) Wi (00; at 10) } vi dses_al( od ipnebl ) { RttMtr(U_,6,30; oaeoo OTB 0 6) Wi (00; at 10) } vi so_oo ( od hwclr ) { srn bl_oo ="; tig alclr " sic (ESR3 wth SNO_) { cs IPTBUCLR ae NU_LEOO: bl_oo ="LE; alclr BU" bek ra; cs IPTRDOO: ae NU_ECLR bl_oo ="E" alclr RD; bek ra; cs IPTGENOO: ae NU_RECLR bl_oo ="RE" alclr GEN; bek ra; cs IPTYLOCLR ae NU_ELWOO: bl_oo ="ELW; alclr YLO" bek ra; dfut eal: bl_oo ="OE; alclr NN" bek ra; } / So tebl clr / hw h al oo TxOt(0 LDLN3 bl_oo,tu) etu 3, C_IE, alclr re; Wi (00; at 10) } ts mi ( ak an ) { iti n ; / Bigtetligmcaimstuhsno o-ie / rn h itn ehns' oc esr nln Stesroc (1; eSnoTuh S) / Bigteclrsno o-ie / rn h oo esr nln StesrooFl (3; eSnoClrul S) i=0 ; wie(+ <BLS hl i+ AL) { / So tenme o blslf t sr / hw h ubr f al et o ot TxOt(,LDLN1 "al rmiig " tu) etu 0 C_IE, Bls eann: , re; Nmu (0 LDLN3 BLS-(-); uOt 5, C_IE, AL i1) rstdsesr(; ee_ipne ) la_al(; odbl ) so_oo (; hwclr ) dses_al(; ipnebl ) } }

Test guide

Download your program. Place the Color Sorter in the middle of the test pad. Run the program. 3. Sorting tray

Building guide

Can you build a sorting tray that allows the Color Sorter to sort the four different colored balls into their own basket?

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

140/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

141/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

142/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

143/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

144/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

145/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

146/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program the sorting tray to spin around and place balls of the same color in the same basket?
/ clrotr3nc / oosre_.x / Paeblso tesm clri tesm bse / lc al f h ae oo n h ae akt / Asm teeaen blsrmiigatrti nme o rtis / sue hr r o al eann fe hs ubr f ere #eieRTIS2 dfn ERE / Rsttedsesn ta adtebse we teeaestt tu / ee h ipnig ry n h akt hn hs r e o re bo rstdsesrfa =fle ol ee_ipne_lg as; bo rstbse_lg=fle ol ee_aktfa as; / Gtabl it tedsesrso / e al no h ipne lt vi la_al( od odbl ) {
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

Wi (00; at 20)

147/237

12/30/12

NXT 2.0 Instructions

Wi (00; at 20) / Saeu teblsi tedsesr / hk p h al n h ipne RttMtr(U_,9,40; oaeoo OTB 0 0) RttMtr(U_,-0 40; oaeoo OTB 9, 0) Wi (0) at 50; } vi dses_al( od ipnebl ) { RttMtr(U_,-0 30; oaeoo OTB 9, 6) Wi (00; at 10) } / So teclro tebl o teNTdsly / hw h oo f h al n h X ipa / Rtr tevleo teclro tebl t tecligts / eun h au f h oo f h al o h aln ak srn so_oo ( tig hwclr ) { srn bl_oo ="; tig alclr " sic (ESR3 wth SNO_) { cs IPTBUCLR ae NU_LEOO: bl_oo ="LE; alclr BU" bek ra; cs IPTRDOO: ae NU_ECLR bl_oo ="E" alclr RD; bek ra; cs IPTGENOO: ae NU_RECLR bl_oo ="RE" alclr GEN; bek ra; cs IPTYLOCLR ae NU_ELWOO: bl_oo ="ELW; alclr YLO" bek ra; dfut eal: bl_oo ="OE; alclr NN" bek ra; } / So tebl clr / hw h al oo TxOt(0 LDLN3 bl_oo,tu) etu 3, C_IE, alclr re; Wi (0) at 50; rtr bl_oo; eun alclr } vi ainbse (tigbl_oo) od lg_akt srn alclr { / RD YLO,GEN BU / E, ELW RE, LE i (alclr= "ELW){ f bl_oo = YLO" RttMtr(U_,3,9) oaeoo OTC 0 0; }lei (alclr= "RE" { es f bl_oo = GEN) RttMtr(U_,3,10; oaeoo OTC 0 8) }lei (alclr= "LE){ es f bl_oo = BU" RttMtr(U_,-0 9) oaeoo OTC 3, 0; } } / Gttedsesri asadr psto / e h ipne n tnad oiin ts rstdsesr( ak ee_ipne ) { wie(re hl tu) { i (re= rstdsesrfa) f tu = ee_ipne_lg { / Gttedsesrit asadr psto uigtetuhsno / e h ipne no tnad oiin sn h oc esr ORv(U_,8) ne OTB 0; utl( = SNO_) ni 1 = ESR1; Of(U_) f OTB; rstdsesrfa =fle ee_ipne_lg as; } } } ts rstbse ( ak ee_akt ) { wie(re hl tu)
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program 148/237

12/30/12

NXT 2.0 Instructions

{ i (re= rstbse_lg f tu = ee_aktfa) { / Gttebse it asadr psto uigtetuhsno / e h akt no tnad oiin sn h oc esr OFd(U_,3) nw OTC 0; utl( = SNO_) / Usttetuhsno i i i st ni 0 = ESR2; / ne h oc esr f t s e utl( = SNO_) ni 1 = ESR2; Of(U_) f OTC; RttMtr(U_,-0 3) oaeoo OTC 3, 0; rstbse_lg=fle ee_aktfa as; } } } ts mi ( ak an ) { iti n ; srn bl_oo; tig alclr / Bigtetligmcaimstuhsno o-ie / rn h itn ehns' oc esr nln Stesroc (1; eSnoTuh S) / Bigtesrigmcaimstuhsno o-ie / rn h otn ehns' oc esr nln Stesroc (2; eSnoTuh S) / Bigteclrsno o-ie / rn h oo esr nln StesrooFl (3; eSnoClrul S) Satak(ee_akt; trTs rstbse) Satak(ee_ipne) trTs rstdsesr; wie(re hl tu) { / Certedsly / la h ipa Rstcen(; eeSre ) i=0 ; d o { / Rsttepstoso tedsesradtebsesi prle / ee h oiin f h ipne n h akt n aall rstdsesrfa =tu; ee_ipne_lg re rstbse_lg=tu; ee_aktfa re / Wi utltersttssaebt fnse / at ni h ee ak r oh iihd utl(as = rstdsesrfa & fle= rstbse_lg; ni fle = ee_ipne_lg & as = ee_aktfa) la_al(;/ Paeabl i tedsesrei so odbl ) / lc al n h ipne xt lt bl_oo =so_oo (; alclr hwclr ) / Cekfrabl i tedsesrei so / hc o al n h ipne xt lt }wie(+ <RTIS& "OE = bl_oo) hl +i ERE & NN" = alclr i (NN"= bl_oo) f "OE = alclr { / Asm n blsaermiig / sue o al r eann TxOt(,LDLN3 "* FNSE **,tu) etu 0 C_IE, ** IIHD *" re; Wi (00; at 40) bek ra; } ainbse (alclr; lg_akt bl_oo) dses_al(; ipnebl ) } SoAlak (; tplTss ) }

Test guide

Download your program. Place the Color Sorter in the middle of the test pad. Run the program. 4. Color catapult
Building guide
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program 149/237

12/30/12

NXT 2.0 Instructions

Can you build a color catapult that throws balls in different directions?

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

150/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

152/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

154/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

155/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

156/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

157/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

158/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

159/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program the color catapult to throw balls of the same color in the same direction?
/ clrotr4nc / oosre_.x / Cukblso tesm clri tesm drcin / hc al f h ae oo n h ae ieto / Asm teeaen blsrmiigatrti nme o rtis / sue hr r o al eann fe hs ubr f ere #eieRTIS2 dfn ERE / Rsttedsesn ta adtectpl we teeaestt tu / ee h ipnig ry n h aaut hn hs r e o re bo rstdsesrfa =fle ol ee_ipne_lg as; bo rstctpl_lg=fle ol ee_aautfa as; / Gtabl it tedsesrso / e al no h ipne lt vi la_al( od odbl ) {
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

Wi (00; at 20)

160/237

12/30/12

NXT 2.0 Instructions

Wi (00; at 20) / Saeu teblsi tedsesr / hk p h al n h ipne RttMtr(U_,9,40; oaeoo OTB 0 0) RttMtr(U_,-0 40; oaeoo OTB 9, 0) Wi (0) at 50; } vi dses_al( od ipnebl ) { RttMtr(U_,-0 30; oaeoo OTB 9, 6) Wi (00; at 10) } / So teclro tebl o teNTdsly / hw h oo f h al n h X ipa / Rtr tevleo teclro tebl t tecligts / eun h au f h oo f h al o h aln ak srn so_oo ( tig hwclr ) { srn bl_oo ="; tig alclr " sic (ESR3 wth SNO_) { cs IPTBUCLR ae NU_LEOO: bl_oo ="LE; alclr BU" bek ra; cs IPTRDOO: ae NU_ECLR bl_oo ="E" alclr RD; bek ra; cs IPTGENOO: ae NU_RECLR bl_oo ="RE" alclr GEN; bek ra; cs IPTYLOCLR ae NU_ELWOO: bl_oo ="ELW; alclr YLO" bek ra; dfut eal: bl_oo ="OE; alclr NN" bek ra; } / So tebl clr / hw h al oo TxOt(0 LDLN3 bl_oo,tu) etu 3, C_IE, alclr re; Wi (0) at 50; rtr bl_oo; eun alclr } vi ainctpl (tigbl_oo) od lg_aaut srn alclr { / RD YLO,GEN BU / E, ELW RE, LE i (alclr= "E" { f bl_oo = RD) RttMtr(U_,3,4) oaeoo OTC 0 5; }lei (alclr= "ELW){ es f bl_oo = YLO" RttMtr(U_,3,9) oaeoo OTC 0 0; }lei (alclr= "RE" { es f bl_oo = GEN) RttMtr(U_,-0 4) oaeoo OTC 3, 5; }lei (alclr= "LE){ es f bl_oo = BU" RttMtr(U_,-0 9) oaeoo OTC 3, 0; } } / Gttedsesri asadr psto / e h ipne n tnad oiin ts rstdsesr( ak ee_ipne ) { wie(re hl tu) { i (re= rstdsesrfa) f tu = ee_ipne_lg { / Gttedsesrit asadr psto uigtetuhsno / e h ipne no tnad oiin sn h oc esr ORv(U_,8) ne OTB 0; utl( = SNO_) ni 1 = ESR1; Of(U_) f OTB; rstdsesrfa =fle ee_ipne_lg as; } } } ts rstctpl ( ak ee_aaut )
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program 161/237

12/30/12

NXT 2.0 Instructions

wie(re hl tu) { i (re= rstctpl_lg f tu = ee_aautfa) { / Gttectpl it asadr psto uigtetuhsno / e h aaut no tnad oiin sn h oc esr OFd(U_,3) / Usttetuhsno i i i stb mvn twr tefots nw OTC 0; / ne h oc esr f t s e y oig oad h rn utl( = SNO_) ni 0 = ESR2; OFd(U_,-0;/ Mv bc utltetuhsno atvts nw OTC 3) / oe ak ni h oc esr ciae utl( = SNO_) ni 1 = ESR2; Of(U_) f OTC; RttMtr(U_,-0 1) / Asih ajsmn frpretainet oaeoo OTC 3, 5; / lgt dutet o efc lgmn rstctpl_lg=fle ee_aautfa as; } } } ts mi ( ak an ) { iti n ; srn bl_oo; tig alclr / Bigtetligmcaimstuhsno o-ie / rn h itn ehns' oc esr nln Stesroc (1; eSnoTuh S) / Bigtesrigmcaimstuhsno o-ie / rn h otn ehns' oc esr nln Stesroc (2; eSnoTuh S) / Bigteclrsno o-ie / rn h oo esr nln StesrooFl (3; eSnoClrul S) Satak(ee_aaut; trTs rstctpl) Satak(ee_ipne) trTs rstdsesr; wie(re hl tu) { / Certedsly / la h ipa Rstcen(; eeSre ) i=0 ; d o { / Rsttepstoso tedsesradtectpl i prle / ee h oiin f h ipne n h aaut n aall rstdsesrfa =tu; ee_ipne_lg re rstctpl_lg=tu; ee_aautfa re / Wi utltersttssaebt fnse / at ni h ee ak r oh iihd utl(as = rstdsesrfa & fle= rstctpl_lg; ni fle = ee_ipne_lg & as = ee_aautfa) la_al(;/ Paeabl i tedsesrei so odbl ) / lc al n h ipne xt lt bl_oo =so_oo (; alclr hwclr ) / Cekfrabl i tedsesrei so / hc o al n h ipne xt lt }wie(+ <RTIS& "OE = bl_oo) hl +i ERE & NN" = alclr i (NN"= bl_oo) f "OE = alclr { / Asm n blsaermiig / sue o al r eann TxOt(,LDLN3 "* FNSE **,tu) etu 0 C_IE, ** IIHD *" re; Wi (00; at 40) bek ra; } dses_al(; ipnebl ) ainctpl (alclr; lg_aaut bl_oo) / Fr tectpl / ie h aaut OFd(U_,10;Wi (0) Of(U_) nw OTA 0) at 50; f OTA; OFd(U_,-0) Wi (0) Of(U_) nw OTA 10; at 50; f OTA; / Mv tectpl bc oe t tefotsd,rayfrrstigispsto / oe h aaut ak vr o h rn ie ed o eetn t oiin i (alclr= "RE" { f bl_oo = GEN) RttMtr(U_,3,4+0; oaeoo OTC 0 59) }lei (alclr= "LE){ es f bl_oo = BU" RttMtr(U_,3,9+0; oaeoo OTC 0 09)
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program 162/237

12/30/12

NXT 2.0 Instructions

} } SoAlak (; tplTss ) }

Test guide

Download your program. Place the Color Sorter in the middle of the test pad and make sure the axle is placed in the centre. Run the program.

Alpha Rex
Can you build and program the Alpha Rex to walk? 1. Legs
Building guide

Can you build a pair of legs that can walk?

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

163/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

164/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

165/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

166/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

168/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

169/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

171/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

172/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

173/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

174/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

175/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

176/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

177/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

178/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

179/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

180/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

181/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

182/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

183/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

184/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

185/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

188/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

189/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

190/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

191/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

192/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

193/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

194/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

196/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

197/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

198/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you build a pair of legs that test walk in place, and then walk forwards and backwards?
/ apae_.x / lhrx1nc / Wl i pae adfrad,adbcwrs / ak n lc, n owrs n akad. / Tredrcin frwlig / he ietos o akn #eieIPAE 0 dfn NLC #eieFRAD 1 dfn OWRS #eieBCWRS2 dfn AKAD

/ Gttelg i asadr psto / e h es n tnad oiin / MtrB&tuhsno 1-- rgtlg / oo oc esr -> ih e / MtrC&tuhsno 2-- lf lg / oo oc esr -> et e vi rstlg ( od ee_es )
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

199/237

12/30/12

NXT 2.0 Instructions

{ i ( = SNO_) f 1 = ESR1 { OFd(U_,5) Wi (0) nw OTB 0; at 30; utl( = SNO_) ni 0 = ESR1; Of(U_) f OTB; } OFd(U_,5) nw OTB 0; utl( = SNO_) ni 1 = ESR1; Of(U_) f OTB; i ( = SNO_) f 1 = ESR2 { OFd(U_,5) Wi (0) nw OTC 0; at 30; utl( = SNO_) ni 0 = ESR2; Of(U_) f OTC; } OFd(U_,5) nw OTC 0; utl( = SNO_) ni 1 = ESR2; Of(U_) f OTC; } vi wl (n drcin usge ln drto) od ak it ieto, nind og uain { usge ln t; nind og 0 rstlg (; ee_es ) Wi (00; at 20) RttMtr(U_,7,4) / Ptrgtlgdw oaeoo OTB 0 5; / u ih e on RttMtr(U_,-0 10;/ Ptlf lgu oaeoo OTC 7, 5) / u et e p t =Cretik(; 0 urnTc ) sic (ieto) wth drcin { cs IPAE ae NLC: wie(urnTc ( -t <drto) hl Cretik ) 0 uain { OFd(U_,7) OFd(U_,-0; nw OTB 0; nw OTC 7) } bek ra; cs FRAD: ae OWRS wie(urnTc ( -t <drto) hl Cretik ) 0 uain { OFdyc(U_C 5,0; nwSn OTB, 0 ) } bek ra; cs BCWRS ae AKAD: wie(urnTc ( -t <drto) hl Cretik ) 0 uain { ORvyc(U_C 5,0; neSn OTB, 0 ) } bek ra; } Of(U_C; f OTB) } ts mi ( ak an ) { / Bigtetuhsnoso-ie / rn h oc esr nln Stesroc (1;Stesroc (2; eSnoTuh S) eSnoTuh S) wl (NLC, 50) Wi (00; ak IPAE 00; at 20) wl (AKAD,50) Wi (00; ak BCWRS 00; at 20) wl (OWRS 50) Wi (00; ak FRAD, 00; at 20) }

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

200/237

12/30/12

NXT 2.0 Instructions

Test guide

Download the program. Place the Alpha Rex on the test pad. Run the program. 2. Arms
Building guide

Can you build the Alpha Rex with a pair of arms and moveable hands?

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

201/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

202/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

203/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

204/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

205/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

206/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

207/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

208/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

209/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

211/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

212/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

214/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

215/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

216/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

217/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

218/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

219/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

220/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

221/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

222/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

223/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

224/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

225/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program the arms to move back and forth while the hands open and close?
/ apae_.x / lhrx2nc / Mv team bc adfrh / oe h rs ak n ot ts mi ( ak an ) { wie(re hl tu) { / tr rgt-oe lf hn / un ih pn et ad RttMtr(U_,10 26) oaeoo OTA 0, *0; / bc t cne / ak o etr RttMtr(U_,-0,26) oaeoo OTA 10 *0; Wi (00; at 10) / tr lf -oe rgthn / un et pn ih ad RttMtr(U_,-0,26) oaeoo OTA 10 *0; / bc t cne / ak o etr RttMtr(U_,10 26) oaeoo OTA 0, *0; Wi (00; at 10) } }

Test guide

Download the program. Place the Alpha Rex on the test pad. Run the program. 3. Head
Building guide

Can you build the Alpha Rex to see? You will have to build a head on it!

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

226/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

227/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

228/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

229/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

230/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

231/237

12/30/12

NXT 2.0 Instructions

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

232/237

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program the Alpha Rex to move forward when it sees an object?
/ apae_.x / lhrx3nc / Mv fradwe a ojc i vsbe / oe owr hn n bet s iil / Wl fradwe ojcscm coe ta ti / ak owr hn bet oe lsr hn hs #eieTRSOD5 dfn HEHL 0 / Tredrcin frwlig / he ietos o akn #eieIPAE 0 dfn NLC #eieFRAD 1 dfn OWRS #eieBCWRS2 dfn AKAD

/ Gttelg i asadr psto / e h es n tnad oiin / MtrB&tuhsno 1-- rgtlg / oo oc esr -> ih e / MtrC&tuhsno 2-- lf lg / oo oc esr -> et e vi rstlg ( od ee_es ) { i ( = SNO_) f 1 = ESR1 { OFd(U_,5) Wi (0) nw OTB 0; at 30; utl( = SNO_) ni 0 = ESR1; Of(U_) f OTB; } OFd(U_,5) nw OTB 0; utl( = SNO_) ni 1 = ESR1; Of(U_) f OTB; i ( = SNO_) f 1 = ESR2 { OFd(U_,5) Wi (0) nw OTC 0; at 30; utl( = SNO_) ni 0 = ESR2; Of(U_) f OTC; } OFd(U_,5) nw OTC 0; utl( = SNO_) ni 1 = ESR2; Of(U_) f OTC; } vi wl (n drcin usge ln drto) od ak it ieto, nind og uain { usge ln t; nind og 0
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

RttMtr(U_,7,4) / Ptrgtlgdw oaeoo OTB 0 5; / u ih e on

233/237

RttMtr(U_,7,4) / Ptrgtlgdw oaeoo OTB 0 5; / u ih e on RttMtr(U_,-0 10;/ Ptlf lgu oaeoo OTC 7, 5) / u et e p t =Cretik(; 0 urnTc ) sic (ieto) wth drcin { cs IPAE ae NLC: OFd(U_,5) OFd(U_,-0; nw OTB 0; nw OTC 5) utl(urnTc ( -t >drto) ni Cretik ) 0 uain; bek ra; cs FRAD: ae OWRS OFdyc(U_C 5,0; nwSn OTB, 0 ) utl(urnTc ( -t >drto) ni Cretik ) 0 uain; bek ra; cs BCWRS ae AKAD: ORvyc(U_C 5,0; neSn OTB, 0 ) utl(urnTc ( -t >drto) ni Cretik ) 0 uain; bek ra; } Of(U_C; f OTB) rstlg (; ee_es ) } ts mi ( ak an ) { Stesroc (1;Stesroc (2;/ Bigtetuhsnoso-ie eSnoTuh S) eSnoTuh S) / rn h oc esr nln Stesrosed(4;/ Bigteutaoi sno o-ie eSnoLwpe S) / rn h lrsnc esr nln rstlg (; ee_es ) Wi (0) at 50; wie(re hl tu) { utl(esrS(4 <TRSOD; ni SnoU S) HEHL) wl (OWRS 50) Wi (00; ak FRAD, 00; at 20) } }

Test guide

Download the program. Place the Alpha Rex on the test pad. Run the program. 4. Color sensor
Building guide

Can you make the Alpha Rex detect colors by adding the Color Sensor?

12/30/12

NXT 2.0 Instructions

Programming guide

Can you program the Alpha Rex to ask for the green ball and then identify it? The Alpha Rex should identify and reject balls in other colors.
/ apae_.x / lhrx4nc / Akfragenbl / s o re al / TD Ueaviet akfragenbl we ncad / OO s oc o s o re al hn x ds / spotfrsudflso Lnx / upr o on ie n iu / Akfrabl we a ojc i coe ta ti / s o al hn n bet s lsr hn hs #eieTRSOD5 dfn HEHL 0 / Tredrcin frwlig / he ietos o akn #eieIPAE 0 dfn NLC
arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

#eieFRAD 1 dfn OWRS

235/237

12/30/12

NXT 2.0 Instructions

#eieFRAD 1 dfn OWRS #eieBCWRS2 dfn AKAD vi do_al( od rpbl ) { RttMtr(U_,-0,26) Wi (0) oaeoo OTA 10 *0; at 80; / bc t cne / ak o etr RttMtr(U_,10 26) oaeoo OTA 0, *0; } / Gttelg i asadr psto / e h es n tnad oiin / MtrB&tuhsno 1-- rgtlg / oo oc esr -> ih e / MtrC&tuhsno 2-- lf lg / oo oc esr -> et e vi rstlg ( od ee_es ) { i ( = SNO_) f 1 = ESR1 { OFd(U_,5) Wi (0) nw OTB 0; at 30; utl( = SNO_) ni 0 = ESR1; Of(U_) f OTB; } OFd(U_,5) nw OTB 0; utl( = SNO_) ni 1 = ESR1; Of(U_) f OTB; i ( = SNO_) f 1 = ESR2 { OFd(U_,5) Wi (0) nw OTC 0; at 30; utl( = SNO_) ni 0 = ESR2; Of(U_) f OTC; } OFd(U_,5) nw OTC 0; utl( = SNO_) ni 1 = ESR2; Of(U_) f OTC; } vi wl (n drcin usge ln drto) od ak it ieto, nind og uain { usge ln t; nind og 0 RttMtr(U_,7,4) / Ptrgtlgdw oaeoo OTB 0 5; / u ih e on RttMtr(U_,-0 10;/ Ptlf lgu oaeoo OTC 7, 5) / u et e p t =Cretik(; 0 urnTc ) sic (ieto) wth drcin { cs IPAE ae NLC: OFd(U_,5) OFd(U_,-0; nw OTB 0; nw OTC 5) utl(urnTc ( -t >drto) ni Cretik ) 0 uain; bek ra; cs FRAD: ae OWRS OFdyc(U_C 5,0; nwSn OTB, 0 ) utl(urnTc ( -t >drto) ni Cretik ) 0 uain; bek ra; cs BCWRS ae AKAD: ORvyc(U_C 5,0; neSn OTB, 0 ) utl(urnTc ( -t >drto) ni Cretik ) 0 uain; bek ra; } Of(U_C; f OTB) rstlg (; ee_es ) } ts mi ( ak an ) { Stesroc (1;Stesroc (2;/ Bigtetuhsnoso-ie eSnoTuh S) eSnoTuh S) / rn h oc esr nln Stesrosed(4;/ Bigteutaoi sno o-ie eSnoLwpe S) / rn h lrsnc esr nln StesrooFl (3;/ Bigteclrsno o-ie eSnoClrul S) / rn h oo esr nln

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

236/237

12/30/12

NXT 2.0 Instructions

rstlg (; ee_es ) Wi (0) at 50; wie(re hl tu) { utl(esrS(4 <TRSOD; ni SnoU S) HEHL) / Dslyamsae / ipa esg TxOt(,LDLN1 " etu 0 C_IE, GV M A IE E " tu) , re; TxOt(,LDLN3 " **GEN** " fle; etu 0 C_IE, * RE * , as) TxOt(,LDLN5 " etu 0 C_IE, BL AL " fle; , as) / Wi utlabl i pae i tergthn / at ni al s lcd n h ih ad utl(NU_LCCLR! SNO_) ni IPTBAKOO = ESR3; Wi (00; at 20) Rstcen(; eeSre ) i (NU_RECLR= SNO_) f IPTGENOO = ESR3 { / D adne / o ac wl (NLC,50) ak IPAE 00; / Rlaetebl / ees h al do_al(; rpbl ) } es le { / Mv frad / oe owr wl (OWRS 50) ak FRAD, 00; / Do tebl / rp h al do_al(; rpbl ) / Mv bc / oe ak wl (AKAD,50) ak BCWRS 00; } Wi (00; at 10) } }

Test guide

Download the program. Place the Alpha Rex on the test pad. Before running the program, the Alpha Rex's hands should be closed and pointed forward (do this by turning the gear on the right side of its back). Run the program.

arbitrarycreations.co.uk/lego/nxt_2_instructions/#robogator_jaws_program

237/237

You might also like