Library | Building | Programming | Quick Guides Home | Quick Guides to Building | Quick Guides to Programming | LVLM | WeDo

DocumentsDate added

Order by : Name | Date | Hits [ Descendent ]
file icon Acceleration and Case StructuresTooltip 06/06/2011 Hits: 188

This example shows how to use shift registers and case structures to produce an effect similar to acceleration.  If the sensor is pressed, the motors stop, but otherwise power is slowly added to the motors.


 

file icon Compute FactorialTooltip 06/08/2011 Hits: 214

This program shows how to execute the concept of recursion (using a function within itself).  The factorial program takes in a number n, and computes n factorial (n!).  n! =  n*(n-1)*(n-2)*(n-3) etc.  By definition, 0! is equal to 1.   This example uses a while loop and a shift register.

 


file icon Conditional LoopsTooltip 06/06/2011 Hits: 223

This example shows how to make a while loop dependent on a condition in order to keep running, instead of depending on a condition in order to stop.

 

file icon Convert Polar to CartesianTooltip 06/02/2011 Hits: 209

This program takes a point in Polar coordinates and converts it into Cartesian Coordinates.


file icon For LoopsTooltip 06/06/2011 Hits: 213

This example shows the use of a for loop, which is useful when you know precisely how many times a loop needs to be run.  The "N" in the top left corner represents the number of iterations the loop will go through.  In this particular example, the motor runs faster depending on which iteration the loop is on.

 

file icon Modulus FunctionTooltip 06/08/2011 Hits: 220

This program shows the most basic use of the Quotient/Remainder block.  In other programming languages, this function is referred to as the Modulus, and allows the user to use the remainder of an equation.  In this example, the user inputs a number and the program determines (using the Modulus) if the number is even or odd.

 


file icon Shift Register CountingTooltip 06/06/2011 Hits: 143

This example shows the basic use of a shift register in a while loop.  Shift registers are used to store values from the end of a loop and reuse them at the start of the loop.


file icon Shift Registers and TimersTooltip 06/06/2011 Hits: 199

This example demonstrates the use of both shift registers and timers.  After resetting the timer, the program reads how long the loop has been running, subtracts the last timer value, and displays the result to the screen, essentially measuring the run time of one iteration.

 

file icon Using SequencesTooltip 06/06/2011 Hits: 212

This example shows a flat sequence structure in action.

 

file icon WaitingTooltip 06/06/2011 Hits: 235

This example shows how to use the Wait For program.  The program first waits for a touch, moves forward, and then waits again for a touch to brake.

 

«StartPrev12NextEnd»
Page 1 of 2
Home | About Us | Contact Us
© 2013 Center for Engineering Educational Outreach, Tufts University
© 2013 The LEGO Group. All rights reserved.