NXT Snippets

From ZENotes
(Redirected from Snippets)
Jump to: navigation, search

Please contribute Snippets in Plain Text; this site aims more at being a Library than a Download Center. I believe it's quicker to review someones' code that to download, unpack, open & crawl through: let's just it being accessible, shall we?

Some snippets here are just plain copied/pasted from Daniele Benedettelli' nxc tutorial


Workplace

My Snippets

Drunken tribot v1 That's where the beginner should start with, for an ultra-simple yet effective random movement based on a drunken robot tribulations

Drunken tribot v2 Single thread, simple random "drunken" programme for any species of 'bot with a touch sensor in front.

Drunken tribot v3 Thriple-Threaded Totally Drunk 'bot tries to avoid certain tiles on the floor on top of being really unable to avoid any obstacle or take any rational decision regarding where to loan modification head to after a collision.

Tutorial Snippets

Motor1 Simple Move Forward & Back for two motors

Mutex starting the Multiple Thread Way

Random is your first, simple step to Randomisation of behaviour.

2Threads42motors introduction to separate, non-exclusive threads

TripleMutexwithTouchandDistance fully functional but laggy.

Other Peoples' Snippets

pong This one contains a very cool version of the old Pong game. It was written by Michael Anderson.

Better Rex is an nxc version of the very mind of Mr Alpha Rex; I say the Very Mind because the code by G.Hawkins is heavily commented, very instructive.

spitter This snippet contains a program written by Sivan Toledo. It shows off a number of important NXC language features. See Spitter page for more information.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox