Skip to main content

Orthograph drawing video

Potentiometer progam

Put the kill switch program here....

 

 while(1 == 1)
  {

      if(SensorValue(potatoMeter) < 2999)
      {
        startMotor(rightMotor, 70);
      }
      else
      {
        stopMotor(rightMotor);
      }

    if(SensorValue(potatoMeter) > 3000)
    {
      startMotor(rightMotor, -70);
    }
    else
    {
     stopMotor(rightMotor);
    }
  }


}

Sean’s

startMotor(leftMotor, 80);
if(SensorValue[potatoMeter]=>1500)
{
stopMotor(leftMotor);
wait(2);
startMotor(rightMotor, 80);
}
if(SensorValue[lineTracker]<1500)
{
stopMotor(rightMotor);
turnLEDOn(green);
}
else
{
turnLEDOff(green);
}
}
}

 

Darrin’s

 untilBump(bumpSwitch);
    turnLEDOff(greenLED);
    startTask(Killswitch);
    startMotor(leftMotor,80);
    wait(.5);
    untilPotentiometerGreaterThan(1499,potatoMeter);
stopMotor(leftMotor);
wait(1);
startMotor(rightMotor,80);
wait(1);
while(1==1)
{
if(SensorValue(lineFollower)<900)
{

wait(1);
stopMotor(rightMotor);
turnLEDOn(greenLED);
}
else
{
turnLEDOff(greenLED);
}
}

}

ROBOTICS

potato meter greater than, less than

