Richard If you are using Matlab, you might find the 'typecast' and 'swapbytes' functions useful. regards Chris
> Date: Mon, 13 Jun 2011 15:24:19 -0400 > From: [email protected] > To: [email protected] > Subject: [Shimmer-users] Bluetooth + JFATLogging > > Hi, > I'm working with the shimmer ECG module and trying to add bluetooth > functionality to JFATlogging. I'm getting the data stream through > fread in matlab and converted it to uint8 as such: > > 6 201 4 203 7 226 7 0 8 0 > 6 220 4 225 7 215 7 7 8 0 > 6 195 4 214 7 222 7 253 7 0 > > which presumably are 5 channels split into two bytes each (7&8th > column being ECG). So i'm just multiplying the 7th column by 256 and > adding it to the 8th, which is the same operation as the > shimmerconnect code, however the data looks much wonkier than if I > just plotted the 8th column alone. Any ideas on how to process these > numbers? > Also, I'm calling bluetooth.write after every DMA0transferdone, which > may or may not take place depending on send_ready being reset in > bluetooth.writedone, which seems to cause the data to be sent in > irregular intervals (I've excluded the timestamp in the datapacket)? > > Lastly, just a general serial port question: every time I call fread > to take in a stream of say 1000 numbers, is it the next 1000 numbers > from the last time i called fread, or is it the 1000 currently being > transfered as soon as I called fread? > > Thanks, > Richard > > _______________________________________________ > Shimmer-users mailing list > [email protected] > https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users
_______________________________________________ Shimmer-users mailing list [email protected] https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users
