...
Progress Update
/start info
We're still looking for parts, but all we need is (1) basic input (more IR sensors) and (2) output (more servo motors). Were looking for motors capable of more than a 180 degree range (limited to 90 degree rotations from the default starting position).
Also, we've been laser-cutting all of our parts for our models up until now, but we're currently looking into 3D-printing hard plastic parts.
Parts Shopping:
Sparkfun: http://www.sparkfun.com/
Mouser Electronics: http://www.mouser.com/
(Also, if you find a part number, these guys can be good.)
*Thanks & Credits to Cyrus for the shopping tips!
Hobby People: http://www.hobbypeople.net/index.php/
A local shop that sells affordable servo motors
A local shop that sells affordable servo motors
*Thanks to Calvin for the additional tip!
Model Photos:
Test Setup:
1) First IR sensor (bottom right) trips multi-rotation loop.
(green LED indicates the first sensor's rotation cycle)
2) Second IR sensor (bottom middle) zeros out rotation to default position.
(white hi-power LED indicates the second sensor's trip status)
Test Code:
#include <Servo.h> // import servo motor’s functions
Servo myservo; // create servo-object
void setup() {
pinMode(2, INPUT); // 2nd IR sensor
pinMode(6, OUTPUT); // hi-power LED
pinMode(3, INPUT); // switch throughput -- piggyback 1st IR sensor
pinMode(4, OUTPUT);// greed LED (set the digital pin 4 as an output)
myservo.attach(9); // assign pin 9 for servo motor
}
void loop() {
// using “if” function to check sensor's value
if(digitalRead(3)==HIGH) {
digitalWrite(4,HIGH);
myservo.write(50); // signal should be between 0-179 (+/- 175 max position) (93 is zero position)
delay(100);
digitalWrite(4,LOW);
delay(1000);
digitalWrite(4,HIGH);
myservo.write(-150);
delay(300);
digitalWrite(4,LOW);
delay(1000);
digitalWrite(4,HIGH);
myservo.write(175);
delay(200);
digitalWrite(4,LOW);
delay(1000);
}
if(digitalRead(2)==HIGH) {
digitalWrite(6,HIGH); // added
myservo.write(93);
delay(200); // added
digitalWrite(6,LOW); // added
}
}
/end info
Development Team:
CYBORGIAN iMITATION (499biomimic-gr.blogspot.com)
ODDiTECTURE (odditecture.blogspot.com)
Team Blog:
Organic Automation (organic-automation.blogspot.com)
No comments:
Post a Comment