Hello everyone,
I have some questions about the exercise of lesson 3 of the tutorial. I wrote the code below bt it gives me so many errors. Can't we have a task implemented within another task? And when it says to post itself, it means to have: post processData(); inside the task void processData(). Can you please help me figure out how to do it and also understand how tasks work?

task void myTask(){
   int16_t i, sum=0;
   i = 0;
task void processData()
{

   atomic {
      if (i < size){
         i ++;
         sum += (rdata[i] >> 7);
      }

   post processData();
   }
display (sum >> log2size);

}

Also when I run the SenseTask without modifying it, the LEDs were counting in light from 000 to 111. And when it was dark the value changed and then in light they counted from that value back to 111. Is that correct? Please give me some hints on what's happening.

Thank you very much,
Xenia Economidou

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to