Code:
if(SensorValue[potatometer] < 20 && SensorValue[potatometer] > 10)
   {
 Your program

Printer bed dimensions

Printer bed dimensions

 
The dimensions are 225 mm x 145 mm x 150 mm

TEST BED PROGRAM

Test Bed Program
task Killswitch()                                                                      //this is a second task besides task main
{                                                                                   //Open brace start on task Killswitch
 /*while(SensorValue[limitSwitch2]==0)                       
 {
 }*/
 untilTouch(limitSwitch2);                     //If the limit switch is pushed then read the next lines of code
 stopAllTasks();                                    //STOP everything
}                                                           //Close brace on task Killswitch
task main()
{                                                                        //Program begins, insert code within curly braces
 untilBump(bumpSwitch);                                    //This is the on button
 wait(.5);                                                             // wait to let the finger get off the button
 startTask(Killswitch);                                         //Start the kill switch program

  while(1 == 1)                                                           //while loop – will keep running

     {                                                                            //Open brace start while loop

startMotor(rightMotor, 100);                     //Start the right motor at 100 speed

wait(4);                                                                                //wait four seconds

startMotor(leftMotor, -40);                        //Left motor runs in reverse slowly (note negative number)

wait(4);                                                                                //wait 4 seconds

stopMotor(leftMotor);                                 //stop left motor

wait(2);                                                                                //wait two seconds

stopMotor(rightMotor);                                               //Both motors are stopped

wait(2);                                                                                //wait two seconds

if(SensorValue[limitSwitch]==1)                            //if limit switch is hit read the program below

 {                                                                              //Open brace start if

turnLEDOn(green);                                         //turn on the LED light for 4 seconds

 stopMotor(rightMotor);                                              //stop the right motor

wait(1.35);                                                                          //1.35 seconds will turn the robot 90 degrees

startMotor(rightMotor,100);                                      //restart the right motor so the robot goes straight

}                                                                                               //close brace end if

else                                                                                        //  if – else                                                            

{                                                                                               //open brace start else

turnLEDOff(green);                                         //LED turns off

startMotor(rightMotor, 100);                                     //Start the right motor at 100 speed

    startMotor(leftMotor, 100);                                    //start the left motor at 100 speed

}                                                                                               //close else brace

}                                                                                                 //close brace End while loop

}                                                                                               //close brace end task main

 

RobotC Cheat Sheet - you can use this for the test

RobotC Cheat Sheet

task main()

{    //start task main brace                                                                           

untilBump(bumpSwitch);                                             //turn on with bumpswitch

wait(.5);                                                                               //wait so that finger can get off button

     while(1 == 1)                                                           //while loop – will keep running

     {         // start while loop

      if(SensorValue[bumpSwitch]==1)                      //if bumpswitch is hit read the program below

             {    //start if brace

           stopAllTasks ();                                                                      //Stop everything

         }     //end if brace

   if(SensorValue[limitSwitch]==1)                            //if limit switch is hit read the program below

 {  //start if brace

 stopMotor(rightMotor);                                              //stop the right motor

wait(1.35);                                                                          //1.35 seconds will turn the robot 90 degrees

startMotor(rightMotor,100);                                      //restart the right motor so the robot goes straight

} //end if brace

else                                                                                        //  if – else                                                            

{ //start else brace

startMotor(rightMotor, 100);                                     //Start the right motor at 100 speed

    startMotor(leftMotor, 100);                                    //start the left motor at 100 speed

}  //end else brace

}              //End while loop

}              //End task main

On off button with reverse turn

 

task main()
{                                     //Program begins, insert code within curly braces


untilBump(bumpSwitch);
wait(.5);


     while(1 == 1)                                                                        //while 1=1 run program
     {
      if(SensorValue[bumpSwitch]==1)
             {
           stopAllTasks ();
         }
     //start while loop
         if(SensorValue[limitSwitch1] == 1)                        //if limitSwitch1 is on run program
         {                                                                                            //start program for when limitSwitch1 is on
             stopMotor(leftMotor);                                                //stop left motor
             stopMotor(rightMotor);                                            //stop right motor
             wait(0.5);                                                                    //wait 0.5 seconds

             startMotor(leftMotor,50);                   //start left Motor speed 50
             startMotor(rightMotor,-50);                 //start right Motor speed -50
             wait(1.35);                                     //wait 1.5 sec
             stopMotor(rightMotor);                      //stop right motor
             stopMotor(leftMotor);                       //stop left motor
             wait(0.5);                                  //wait .5 sec
             startMotor(leftMotor,100);                  //start left motor speed 100
             startMotor(rightMotor,100);                 //start right motor speed 100
            // wait(1.0);                                                                    //wait 1 second
            // stopMotor(leftMotor);                                                //stop left motor
            // stopMotor(rightMotor);                                            //stop right motor
             //wait(0.5);                                                                    //wait 0.5 seconds
             //startMotor(rightMotor,50);                                    //start right motor at 50 speed
            // startMotor(leftMotor,-50);                                    //start left motor at -50 speed
             //wait(1.05);                                                                    //wait 1.25 seconds
             //stopMotor(rightMotor);                                            //stop right motor
             //stopMotor(leftMotor);                                                //stop left motor
         }
         if(SensorValue[limitSwitch2] == 1)                        //start program if limitSwitch2 is hit
         {
             stopMotor(rightMotor);                                            //stop right motor
             stopMotor(leftMotor);                       //stop left motor
             wait(0.5);                                  //wait 0.5 sec

             startMotor(leftMotor,-50);                  //start left motor speed -50
             startMotor(rightMotor,50);                  //start right motor speed 50
             wait(1.35);                                     //wait 1.25 sec
             stopMotor(leftMotor);                       //stop left motor
             stopMotor(rightMotor);                      //stop right motor
             //wait(0.5);                                  // wait .5 sec
             //startMotor(rightMotor,100);                 //start right speed 100
             //startMotor(leftMotor,100);                  //start left motor speed 100
             //wait(1.0);                                  //wait 1 sec
             //stopMotor(rightMotor);                      //stop right motor
             //stopMotor(leftMotor);                       //stop left motor
             //wait(0.5);                                  // wait .5 sec
             //startMotor(rightMotor,-50);                 //start right motor speed -50
             //startMotor(leftMotor,50);                   //start left motor speed 50
             //wait(1.15);                                 //wait 1.25
             //stopMotor(rightMotor);                      //stop right motor
             //stopMotor(leftMotor);                       //stop left motor
          }

         else
         {
             startMotor(rightMotor,100);                 //start right motor speed 100
             startMotor(leftMotor,105);    //start left motor speed 105
             startMotor(chainsawMotor,50);
         }
     }
 }

On and Off Button Program

Gobot  on and off button

The off and on button program

task main()

{                                                                                                //Program begins, insert code within curly braces

untilBump(bumpSwitch);                                             //turn on with bumpswitch

wait(.5);                                                                               //wait so that finger can get off button

     while(1 == 1)                                                           //while 1=1 run program

     {                                                                                         // start while loop

      if(SensorValue[bumpSwitch]==1)                      //if bumpswitch is hit read the program below

             {                                                                                                 //start if  brace

           stopAllTasks ();                                                                      //Stop everything

         }                                                                                                     //end if brace

PUT YOUR PROGRAMS FOR GOBOT 2-8 HERE!!!!!

}                                                                                                              //End while loop

}                                                                                                              //End task main

Line Follower

task main()

{

while (true)

{

if (SensorValue[lineTracker] > 500)

{

motor[leftMotor] = 35;

motor[rightMotor] = 0;

}

else

{

motor[leftMotor] = 0;

motor[rightMotor] = 35;

}

}

}

Clawbot Program

 
task main()
{                                     //Program begins, insert code within curly braces
    while(true)                        //Repeat indefinitely
    {
     while(SensorValue[bumpSwitch] == 1)
     {
   }                                   //ends second while
    wait(1);                             //waits until you can get your finger off the button
  untilBump(bumpSwitch);               //push the bump switch
  wait(2);
    startMotor(leftMotor, -100);         //start left motor at 100 speed
    startMotor(rightMotor, -100);        //start right motor at 100 speed
    wait(3);                             //wait for 4 seconds
    stopMotor(rightMotor);               //stop right Motor
    wait(1.35);                          //wait 1.35 seconds
    startMotor(rightMotor, -100);        //start right Motor at 100 speed
    wait(2);                             //wait for 2 seconds
    stopMotor(rightMotor);               //stop right motor
    stopMotor(leftMotor);                //stop left motor
    startMotor(claw, -50);               //open the claw
    wait(1);                             //wait for 1 second
    startMotor(leftMotor, -100);         //start left motor at 100 speed
    startMotor(rightMotor, -100);        //start right motor at 100 speed
    wait(0.1);                           //wait for 0.1 seconds
    stopMotor(leftMotor);                //stop left motor
    stopMotor(rightMotor);               //stop right motor
    startMotor(claw, 50);                //close the claw
    wait(1.5);                           //wait 1.5 seconds
    stopMotor(claw);                     //stop claw motor
    startMotor(armMotor, 50);            //raise the claw
    wait(1);                             //wait for 1 second
    stopMotor(armMotor);                 //stop the arm
    startMotor(rightMotor, -100);        //start right motor at 100 speed
    wait(2.1);                           //wait 2.1 seconds
    startMotor(leftMotor, -100);         //start left motor at 100 speed
    wait(2);                             //wait two seconds
  stopMotor(leftMotor);                //stop left motor
  wait(1.4);                           //wait 1.4 seconds
  startMotor(leftMotor, -100);         //start left motor at 100 speed
  wait(3);                             //wait 3 seconds
  stopMotor(rightMotor);               //stop right motor
  stopMotor(leftMotor);                //stop left motor
  startMotor(armMotor, -50);           //lower the arm
  wait(1);                             //wait 1 second
  stopMotor(armMotor);                 //stop the arm motor
  }                                    //ends while loop
}                                     //Program ends

 

Engineering Notebook Rubric

 

PLTW Gateway Notebook Grading Rubric

 

Elements

Weight

5 Points

4 Points

3 Points

2 Points

1-0 Points

Total

 

   Development

   and

   Organization

 

Notebook shows a high level of organization; sections are clearly labeled; all activity sheets and related information are included.

Notebook shows evidence of organization, but is missing section dividers; not all activities are completed with appropriate information.

 

Notebook shows limited organization, such as missing sections, and several activities are incomplete.

Notebook is not complete and is missing several activities.

There is no evidence of an organized notebook.

 

  Notes

 

Notes are clearly labeled with dates and relationship to each lesson.

Notes are labeled but are not in order.

Some notes are missing, and not all notes are labeled.

Notes are not labeled, and the notes that are included are not clearly identified.

 

There is little or no evidence of notes in the notebook.

 

   Research

 

Research is documented with appropriate citations. Research shows a variety of resources and is not limited to one or two sources.

Research is documented on some topics. One or two do not have proper citation information. Research is limited to two or three resources.

 

Research is randomly completed with little or no documentation of sources.

 

 

There is no research other than what is available from the textbook or lecture notes.

There is little or no evidence of research in the notebook.

 

  Engineering         

  Notebook

 

   Design

 

 

Sketches are complete and annotated to show all important information.  Heading information is complete and accurate.

One or two sketches are not complete and are missing important information, such as measurements. Some heading information is incomplete or inaccurate.

 

Sketches are missing more than half of the identification of the components. More than half of the heading information is not complete or is not accurate.

Sketches are not complete. Heading information is not complete and is not accurate.

There is little or no evidence of sketches in the notebook.

 

   Portfolio

 

   Best Works

 

 

All portfolio entries demonstrate the student’s best work. Dates are recorded and each entry is complete.

Two or three best work entries are incomplete, misdated, or are not a good representation of the student’s best work.

 

More than half of the best work entries are incomplete, misdated, or are not a good representation of the student’s best work.

Student has not identified their best work and placed it in the proper section of their notebook.

There is little or no evidence of a portfolio in the notebook.

 

 

Instant off button for robots


task Killswitch()                                                                      //this is a second task besides task main
{
 /*while(SensorValue[limitSwitch2]==0)
 {
 }*/
 untilTouch(limitSwitch2);
 stopAllTasks();
}


task main()
{                                     //Program begins, insert code within curly braces


 untilBump(bumpSwitch);
 wait(.5);
 startTask(Killswitch);

while(1 == 1)                                                                        //while 1=1 run program
 { 

Put your Program here

}