View unanswered posts | View active topics It is currently Fri Nov 28, 2014 12:38 am






Reply to topic  [ 1 post ] 
proposal: improvement of the sync Motors Command 
Author Message
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post proposal: improvement of the sync Motors Command
hi,
to my opinion, a better way to synch motors is
Code:
void synchMotors(tMotors m, tMotors s1, int nSynchedTurnRatio); // 2 motors; m=master, s1=slave
void synchMotors(tMotors m, tMotors s1, tMotors s2, int nSynchedTurnRatio1, int nSynchedTurnRatio2 ); // 3 motors; m=master, s1=slave1, s2=slave2,

by this, you could have all control by only 1 command :

Code:
// call:
synchMotors(0,1, 100);
synchMotors(0,1,2, 100, -100);
8)

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Thu Jun 05, 2008 12:47 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.