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@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
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help