Hi

I've been working with a driver for the sht11 on MTA300, adapted from TelosB by 
Javier Almansa Sobrino. I'm using it in an IRIS mote.

It seems to be reading the sensor; my next step was trying to print some values 
with printf.

The problem is that if I add (just add, commented in the code) CFLAGS 
+= -I/opt/tinyos-2.x/tos/lib/printf to the makefile the red blinks!!!!

It seems that some code in the printf  library just creates the problem, but 
I'm not so sure...

Regards,

André

_______________________________________________________________________
event void Boot.booted() {
    call Timer.startPeriodic(SAMPLING_FREQUENCY);
  }

  event void Timer.fired()
  {
    call temp.read();
  }

  event void temp.readDone(error_t result, uint16_t data)
  {
    switch ( result ) {
      case SUCCESS:
        call Leds.led1Toggle(); //green
 //printf("Temp = %u\n", data);
 //printfflush();
      break;
      case FAIL:
        //An error occur reading the sensor
        call Leds.led0Toggle(); //red
      break;
      default:
        call Leds.led2Toggle();
    }
___________________________________________________
  ----- Original Message ----- 
  From: Varun Jain 
  To: Anh Dung Vu ; [email protected] 
  Sent: Thursday, July 09, 2009 5:56 AM
  Subject: Re: [Tinyos-help] (no subject)


  Hi,

  You can have a java application to read what comes into the coordinator and 
then connect to probably a database like MySQL. There are so many examples for 
java application in TinyOS in the apps section. 

   

  The other way that you can write the received data to a text file is by using 
the 'Listen' or 'MsgReader' something like:

   

  java net.tinyos.tools.Listen > coordinator.txt

  OR

  java net.tinyos.tools.MsgReader CoordinatorMsg > coordinator.txt   (where 
Coordinator Msg is the message you generate in your java application)

   

   

  Cheers,

  Varun Jain

   

  From: [email protected] 
[mailto:[email protected]] On Behalf Of Anh Dung Vu
  Sent: Wednesday, 8 July 2009 10:09 PM
  To: [email protected]
  Subject: [Tinyos-help] (no subject)

   

  Hi all!
   
  I'm a new member in WSN, NesC and TinyOS, I used Hmote from hybus company in 
Korea. I wrote a basic program to send and receive between 2 device 
(coordinator and common node), but now I have problem, I don't know how to save 
or transfer information what coordinator received to txt file using NesC 
programming. If anyone have some suggestion or answer for this thing, please 
let's me know. I really need some help. Thanks in advance. Please help me in a 
basic step with txt file.


------------------------------------------------------------------------------

  Windows LiveT: Keep your life in sync. Check it out!



------------------------------------------------------------------------------


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

Reply via email to