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

Review

TER3M1 Review / Exam

Exam is Mon, Jan 23rd. 12:30-2 PM
A single sided, one page, hand written cheat sheet is allowed.


Day 1

Engineering Process

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
    • task main
    • syntax - ;
    • comments  //   or /*   this is a comment */
    • constants  
  • controlling motors
    • going straight
    • turning
  • using a  sensor
    • setting up the light sensor
    • taking a reading
  • 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


Review your VEX test



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

page 8

task main()
{
 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
task main()
{
 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
task main()
{
 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);
   }  
 }
}
Comments