On Wed, 25 Feb 2009 14:27:00 -0500
Parkurm <[email protected]> wrote:
> I also had the question. "Deluge" will help, If you're using telosb or micaz
> (in TinyOS2). In TinyOS1 Deluge can be used in more types of motes.If your
> mote don't satisfy the condition, then probably you'll have to write code on
> your own, to send data through serial or something to you PC.
>
> Are there're any better solutions? Like command-line tools that read the
> data directly?
Read flash memory in tinyos application is easy.
Include the following head in your source:
#include <avr/pgmspace.h>
then you need to store the data in flash, for example:
unsigned char fsmCode[] PROGMEM = {
31, 0, 6, 107, 2, 6, 116, 3,
6, 195, 1, 27, 10, 6, 131, 4,
6, 164, 10, 1, 19, 113, 24, 0,
16, 20, 130, 2, 18, 3
}
this stores an array of data into flash. PROGMEM is an avr-libc macro
that defines the use of flash space (defined in avr/pgmspace.h)
and for read data:
uint8_t var = pgm_read_byte(&fsmData[offset]);
that stores fsm[offset] into var
any doubt?
you can read avr-libc documentation at
http://www.gnu.org/savannah-checkouts/non-gnu/avr-libc/
There's a lot of libraries we can use in tinyos with atmel based motes
(like mica2, mica2dot, iris, etc....)
cheers
--
Nunca confies en un S.O. del que no tienes código fuente ;-)
--------------------------------
Javier Almansa Sobrino.
Ingeniero Técnico en Informática de Sistemas.
FSF #7032 Member (www.fsf.com)
Grupo de Investigación ARCo.
Escuela Superior de Informática. Ciudad Real
Tel: (+34)926 29 53 00 Ext: 3705
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help