:-consult('/home/student/plnxt/plnxt.pl'). start :- nxt_open, trigger_create(_,check_distance,wycofaj), nxt_go(300). check_distance :- nxt_ultrasonic(Distance,force), Distance < 15. wycofaj:- nxt_stop, nxt_rotate(400,90), nxt_go_cm(900,30), nxt_rotate(400,-90), nxt_go(300).