I am using the prototyping board PBMCUSLK.
The data I am trying to receive looks like this on hyperterminal (at 115200 bps, 8-N-1)
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,TS=56608
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,TS=57536
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,TS=58752
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,TS=59520
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,TS=60416
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,DB=47,DR=1421,TM=1971,TS=61408
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,DB=41,DR=1248,TM=1606,TS=62208
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,DB=42,DR=1289,TM=1695,TS=63392
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,DB=51,DR=1552,TM=1958,TS=64480
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,DB=51,DR=1555,TM=1769,TS=65536
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,DB=77,DR=2327,TM=2541,TS=66400
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,TS=67776
VR=2.0,ID=01:8b:a2:a2:06:00:00:95,SP=BEACON-1,DB=374,DR=11244,TM=11650,TS=68928
Every line has a section, DB = xxx. This is a distance measurement from the "listener" device to a beacon, which sends out an ultrasound and RF signal (the Cricket 2.0 system from MIT/crossbow). I need to get three distance readings (from 3 different beacons) and do trilateration to find the co-ordinates of the listener. This is what the hcs12 is intended for. The only problem is that I can't properly interpret the data coming in. I would know what to do if the "temp2" variable held the characters like 'V' and 'I' and 'D' ... clearly following what the input data is supposed to look like. However, I don't think it is being interpreted/translated properly for some reason.
I've attached a zip file of the project.
Message Edited by t.dowe on 2009-10-21 12:15 AM