Hello, I need help with the configuration of new buttons added to a mote. I am working with telosb and I have inserted four new buttons (like UserButton) with the inputs of the expansion connectors: GIO0, 1, 2 and 3 and I want to work with them like the UserButton does. I need to know what code lines are necessary to make operate these new buttons with these inputs, since I am using a program called "UserInterface" that only use MSP430InterruptC but it is not enough. It makes: UserInterfaceM.UserInterrupt -> MSP430InterruptC.Port27; and I assigned my new button: TOSH_ASSIGN_PIN(BUTTON_NEW, 2, 1); (Port 2,1 is GIO1) and I changed Port27 with Port21 but it does not work.
I thought I need to especify the direction of the port in /telosb/hardware.h with: TOSH_MAKE_BUTTON_NEW_INPUT(); TOSH_SEL_BUTTON_NEW_IOFUNC(); but I can't get any changes in the leds with the events of this new button. Also, I was looking at "UserButtonC and UserButtonM" and I changed the code with: call UserInterrupt.disable(); call UserIO.makeInput(); call UserIO.selectIOFunc(); call UserInterrupt.clear(); call UserInterrupt.edge(FALSE); call UserInterrupt.enable(); but the result is the same than before. What have I got to insert in the code? Any suggestion? Thanks so much, Pedro
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
