Hi, I have just created a Java GUI to send a random integer to a mote. When the user types a value on the text box and presses send button the mote must receive the value and blink the LED. (This was my idea) .. I used the TestSerial.java as a reference to communicate with the serial port and send the integer value that is typed in the text box. Now the communication part work correctly. the number is being received properly and the led blinks.
But the problem is,, in the TestSerial.java the thread sleeps for 1000ms. so the value is sent every second. So, in my case, the value that is in the text box is sent every second to the node. But i dont want this to happen. so, if i remove this thread.sleep(1000) ,, the value is being sent continuously without a break. But, I only want the value to be sent when i press the send button. Could someone help me with this ? Another question is,, i am able to send only one integer at a time using the method set_counter. I would like to know if its possible to send an array of integer using this java application.. Since the parameter of the method set_counter(int value) is defined in TestSerialMsg.java, which is made externally, without the user control, i was not sure of, as how to modify this method to send an array of integers.. Could someone help me with this too ? I am quite new to nesc programming. Thank you very much, Regards, Venkat.
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
