View unanswered posts | View active topics It is currently Tue Jul 29, 2014 2:56 am






Reply to topic  [ 134 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9
1.45..1.40 public: RS485 connection for M/S-muxing? samples? 
Author Message
Expert

Joined: Sun Sep 09, 2007 10:12 am
Posts: 116
Post Re: 1.40 public: RS485 connection for M/S-muxing? samples?
Don't worry, i think his work about multi-threads is almost done...

Meanwhile i gave him some work about BT connection too,

in order to build this library of comunication to BT and RS485

_________________
http://www.apcsguarda.com
My Project: http://www.robotc.net/forums/viewtopic.php?f=15&t=712


Tue Nov 11, 2008 7:17 am
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: 1.40 public: RS485 connection for M/S-muxing? samples?
hi docilio, tiago(ogait),
any news about your project?

Above all, in your code there are 2 things to be improved:
1.) returned values must be int or long, not byte (0..1023 for raw sensor values, -100000...+100000 for motor enc values)
2.) multithreading access to remote motor and sensor access leads to a program abortion or block

_________________
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)}


Mon Nov 24, 2008 5:20 am
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: 1.45..1.40 public: RS485 connection for M/S-muxing? samples?
ogait, docilio,

are you still working on this issue?
It's a long time since you posted to this issue!

For with your RS485 code it's still the same as with your with BT code:

it's still working faulty - do you need any help?
Where is the point where you don't come along?

_________________
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)}


Wed Dec 31, 2008 9:40 am
Profile
Rookie

Joined: Tue Aug 26, 2008 6:53 am
Posts: 13
Post Re: 1.45..1.40 public: RS485 connection for M/S-muxing? samples?
Sorry the time i was absent. The University was occupying much time (that many that docilio might come where with a shotgun because of my lack of response ....)

I have set up a repository for this project where: http://hng.av.it.pt/~tgoncalves/robotc/cgit.cgi/utils/

I think I had resolved the multi task problem with a new library (semaphore/semaphore.c). I Highly suggest it being included in robotc in an appropriated adapted form.

_________________
My sensors and librarys for robotc
http://hng.av.it.pt/~tgoncalves/robotc/cgit.cgi/


Last edited by ogait87 on Tue Jan 20, 2009 12:33 pm, edited 1 time in total.



Fri Jan 16, 2009 9:44 pm
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: 1.45..1.40 public: RS485 connection for M/S-muxing? samples?
hi,
glad to hear that it's going on.. :D
I already feared that there could be unsolvable problems and that it had come to a dead stop ... :?

So good luck, may be post some file to test for us when you'll rather be finished!

cu
Ford

_________________
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)}


Sat Jan 17, 2009 9:17 am
Profile
Expert

Joined: Sun Sep 09, 2007 10:12 am
Posts: 116
Post Re: 1.45..1.40 public: RS485 connection for M/S-muxing? samples?
Here an example of my robot using 2 NXT and 1 Nunchuck:

http://www.youtube.com/watch?v=zIlEmtnaGgI

_________________
http://www.apcsguarda.com
My Project: http://www.robotc.net/forums/viewtopic.php?f=15&t=712


Sat Jan 24, 2009 6:48 pm
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: 1.45..1.40 public: RS485 connection for M/S-muxing? samples?
hello docilio and ogait,
what about the RS485 remote mux project (up to 3 or 4 nxt connected to each other)?
Don't you get it to run ?

plz tell us if you had come to a dead stop, so that other people may try to program it anew!

_________________
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)}


Sun Feb 08, 2009 6:22 am
Profile
Expert

Joined: Sun Sep 09, 2007 10:12 am
Posts: 116
Post Re: 1.45..1.40 public: RS485 connection for M/S-muxing? samples?
Ford, As you know, me and ogait were studying and goting less time for this and for coding.

But, i believe that the code is working for 4 NXT by RS485, and also, I belive that the code is also working by BT (changed by me).

I am working with my team (so, 16 years old kids) that are using the exact same programs that ogait published here.

Everything is going ok...

So, i suggest that you use the code and try it yourself, cause the code is working well (in my opinion).

I created one or two more functions that now allows a different kind of control, but use all others ideas.

By the way, my website is on-line (but on construction) and is NXT4YOU.com

Our first product will be release shortly

_________________
http://www.apcsguarda.com
My Project: http://www.robotc.net/forums/viewtopic.php?f=15&t=712


Sun Feb 08, 2009 6:46 am
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: 1.45..1.40 public: RS485 connection for M/S-muxing? samples?
hi, sry, I didn't hear anything from you to this issue since November (except your link with a nunchuck).

Then you wrote something before, that the multi tasking was still a problem,
and also the polling of 32 bit integer for motor enc and of 16 bit integer for sensor values hadn't been resoved to this point.

Neither did I find your code yet , plz post the source code here (as text files), so that we can copy and paste it.

thx a lot!

_________________
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)}


Sun Feb 08, 2009 9:10 am
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: 1.45..1.40 public: RS485 connection for M/S-muxing? samples?
hello again!
sry that I have to ask again, but I can't find your source codes.
Could u plz publish them here?
thank you!

_________________
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)}


Fri Feb 20, 2009 4:16 pm
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: 1.40 public: how to use RS485 connection? code samples?
mightor wrote:
You need to have a single task governing the transmission and receiving of the information across the line. The master (client) makes a single request at a time to the slave (server) and waits for the reply, if there is one. What you would need to do is have a transmission queue and a receiver queue. One message at a time in either direction, no more. It's not a duplex connection, and even if it were, you couldn't have multiple tasks sending multiple messages directly.


I just had a closer look at John Hansen's sample program that I had listed on the 1st page of this thread, and I guess this is exactly the way John Hansen's NXC program works, using NXC SendMessage and Message Queue commands!

I still am missing those commands in RobotC.
Or is it meanwhile possible to transcode John Hansen's NXC program into RobotC?

_________________
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)}


Sat Apr 25, 2009 12:55 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3164
Location: Rotterdam, The Netherlands
Post Re: 1.45..1.40 public: RS485 connection for M/S-muxing? samples?
Those commands would be quite doable in a library of sorts. I'm a bit tied up with other stuff at the moment, so it's not going to be me :)

Regards,
Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Apr 25, 2009 1:40 pm
Profile WWW
Expert

Joined: Sun Sep 09, 2007 10:12 am
Posts: 116
Post Re: 1.45..1.40 public: RS485 connection for M/S-muxing? samples?
those codes don't continue of that.

they were used on Fire Fighting Robot Contest on one of your robots... It works fine.

The other robot (using RobotC) wons the competition on walking division:

http://www.trincoll.edu/events/robot/Pr ... esults.asp

First Prize
Coracaozinho
APCS GUARDA - Portugal

_________________
http://www.apcsguarda.com
My Project: http://www.robotc.net/forums/viewtopic.php?f=15&t=712


Sat Apr 25, 2009 7:07 pm
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: 1.45..1.40 public: RS485 connection for M/S-muxing? samples?
? what do you mean?
Quote:
those codes don't continue of that.

??? what ????
Quote:
The other robot (using RobotC) wons the competition on walking division:

??? what has this to do with my question? is this off-topic ?!?
Quote:
It works fine

??? what works fine?
??? which codes?

I don't understand what you say.

Please list your codes in code brackets [ code] [ /code]
Code:
//your code

_________________
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)}


Sun Apr 26, 2009 2:10 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 134 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9

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.