User:Sej8926/ENES-100/project 0

Week0 Preferences

 * 1) Combo Lock
 * 2) Canbus
 * 3) Tribot

Week1 Narrative
My job this week was to outline the software from this website http://www.markedwardcampos.com/files/gimgs/13_mcamposfinal.png on how to find a 3 digit combination from a combo lock. I then tested it out on my own combo lock to see if it would work. From my trial, I did not get the right combination for the lock I used. 10/5/0 ... don't write your task here ... don't "report" on what you did ... you would have received push points if you created a wikiversity form .. for finding the last combination and then how you searched manually through the patterns recommended. No push points for just saying "I did it." --1sfoerster (discuss • contribs) 18:49, 17 February 2014 (UTC)

Week2 Narrative
I think the problem I had in Week 1 was that I had a different brand combo lock than the one the website had. I used a Brinks Lock, but the website used a Master lock. I re-did the process with a Master lock. Here are my steps:


 * I first lifted the lock handle up and spun the combo counter-clockwise. I then recorded the 12 different numbers I got:0, 3.5, 6.5, 10, 13.5, 17, 20, 23.5,27.5,30,33.5,36.5


 * How did you ..get.. numbers? What critera? --1sfoerster (discuss • contribs) 15:01, 27 February 2014 (UTC)


 * With these 12 numbers, 7 of them had a .5. I discarded these and am left with: 0, 10,17,20,30.


 * You are mixing up tense, person, instructions versus what you did ... very chaotic .. This chaos is expected in your notebook, but here there should be some order. --1sfoerster (discuss • contribs) 15:01, 27 February 2014 (UTC)


 * All of these digit will end in the same number except for one. 17. That means this is the last number of the combination.


 * This means the first digit options are: 1, 5, 9, 13, 17, 21, 25, 29, 33, 37 and the second digit options are: 1, 7, 11, 15, 19, 23, 27, 31, 35, 39.


 * There are now 100 possible combinations with the given numbers.

I went through all 100 using trial and error, however I was not successful with finding a correct combination. I looked up more possible ways to crack the code, but they all gave me the same way. With this, I can only assume that the problem is from human error. I will continue to figure out the problem.

I had to edit the above. Next time write the instructions you are following, then shoot a video of the process ... do it under a web cam, write about what your interpretation of the instruction is, make a presentation to the class so everyone can offer suggestions. This could be done in front of the engineering seminar ... even if you never open a lock! --1sfoerster (discuss • contribs) 15:01, 27 February 2014 (UTC)

In the Vernier PhotoGate cable (BTD- British Telecom Digital) there are six conductor wires. Each of them have a certain job. From the website http://www.vernier.com/support/sensor-pinouts/  I found this:
 * 1) Pin One: input
 * 2) Pin Two: N/A
 * 3) Pin Three: N/A
 * 4) Pin Four: Power (5.3 V)
 * 5) Pin Five: Ground
 * 6) Pin Six: N/A

Excellent ... I typed vernier photogate arduino into Google and found this. Need to figure out how it is physically hooked to the arduino.--1sfoerster (discuss • contribs) 15:05, 27 February 2014 (UTC)

10/10/5 ... great communication, started two very good conversations ... set the stage for lots of push points --1sfoerster (discuss • contribs) 15:08, 27 February 2014 (UTC)

Week3 Narrative
0/0/0 .. nothing to grade ... see my section ... did work on the cable to the photo gate --1sfoerster (discuss • contribs) 15:13, 4 March 2014 (UTC)

Week4 Narrative
It was my job to use the Arduino to get the motors and solenoid to work. I used the code from the previous group:

* #include 

AF_Stepper motor(200, 2);

int led = 10; //set digital pin to 10

void setup {

pinMode (led, OUTPUT); //for solenoid

Serial.begin(9600);          // set up Serial library at 9600 bps Serial.println("Stepper test!");

motor.setSpeed(10); // 10 rpm

motor.step(100, FORWARD, SINGLE); motor.release; delay(1000);

}

