There's no tutorial on them, but look in the appropriate .h files and you'll
find the definitions to the macros. For example, try
tos/platform/avrmote/avrhardware.h and then, say,
tos/platform/mica2/hardware.h. 

You probably already figured this out, but you can leverage existing code to
set up your light and temperature sensors if you're using the same sensors
as those on another board. Even if they're not the same you'd want to copy
the mechanisms. 

-kw

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of THIAGO
TEIXEIRA
Sent: Thursday, December 04, 2003 12:05 PM
To: [EMAIL PROTECTED]
Subject: [Tinyos-users] Re: [Tinyos-help] sensorboard.h help

I was wondering if anybody answered this yet. I'm also having trouble
writing a custom sensorboard.h

- Thiago 

--- previous message ---

Hi everyone,

I'm working on a project called Ivy at UC Berkeley; our goal is to make a
multi-hopping data-collecting network of mica2dot motes.

To this end we've build a sensorboard for the mica2dots, and I need to
write a tos/sensorboards/ourboard/sensorboard.h file for it.  I've written
a primitive sensorboard file so far, reproduced here:

/*
 *  lot's o' legal stuff
 */

// LED assignments

TOSH_ASSIGN_PIN(GREEN_LED, C, 1);
TOSH_ASSIGN_PIN(YELLOW_LED, C, 0);

TOSH_MAKE_GREEN_LED_OUTPUT();
TOSH_MAKE_YELLOW_LED_OUTPUT();

TOSH_SET_GREEN_LED_PIN();
TOSH_SET_YELLOW_LED_PIN();

This set of TOSH_* commands sets up the green and yellow LED's on our
sensorboard through Port C (mica2dots only have one red LED).

I also need to do some more complicated stuff, including setting up
temperature and light sensors on the board.  Is there a tutorial
somewhere, or some documentation defining all of the TOSH_*
macros/functions/definitions?

Incidentally, I'm using CVS tinyos, nesc1.1beta1, and avr3.3.

-Ian McKee

_______________________________________________
Tinyos-users mailing list
[EMAIL PROTECTED]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

_______________________________________________
Tinyos-users mailing list
[EMAIL PROTECTED]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

Reply via email to