MaxStream Xbee code development.

scottmcleod@gmail.com's icon

Ladies and gents... it seems that MaxStream's wireless Xbees have built in A/D converters.

Low cost 100m wireless units that run off of almost no voltage. Perfect for use in wireless Max/MSP constructions.

That article has the details. Me being a COMPLETE n00b, this will probably take me a week or two to develop into something that works.

Until then, if anyone else wants to jump on this, just keep me up to date?

scottmcleod@gmail.com's icon

I've determined that each frame of data would look roughly like this:

7E 00 1C 83 56 78 22 00 01 7E 00 00 00 03 FF 00 00 03 FF 00 00 03 FF 77

... does anyone know how to deconstruct a hex string like this? I've tried a few different things in max, but it keeps stripping the zeroes off of the data when there's a 0 in front of something.

Peter Castine's icon

On 31-Jan-2007, at 15:18, ScottMcLeod wrote:

> 7E 00 1C 83 56 78 22 00 01 7E 00 00 00 03 FF 00 00 03 FF 00 00 03
> FF 77

Those are just numbers represented using hexadecimal notation. In
decimal, which is what Max uses, that would be

    126 0 28 131...

You need to read up on hexadecimal numbers. Check out Wikipedia.

-------------- http://www.bek.no/~pcastine/Litter/ -------------
Peter Castine +--> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de

scottmcleod@gmail.com's icon

Ah, so there's no objects in max that handle hex? That would be why it wasn't taking it...

I know how to convert hex to decimal.

José Manuel Berenguer's icon
scottmcleod@gmail.com's icon

Thanks Jose!

That got me started, it looks like it's working! I'm still trying to understand a few of your techniques in the list-breaking apart and reassembly, but I can figgure it out on my own, with time.

Man, that ZL tool is essential to understand eh?

crub's icon

looks like jose's post/patch got lost in the forum bitbucket... can anyone repost it? or any other patches that deal with xbee api strings?

seejayjames's icon

maybe look to [spell] or [sprintf] and try to get the two hex values separately, then do your conversion based upon what's there.

ran into this a lot dealing with serial data to DMX devices, it took awhile to get the objects to behave, but it's possible... and yes you have to deal with Max stripping off zeroes if it thinks it's an int. [tosymbol] might help preserve some of these?