View unanswered posts | View active topics It is currently Fri Aug 29, 2014 12:52 pm






Reply to topic  [ 134 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next
1.45..1.40 public: RS485 connection for M/S-muxing? samples? 
Author Message
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?
hi to all!
may I just remind to my thread opening question?
Is there meanwhile a solution in sight?
Ford Prefect wrote:
where can I find code samples for a fast RS485 connection between 2 nxt for
- controlling 3 motors at the nxt slave
- reading sensor values of the nxt slave (all kinds: motorEncoder, Touch, ultrasonic, lightactive, HTCompass etc.)
:?:
I'm using 1.40 public

_________________
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 Sep 28, 2008 9:26 am
Profile
Rookie

Joined: Sat Apr 12, 2008 11:09 am
Posts: 49
Location: holland
Post Re: 1.40 public: how to use RS485 connection? code samples?
Hi Ford,

In my opinion a RS485 connection is just a connection between a lot of controllers, sending only data, with or without a master.
It is up to the user what the robot does with this data.

On this thread are some code samples, including my own, whitch can do this.

Creating a program whitch can do almost everything, like running motors with speeds and encoder targets, reading and writing to i2c sensors, will get a lot of data beiing send and taking a lot of CPU time, whitch results in a slow connection, when you are using more bricks.

Regards


Mon Sep 29, 2008 2:01 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?
hi,
I think you are wrong.
If you don't send or poll at any time, the RS485 data transfer won't need much cpu time.
I'm sure this type of bidirectional communication can be made, though it surely won't be trivial.

_________________
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 Sep 29, 2008 2:59 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?
@Dick Swan:
Hello,
sorry if I have to ask again, I still didn't understand your intentions:
Dick Swan wrote:
I was thinking of something along the lines of the existing Bluetooth mailbox messaging scheme except over RS-485. The higher level functionality is providing a message based interface.
One application that I've thought about is using a slave NXT as a motor and sensor expander.

Because Bluetooth is far too slow to read sensors and motor encoders, a fast RS485 sending/receiving mode is needed.
What exactly are your plans for the implementation of RS485 in order to use a 2nd brick as sort of motor and sensor expander?

_________________
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 Oct 04, 2008 7:04 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3196
Location: Rotterdam, The Netherlands
Post Re: 1.40 public: how to use RS485 connection? code samples?
He is not talking about using BT to send messages. He is saying to use the same comms scheme as used by the BT system where messages are sent to mailboxes which are then read by the recipient.

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 Oct 04, 2008 7:41 am
Profile WWW
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?
thx, I misunderstood this.
So here my (new) question:

@Dick Swan:
Hello,
sorry if I have to ask again, I still didn't understand your intentions:
Dick Swan wrote:
I was thinking of something along the lines of the existing Bluetooth mailbox messaging scheme except over RS-485. The higher level functionality is providing a message based interface.
One application that I've thought about is using a slave NXT as a motor and sensor expander.

A fast RS485 sending/receiving mode maybe like bluetooth is needed.
Quote:
EDIT:
Not to be misunderstood:
I don't want the "native" RS485 to be changed to anything else -
I want an additional RS485 TCP for remote control of other nxt's, as a special application to use this.
Other applications may use the native RS485 for other reasons, sure.

What exactly are your plans for the implementation of RS485-TCP in order to use a 2nd brick as sort of motor and sensor expander?

_________________
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 Oct 04, 2008 7:47 am
Profile
Rookie

Joined: Wed Oct 08, 2008 4:14 am
Posts: 8
Post Re: 1.40 public: how to use RS485 connection? code samples?
@ docilio,
@ ogait,
@ Dick Swan:

I'm also highly interested in using this mux feature (by RS485 as well as by BT):
what about your code you promised to develop? :roll:


Wed Oct 15, 2008 12:19 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?
docilio wrote:
Ogait will read it and after it could create the end file...
what he created till now was a way to things work (they talk), not a way to share motors or sensors...
In some days, a final or beta version will be write...


yes, docilio and ogait: any news about this?

_________________
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 Oct 15, 2008 4:30 pm
Profile
Expert

Joined: Sun Sep 09, 2007 10:12 am
Posts: 116
Post Re: 1.40 public: how to use RS485 connection? code samples?
sorry about that...

university is killing us...

as soon as possible, we will publish more...

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


Wed Oct 15, 2008 5:26 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?
you seem to have a lot of ideas (RS485 network, Bluetooth network, hardware development like multiplexers) but all I can see are those announcements. :poke:

What do you think if you better made less announcements and more improvements? :?
Mabe you could take the BT network as a first project to be finished?

_________________
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 Oct 16, 2008 4:19 am
Profile
Expert

Joined: Sun Sep 09, 2007 10:12 am
Posts: 116
Post Re: 1.40 public: how to use RS485 connection? code samples?
yes, you are probably right...

My main priority is university. My second priority is my robotics team.

On my team, all that i am trying to do it would be very usefull. So, if i can do it, it is very good to me too...

I study in a diferent city of Ogait, and also in a diferent city of my team workspace, so only on weekends i could work with NXT.

I really need to have that thing on BT, but it's not easy.

It's not just say, "i will create the code today" and do it like that. If it's easy after is created, before needs work, so please don't rush me...

So, whenever it's finished, you and robotc forum would be the first to know it.

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


Thu Oct 16, 2008 4:44 am
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?
ok, I can completely understand your point, no question about this.

But then it's better if you made no announcements that you or Tiago will do that kind of work.
If you can't do it by now or close to now ( and I can fully understand that ) it was better if you announced NOTHING UNTIL you've done it.

BTW: My last request was primary addressed to the RobotC developers

Ford Prefect wrote:
@Dick Swan:
Hello,
sorry if I have to ask again, I still didn't understand your intentions:


- I appreciate if also anybody else wants to do the job, but if he takes the efforts, he should do it promptly. Otherwise he wastes the time of all the others.

_________________
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 Oct 16, 2008 5:13 am
Profile
Rookie

Joined: Wed Oct 08, 2008 4:14 am
Posts: 8
Post Re: 1.40 public: how to use RS485 connection? code samples?
I also appreciate the developers to establish a fast RS485 or at least a simply usable Bluetooth network for motor and sensor multiplexer functionality.
In NXT-G there are simple blocks, such thing should be available by RobotC macro commands, too.


Thu Oct 16, 2008 9:24 am
Profile
Expert

Joined: Sun Sep 09, 2007 10:12 am
Posts: 116
Post Re: 1.40 public: how to use RS485 connection? code samples?
yes, GWingz, that's the idea, but in spite of being a simple idea, it's not easy to create it...

Asap will be here...

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


Thu Oct 16, 2008 9:30 am
Profile
Rookie

Joined: Wed Oct 08, 2008 4:14 am
Posts: 8
Post Re: 1.40 public: how to use RS485 connection? code samples?
if you don't have the time, docilio:

@Dick Swan: could YOU plz make it quickly available?


Thu Oct 16, 2008 1:48 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 134 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next

Who is online

Users browsing this forum: KeesSmit 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.