Pages: 1 ... 3 4 [5]   Go Down
Author Topic: Wireless control system problem  (Read 3381 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 192
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is this different to what you said earlier?

Quote
should i just power these servos with the 5v and gnd from the arduino or something else?

Certainly you should have the grounds common. I agree with that. And from the battery I would run a wire to the Arduino's "power in" socket (so it gets voltage regulated). And also direct from the battery to the motor shield.

Sounds OK, subject to seeing a schematic.
I believe it should be something like this?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 192
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So i fallowed this diagram and it works fine smiley one thing with the code is that it is really jumpy and random. The fingers do move when i move mine but there is a weird delay and the servos are pretty much always moving no matter if i flex my hand or not. We are really close!!!
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try increasing the baud rate to 115200 on both sides.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 192
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try increasing the baud rate to 115200 on both sides.
hmmm now nothing is happening. It is still receiving though. Do i need to reconfigure the xbees for 115200?
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd forgotten about them. If you can, yes, if you are talking through them. I found with my robot car that a slow communication rate can make the response to controls a bit sluggish.

For example:

Code:
.123,100,92,42,99/

That's 18 bytes. At 9600 baud (960 characters per second) that would take 18.7 mS to send. Maybe the problem is something else.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 192
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd forgotten about them. If you can, yes, if you are talking through them. I found with my robot car that a slow communication rate can make the response to controls a bit sluggish.

For example:

Code:
.123,100,92,42,99/

That's 18 bytes. At 9600 baud (960 characters per second) that would take 18.7 mS to send. Maybe the problem is something else.
Could it be the delay? should i change that?
Code:
   Serial.print(".");
   Serial.print(servoVal1, DEC);
   Serial.print(",");
   Serial.print(servoVal2, DEC);
   Serial.print(",");
   Serial.print(servoVal3, DEC);
   Serial.print(",");
   Serial.print(servoVal4, DEC);
   Serial.print(",");
   Serial.print(RotationV1, DEC);
   Serial.print("/");
   
   delay(10);
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You and your delays! Yes get rid of it unless you want a 10 mS sluggishness.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also comment-out the debugging prints in the receiving end.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 192
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also comment-out the debugging prints in the receiving end.
That did it! perfect!! im going to see if the client wants the feedback system and ill do the code and post it on here

Thank you so much! I will credit you as much as i can! thank you smiley
Logged

Pages: 1 ... 3 4 [5]   Go Up
Jump to: