Hi, In the beginning, i have to warn you that you should understand what you did. Assume you have X and Y sensors. 1. modify this part in OsciloscopeM.nc; uint8_t packetReadingNumber; uint16_t readingNumber; TOS_Msg msg[2]; uint8_t currentMsg; to, uint8_t XpacketReadingNumber; uint16_t XreadingNumber; TOS_Msg Xmsg[2]; uint8_t XcurrentMsg; uint8_t YpacketReadingNumber; uint16_t YreadingNumber; TOS_Msg Ymsg[2]; uint8_t YcurrentMsg; And you have to modify whole code in OscilloscopeM.nc to differentiate the X and Y sensor readings and their reading numbers. 2. In OscilloscopeM.nc file, double the task named dataTask as XdataTask and YdataTask. For XdataTask, assign channel 1 and for YdataTask assign channel 2. (Of course you can change the numbers.) task void XdataTask() { struct OscopeMsg *pack; atomic { pack = (struct OscopeMsg *)msg[currentMsg].data; packetReadingNumber = 0; pack->lastSampleNumber = readingNumber; } pack->channel = 1; pack->sourceMoteID = TOS_LOCAL_ADDRESS; 3. When you read X sensor and Y sensor, call XdataTask and YdataTask respectively. 4. You have to double the ADC interfaces in OscilloscopeM.nc (If you sample X and Y sensor readings from ADC) interface ADC as ADC1; interface ADC as ADC2; 5. Combine them ADC1 and ADC2 interfaces to appropriate ADC channels in Oscilloscope.nc It needs more dealing and if you don't understand the modification, it gets confusing. I am looking forward to hearing good news. Enjoy the day,
Firat TARAKTAS Electrical&Electronics Engineer Reseracher GENETLAB INFORMATION TECHNOLOGIES Kayisdagi Caddesi Kar Plaza D Blok Kat:3 34752 Icerenkoy / ISTANBUL / TURKIYE Phone: +90 (216) 573 00 85 (int.354) Fax: +90 (216) 469 85 07 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> www.genetlab.com <http://www.genetlab.com/> ________________________________ From: Ferry Cialis [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 22, 2007 9:28 AM To: Firat TARAKTAS Cc: Tinyos-help@millennium.berkeley.edu Subject: Re: [Tinyos-help] Oscilloscope single mote multiple channel display Hi, thanks for the help! I'm currently using TinyOS-1.x though, I'm still learning nesC and need more detailed explanations on how to assign different channel numbers to each sensor. Where exactly do I alter/add these channel numbers ? Thanks On 5/21/07, Firat TARAKTAS <[EMAIL PROTECTED]> wrote: Hi, If you use TinyOS-1.x, you can achieve it with assigning different channel numbers to each sensor. Oscilloscope application shows the mote id and channel to eparate each sensor readings. If you use T2, i wonder the answer and i want to know it. Because in osilloscope application, there is no channel number. Firat TARAKTAS Electrical&Electronics Engineer Reseracher GENETLAB INFORMATION TECHNOLOGIES Kayisdagi Caddesi Kar Plaza D Blok Kat:3 34752 Icerenkoy / ISTANBUL / TURKIYE Phone: +90 (216) 573 00 85 (int.354) Fax: +90 (216) 469 85 07 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> www.genetlab.com <http://www.genetlab.com/> ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ferry Cialis Sent: Monday, May 21, 2007 11:44 AM To: Tinyos-help@Millennium.Berkeley.EDU Subject: [Tinyos-help] Oscilloscope single mote multiple channel display Hello, I'd like to know whether it is possible for Oscilloscope java application to display multiple sensor readings from a single mote? For instance, I have a sensor board which has accelerometer-x, accelerometer-y and temperature sensors. The sensor board is mounted onto a single mote. Can the Oscilloscope application display multiple sensor channels from the setup? I've tried displaying multiple channels before but it requires multiple motes, each mote corresponding to one channel but it's not efficient and quite wasteful to have many motes if I can use just one mote to display multiple readings. Thank you
_______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help