Are you using the drivers from tinyos-2.x-contrib/mts4x0? Janos
On Fri, Oct 30, 2009 at 5:25 AM, Flavio Frattini <[email protected]> wrote: > Hi all, > > > > i’m trying to read data from accelerometer of a mts420 sensorboard; ther’s > my code: > > > > > > components new SensorMts300C(); > > > > App.AccelX -> SensorMts300C.AccelX; > > App.AccelY -> SensorMts300C.AccelY; > > > > _________________________________________________________ > > > > uses interface Read<uint16_t> as AccelX; > > uses interface Read<uint16_t> as AccelY; > > > > … > > > > event void AccelX.readDone(error_t result, uint16_t val) { > > > > axmsg = (AccelXMsg*)(call Packet.getPayload(&msg, > sizeof(AccelXMsg))); > > axmsg->val = val; > > if (call AccelXMsgSend.send(AM_BROADCAST_ADDR, &msg, > sizeof(AccelXMsg))==SUCCESS) call Leds.led1Toggle(); > > else call Leds.led0Toggle(); > > > > } > > > > It doesn’t work! > > > > Please, can someone help me showing how to read accel data from my > sensorboard. > > > > Thanks a lot > > > > > > > > _______________________________________________ > 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
