Classes‎ > ‎Archives‎ > ‎2011/2012‎ > ‎TER3M1 - Robotics‎ > ‎

# TER3M1 Review / Exam

## Day 1

#### Ohm's Law

this was on our first test, we did not review this

#### Logical Gates

- review the gates: AND, OR, NOT, NAND, NOR, XOR
- know the schematic, chip diagram, truth tables for each

- work on schematic problems like these (solve the truth table for the output)

- review how to generate a truth table

#### Conversion

Binary to Decimal - see animation and decimal to binary

## Day 2

#### Gears

• driver / follower
• gear ratios
• idlers gears
• gear ration
• direction
• utility

#### Programming NXT with NXC

• see NXC_tutorial.pdf - bricxcc.sourceforge.net/nbc/nxcdoc/NXC_tutorial.pdf
• review code and explanations on page 8, 16 and 20 (don’t worry about until)  - see below
• basics
• syntax - ;
• comments  //   or /*   this is a comment */
• constants
• controlling motors
• going straight
• turning
• using a  sensor
• setting up the light sensor
• if statements
• while loops

## Day 3

#### Gateway

Rules
• competition manual - pg 3-7 (diagram, basic rules and definitions)

VEX parts
• identify common parts - see handouts

VEX systems
• structure
• power
• motion
• control

Code Samples from bricxcc.sourceforge.net/nbc/nxcdoc/NXC_tutorial.pdf

page 8

{
OnFwd(OUT_AC, 30);
Wait(4000);
OnRev(OUT_AC, 30);
Wait(4000);
Off(OUT_AC);
}

page 16

#define MOVE_TIME    500
#define TURN_TIME    360
{
while(true)
{
OnFwd(OUT_AC, 75);
Wait(MOVE_TIME);
if (Random() >= 0)
{
OnRev(OUT_C, 75);
}
else
{
OnRev(OUT_A, 75);
}
Wait(TURN_TIME);
}
}

page 20 - ignore until

#define THRESHOLD 40
{
SetSensorLight(IN_3);
OnFwd(OUT_AC, 75);
while (true)
{
if (Sensor(IN_3) > THRESHOLD)
{
OnRev(OUT_C, 75);
Wait(100);
until(Sensor(IN_3) <= THRESHOLD);
OnFwd(OUT_AC, 75);
}
}
}