Friday, November 15, 2013

November 12th, 2013-

Team "ThinkStation" consisting of RJ Lindsey, Nicholas Barceloni, and Matt Peddle met in the computer lab on the third floor of perry hall from 0900-1100.
Initial sketches/assembly discussed, initial code written/tested, and additional parts discussed and ordered.

The overall objective of the "useless machine" is for a switch to be activated, then a "finger" to come out of the box via the servo motor and turn the switch off.

The group project will consist of a box made of acrylic that has hinges on the top of one side, to allow the box to open, a switch mounted on the top of the opposite side, and an LED screen mounted in a location that has yet to be determined.We will also incorporate a LED that will light up when the switch is pressed forward and then turn off when the servo motor pushes the switch back. The LCD screen will read "Useless Game" when the servo motor is activated and the swith is pressed back.

The servo motor will be mounted inside of the box and will be controlled via the switch.  The code that we currently have written, and that is posted below, is setup for a potentiometer instead of a switch but will be corrected once we have the switch.

Goals set- Purchase a new servo motor that has more torque, purchase a swich, add a LED, LCD screen, and switch to the current drawing/assembly, and create a working assembly in solidworks.  Also, determine the amount of acrylic that we can use and whether or not it can have holes cut in it.

Code-
Project-Machine
===============

Project 22201
//This is the initial code. Code will eventually be modified for a switch instead of a potentiometer. 

#include <Servo.h>      //Including the servor library in the code
  
 
Servo myservo;          // Sets the servo as myservo
 
int x=0;                
 int potPin = A0;       //Potentiometer is connected to A0 and given an integer
 
void setup () {         //Starting off the code
    myservo.attach(12);  //myservo is set to pin 12
    myservo.write(180);  //and is placed at 180 degree 
 }
  
 void loop ()            //Start loop
 {             
   while (x<1) {
      if(analogRead(potPin) > 150)  //if potpin reads less than 150
      {
        myservo.write (25);         //move servo to position 25 degree
        delay (100);                //then pause for 10th of a second
      }//close if statement
      
     else{                         //if potpin reads greater than 150
        myservo.write (180);        //place servo at 180 degree
        delay(100);                 //pause for 10th of a second
      }//close else statement
      
  }//close while statement
  }//close loop



November 15th, 2013-

Nicholas Barceloni, Matt Peddle and RJ Lindsey discussed the project via email. Nicholas Barceloni made corrections to the code posted above. Matt Peddle bought a switch and a new servo motor and RJ  Lindsey worked on putting the circuits together to make the switch and servo motor interact. 

Nicholas, RJ and Matt all have individual assignments to be completed before the next meeting on Tuesday the 19th of November. 

No comments:

Post a Comment