Go Down

Topic: Need some help for a science project. (Read 11201 times) previous topic - next topic

Falchion

This is all so confusing, but it has to get done...
Robots are cool.

PeterH


This is all so confusing, but it has to get done...


After seven pages I've lost track of what you have got working, and where you're stuck.

What's the current problem?
I only provide help via the forum - please do not contact me for private consultancy.

Falchion

It's cool. Here's where I am right now... I built the hand itself, but I need to get multiple servo's running at once, so I can tie the strings on the fingers into the holes in the servo motor and I'm having some trouble getting 1 to run on external power.
Robots are cool.

JimboZA


I'm having some trouble getting 1 to run on external power.


Here's my suggestion then:

1- Put DuaneB's multi servo sketch aside for now.
2- Reload sweep, which I think u said was working before?
3- Carefully check the wiring* of the one servo, your Fritzing pic showed you had the red and black confused. Keep the Arduino powered from the PC...
4- Run sweep to verify that the servo runs from external power.
5- Then and only then, edit sweep along the lines of my suggestion many posts back, to have a second servo ("myOtherServo" for instance) on another pin and run that new sketch to verify two servos

Then we'll talk some more...

* wiring is battery +ve to servo red, -ve to servo black and also Arduino ground, yellow / orange to Arduino pin to which servo is attached in sketch. Check the voltage is what the servo needs, probably 4.8 to 6, not the 9 you were using
Arduino ethernet server here.... http://jimboza.gotdns.com:8085/

No PMs for help please

JimboZA

Something along the lines of the Fritz attached
Arduino ethernet server here.... http://jimboza.gotdns.com:8085/

No PMs for help please

JimboZA

And two would be thus....

Make sure the yellow wires go to the pins you attach the servos to in the skecth
Arduino ethernet server here.... http://jimboza.gotdns.com:8085/

No PMs for help please

Falchion

Will a battery holder that can hold 6 batteries work with only 4 inside?
Robots are cool.

AWOL

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Falchion

Robots are cool.

retrolefty


Will a battery holder that can hold 6 batteries work with only 4 inside?


Only if you jumper out the two empty spaces with a soldered jumper wires, or find solid brass rods of the same size as the batteries to use as 'dummy cells'.

Lefty

Falchion

Hmmm... I got one servo running from external power on pin 9, but the code I tried to write (newbie programmer here) doesn't seem to work. I looked at the reference library on the Arduino website too.
Robots are cool.

AWOL

Quote
, but the code I tried to write (newbie programmer here) doesn't seem to work

That's sad.
(Hint)
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Falchion

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
                // a maximum of eight servo objects can be created

int pos = 0;    // variable to store the servo position

void setup()
{
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}


void loop()
{
  for(pos = 0; pos < 180; pos += 1)  // goes from 0 degrees to 180 degrees
  {                                  // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for(pos = 180; pos>=1; pos-=1)     // goes from 180 degrees to 0 degrees
  {                               
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
}
Robots are cool.

AWOL

OK, so what does it do that it shouldn't and what doesn't it do that it should?
Code tags would be good too.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Falchion

It doesn't move at all when I upload it.
Robots are cool.

Go Up