[Tinyos-help] Very strange problem!

AIGroup gruppodinfo at gmail.com
Sun Feb 10 13:27:35 PST 2008


I'm using only one sample to prevent too much computational cost.
I yet have the problem and today I have seen that most of these errors is
caused by automatic cast. If the cast is forced, most of this events don't
occur.
I hope to find a solution very soon!
Thanks for your time

Roberto



2008/2/10, Michael Schippling <schip at santafe.edu>:
>
> Where are you shutting off the LEDs, so you can see them toggle?
> It may be that your SVM code takes so long that you don't see a
> short flash on led2...Which, in general, is a problem because
> it will hog resources and prevent other tasks and (perhaps)
> interrupts from executing.
>
> MS
>
> AIGroup wrote:
> > Hi all,
> >
> > I implemented an algorithm for regression based on SVM.
> > I tested all using Tossim and now I would like to verify the results
> > using a micaz mote.
> > I send the firmware to the mote but I have the following problem:
> > when mote boots with the event (called with Timer0.startOneShot( 250 ) )
> > -----
> > event void Timer0.fired()
> > {
> >     call Leds.led1On();
> >     ComputeSVM();
> >     call Leds.led2On();
> > }
> > -----
> >
> > I see the green led (led1)  toggling!!! (I never see led2On)
> > Why?????
> > I have verified that the problem is inside a function of mine which is:
> > ----
> > long compute_index(long int *binfeature, long int range, long int
> *index)
> > {
> >   int i=0,ii=0;
> > /*THE PROBLEM IS HERE: IF I PUT A NUMBER (e.g. 2) INSTEAD OF range THE
> > STATEMENT for WORKS WELL */
> >   for(i=0;i<range;i++) /* <----T
> >   {
> >     if(binfeature[i])
> >     {
> >        index[ii]=i;
> >        ii++;
> >     }
> >   }
> >   /* THE PROBLEM IS ALSO HERE WITH i AND ii VARIABLES
> >   for(i=0;i<4;i++) { <--------------------
> >     index[ii+i]=-1;
> >   }
> >   return ii;
> > }
> >
> > ------
> > I hope you can help me.
> > Thanks in advance.
> >
> > Roberto
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > Tinyos-help at millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
> --
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080210/098e0b74/attachment.html


More information about the Tinyos-help mailing list