I am reading the TestUart0 example code from moteiv website, but I did not find any clue how to read data from a connected sensor/device. I noticed
 void sendMessage() {
    if (call SPSend.send(&m_spmsg, &m_tosmsg, TOS_BCAST_ADDR, 2) == SUCCESS) {
      call Leds.greenOn();
    }
  }
Here m_spmsg, m_tosmsg never get modified with data from UART0.
 
My goal is to read 100 bytes data from an external GPS device (which is connected through UART0 -- PS: is it a right choice??), should I write something like the following? If so, how to write with UART0?
 
async event uint16_t*  UART0.dataReady(uint16_t *buf, uint16_t length). // like in HamamatsuM.nc 
 
 
Please advice!
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to