void loop {

for (int i = 0; i < 40; i++) {

for (int j = 0; j < 40; j++) {         for (int k = 0; k < 40; k++) {         //loop through all 64,00 combinations motor.step((i * 2.5), FORWARD, DOUBLE); delay(500); motor.step((j * 2.5), BACKWARD, DOUBLE); delay(500); motor.step((k * 2.5), FORWARD, DOUBLE); delay(2000); //pull selenoid digitalWrite (led, HIGH); delay (1000); digitalWrite (led, LOW); delay (1000); //check position sensor if / else statement //position at zero for next combination motor.step((k * 2.5), BACKWARD, DOUBLE); delay(2000); //spin 2 full rotations to clear previous combination motor.step((80 * 2.5), FORWARD, DOUBLE); delay(2000); }      }

} }

However a constant problem showed up when the code said that "AF_Stepper does not name a type". So I downloaded the content from https://github.com/adafruit/Adafruit-Motor-Shield-library. This made the solenoid work, however it did not make it loop. (Which means it constantly lifted up the latch on the lock, instead of lifting up the latch every 5 seconds or so. To fix this I added the next two following codes:

*Code 1: #include 

#include 

AF_Stepper motor(200, 2); int led = 10; //set digital pin to 10 void setup{ Serial.begin(9600);                     // set up Serial library at 9600 bps Serial.println("Stepper test!"); motor.setSpeed(10);                  // 10 rpm motor.step(200, FORWARD, SINGLE); motor.release; delay(1000); }      void loop { for (int a=1; a<2; a++){ for (int b=1; b<2; b++){ for (int c=1; c<4; c++){ //loop through all 64,000 theoretical combinations motor.step((a * 5), FORWARD, DOUBLE); delay(100); motor.step((a * 5), BACKWARD, DOUBLE); delay(100); motor.step((b * 5), BACKWARD, DOUBLE); delay(100); motor.step((c * 5), FORWARD, DOUBLE); delay(500); //position at zero for next combination motor.step((c * 5), BACKWARD, DOUBLE); delay(100); motor.step((b * 5), FORWARD, DOUBLE); delay(500); //spin 2 full rotations to clear previous combination motor.step((200), FORWARD, DOUBLE); delay(1000); }              }             }            }

*Code 2: int switchPin = 8 int ledPin = 13; boolean lastButton = LOW; boolean currentButton = LOW; boolean ledOn = false; void setup {          pinMode(switchPin, INPUT); pinMode(ledPin, OUTPUT); }        boolean debounce(boolean last) {        boolean current = digitalRead(switchPin); if (last != current) {         delay(5); current = digitalRead(switchPin); }        return current; }        void loop {          currentButton = debounce(lastButton); if (lastButton == HIGH && currentButton == HIGH) {            ledOn = !ledOn; }             lastButton = currentButton; digitalWrite(ledPin, ledOn); }> }}

The next issue was the motor. When the proper code was uploaded to Arduino, the motor did not do anything. We found out that the problem was either improper wiring or there was actually something wrong with the motor.

My next project was to test out the Verier Photogate. I found the code to use on the Arduino at http://www.vernier.com/engineering/arduino/digital-sensors/photogates/. The 6 input wires plug into the Analog In Section of the Arduino. Then when the code was uploaded, The LabQuest was able to tell me "Unblocked" or "Blocked" when an object was under the Verier Photogate.

Who is "We"??? Did you edit the work I did or try to duplicate what I did? Why did you go to vernier and try to download their software? This was starting over. Naming of the above code was a problem. I spent 10 minutes trying to figure out what you did. Not sure what the modifications you made were. Not enough information to troubleshoot the motor not working. 10/5/10 --1sfoerster (discuss • contribs) 15:43, 11 March 2014 (UTC)