This week, the group had two meetings, the first on 11/27 and the second on 11/30. All members were present for both meetings. Both meetings lasted for about 5 hours each.
During the first meeting, we completed a sketch of our fan for the SolidWorks portion of the project. The completed part (back orientation view) is shown below:
Next, we began to work on a code for the Arduino portion of our project, which is shown below:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
Servo myservo; | |
int pos = 0; | |
const int buttonPin = 2; | |
int buttonState = 0; | |
const int servoPin = 9; | |
int motorPin = 13; | |
void setup() { | |
pinMode(motorPin, OUTPUT); | |
pinMode(servoPin, OUTPUT); | |
pinMode(buttonPin, INPUT); | |
myservo.attach(9); | |
} | |
void loop() { | |
buttonState = digitalRead(buttonPin); | |
if (buttonState == LOW) { | |
digitalWrite(servoPin, HIGH); | |
myservo.write(80); | |
delay(500); | |
digitalWrite(motorPin, HIGH); | |
delay(1000); | |
digitalWrite(motorPin, LOW); | |
delay(500); | |
} | |
else { | |
digitalWrite(servoPin, LOW); | |
digitalWrite(motorPin, LOW); | |
} | |
} |
For the second meeting, we continued to work on the apparatus. We went to RadioShack to buy a battery holder, which would provide more output voltage to meet our necessary specifications. We also continued to work on our code and build the apparatus. Below is a video on how our apparatus works:
Our next meeting will take place some time next week. Stay tuned for our next blog post!
No comments:
Post a Comment