Hi everyone! I have a problem with the TinyOS printf Library for TOS 2.11.
When I run the TestPrintf app in "tinyos-2.2.2/apps/tutorials/Printf" on my
Iris mote it works, but then when I make a FOR-loop it seems like the
printfflush() command doesn't work, nor does the auto-flush work. The
program just stops printing out text like if the buffer is full. Any
thoughts why ?
I have also made a program where one LED blinks to indicate that the node is
alive, and it blinks even after the printf() command seem to crash , so I
don't think the node has crashed ?!?!
Regards
Anders T.
Norwa*y
Terminal output:*
test@test-laptop:~/Dropbox/Ubuntu/TinyOSWorkspace/Printf/src$ java
net.tinyos.tools.PrintfClient -comm serial@/dev/ttyUSB1:iris
Thread[Thread-1,5,main]serial@/dev/ttyUSB1:57600: resynchronising
Hi I am writing to you from my TinyOS application!!
Here is a uint8: 123
Here is a uint16: 12345
Here is a uint32: 1234567890
Hi I am writing to you from my TinyOS application!!
Here is a uint8: 123
Here is a uint16: 12345
Here is a uint32: 1234567890
Hi I am writing to you fro
*
MAKEFILE:*
COMPONENT=TestPrintfAppC
CFLAGS += -I$(TOSDIR)/lib/printf
CFLAGS += -DPRINTF_BUFFER_SIZE=250
include $(MAKERULES)
*TestPrintfAppC.nc*:
#include "printf.h"
configuration TestPrintfAppC{
}
implementation {
components MainC, TestPrintfC;
TestPrintfC.Boot -> MainC;
}
*TestPrintfC.nc:*
#include "printf.h"
module TestPrintfC {
uses {
interface Boot;
}
}
implementation {
uint8_t dummyVar1 = 123;
uint16_t dummyVar2 = 12345;
uint32_t dummyVar3 = 1234567890;
uint8_t iterator = 0;
event void Boot.booted() {
for(iterator;iterator<10;iterator++){
printf("Hi I am writing to you from my TinyOS application!!\n");
printf("Here is a uint8: %u\n", dummyVar1);
printf("Here is a uint16: %u\n", dummyVar2);
printf("Here is a uint32: %ld\n", dummyVar3);
printfflush();
}
}
}
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help