Hi Jong,
This is the C++ code that ive been using. It works for acc/gyr/mag. Now i
am testing it on emg:
char arg0 = SET_SENSORS_COMMAND;
char arg1 = (acc << 7)+(gyr << 6)+(mag << 5)
+(ecg << 4)+(emg << 3)+(gsr << 2)
+(ex7 << 1)+(ex0 << 0);
char arg2 = 0;
socket->write(&arg0,1);
socket->write(&arg1,1);
socket->write(&arg2,1);
For the EMG Shimmer Mote when i have all sensors off except the emg (acc
disabled) I get the situation in my previous email with a packet size of 9
bytes including header and timestamp.
I do receive an ack from the shimmer mote after sending the command. When i
request to start the collection of data the data comes correctly at the
frequency i specify.
Much Thanks,
Nick
On Tue, May 15, 2012 at 12:22 AM, Jong Chern Lim <[email protected]
> wrote:
> Hi Nicholas,****
>
> ** **
>
> Could you explain a little more about what you mean by ‘sent the signal to
> enable the acc’? As an example using java (assuming you are using the
> standard serial protocol), the transmitted packet should look something
> like ****
>
> ** **
>
> write(new byte[]{0x08, 0x08, 0x00}); ****
>
> ** **
>
> If you refer to
> http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x-contrib/shimmer/apps/BoilerPlate/Shimmer.h?content-type=text%2Fplain,
> you will see that the first 0x08 is the packet type: Set_Sensors_Command
> and the second 0x08 is SENSOR_EMG. ****
>
> ** **
>
> Were you able to receive an Ack packet after sending the set sensor
> command packet?****
>
> ** **
>
> Regards,****
>
> JC****
> ------------------------------
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Nicholas Hosein
> *Sent:* 14 May 2012 23:16
> *To:* [email protected]
> *Subject:* Re: [Shimmer-users] EMG Packet Question****
>
> ** **
>
> In addition the data doesnt seem to change with stimulus from the muscle.*
> ***
>
> On Thu, May 10, 2012 at 2:09 PM, Nicholas Hosein <[email protected]>
> wrote:****
>
> So i currently have acc/gyr/mag working and was adding emg support to my
> C++ program. I sent the signal to enable the acc/emg (bit3 = 1 ). I then
> receive 9 bytes from the shimmer = 1 header, 2 timestamp, 6 data.****
>
> ** **
>
> My question is why does the emg have 6 bytes of data? The accelerometer
> has x,y,z so 6 bytes makes sense but the emg is just one signal?****
>
> ** **
>
> Thanks,****
>
> ** **
>
> Nick****
>
> ** **
>
_______________________________________________
Shimmer-users mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users