Firky2010

LEGO Facts

  • LEGO is an abbreviation of the two Danish words "leg godt", meaning "play well"

  • During the moulding process, the plastic is heated to 232°C until its consistency is that of dough

  • In 2003 LEGO  changed the minifigure's yellow facial colouring to a more authentic skin colour

  • In 2006 the LEGO  website had an average of 8,137,062 individual visitors a month

  • If you built a column of about 40,000,000,000 LEGO bricks, it would reach the moon

Hits

Free Hit Counters

845days since
Project Launch

NXT Programming


This is one of my very first NXT Mindstorm programs - it is simple, yet effective. This program first resets the rotation sensor to 0, then starts a loop taking the position on a single joystick axis in degrees, and sends the value to the math block. So, for this example lets say this is the program for left and right.  The joystick is being pushed 22 degrees to the right. The value would be sent to the first math block which works out what 1% would be by dividing the degree value by 100 which would be 0.22.  This result is then sent to the second math block, which is preset by me to times the 1% by 15, giving me 3.3. The result is then sent to the LEGO power functions controller which has a speed scale of 0-7, "0" being stop and "7" being full speed. This repeats until the loop is stopped by the joystick returning to 0 degrees.


This program is a little bit more complicated as two motors are controlled and four math blocks are used. The first part starts and runs just like before but this time a second motor is used to stop counter rotation on the wrist or grab. The result of 3.3 is sent to the third math block, which times the value by 2 in this example giving 6.6. This result is then fed to the second input on the fourth math block and the raw (unchanged) value from the last math block is also sent to the first input value. In simple terms this is now a sum of 3.3 minus 6.6 giving -3.3 this is now sent to the LEGO power functions controller. Motor A is rotating 3.3 (just under half speed clockwise) and Motor B is rotating -3.3 ( just under half speed counter clockwise).