Communicating via RS485

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Communicating via RS485

Post by mattallen37 »

Hey alphasucht, it's not at all a disgrace to make a mistake like that. You live and learn. We all make those "stupid newb" mistakes.

Glad to hear that it is working!
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Communicating via RS485

Post by HaWe »

I tried it passing both arrays[100] of char and also single values of strings, floats, long ints, and arrays of ints, but I don't get it working
- maybe because I don't understand how to pass values different from single chars and how exactly to address different NXTs
(with 2 own NXTs and 2 borrowed NXTs I temporarily have overall 4 NXTs to test)
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Communicating via RS485

Post by mattallen37 »

RS485 buffers are 64 bytes. Each char or byte are is the same number of bytes (obviously), a string is length plus one bytes, an int is two bytes, and a float and long are four bytes.

BTW, this is an old thread, and my RS485 library included in this thread is an old one that I will not provide support for anymore.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Communicating via RS485

Post by HaWe »

of course I know all of this but it doesn't work nevertheless.
For a bigger project we need to send several integers, longInts, several (i.e., six) 2-dim arrays of char, and multiple motor-direct-commands all-at-once or on demand.
momis99
Posts: 1
Joined: 22 Nov 2012, 18:54

Re: Communicating via RS485

Post by momis99 »

I don't want to interrupt you by discousing this, but i'd also like a trouble-free communication protocoll via rs485 and bluetooth for NXC. In our German Bourd, we are working on a thing where we need both of this.
alphasucht
Posts: 10
Joined: 27 Dec 2011, 14:30

Re: Communicating via RS485

Post by alphasucht »

momis99 wrote: but i'd also like a trouble-free communication protocoll via rs485 and bluetooth for NXC.
The same for me please! :)
matzzn
Posts: 10
Joined: 29 Nov 2011, 17:51

Re: Communicating via RS485

Post by matzzn »

but i'd also like a trouble-free communication protocoll via rs485 and bluetooth for NXC.
same here
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 3 guests