FLUSHINGXBEES
I keyed that arduino to only respond to FLUSH:1
Working on the netduino + xbee to run my hottub.
Problem is the control hut is well outside of my normal xbee range..
Solution? add a netduino + xbee in the middle so it can repeat my SPA: commands.
This library works great... my own attempts at handling this were getting bit chopped somehow.
I was getting the buffer problem while testing my repeating code.. set buffer to 9000, commented out the throws.. still would exception out after a couple repeats.
then I found the issue.
comment out the sleep in this method.. everytime it would throw an exception, the bytesrecieved would be 0. I'm guessing anything sent during the sleep caused it.
I've beaten on the code with a terrible loop. it seems fine now. "while true; do echo "SPA:1" >> /dev/cu.usbserial-A800f3ac; done"
public void PrintClear() { byte[] bytesToSend = new byte[2]; bytesToSend[0] = 254; bytesToSend[1] = 1; serialPort.Write(bytesToSend, 0, 2); // Thread.Sleep(500); // LCD is slow, pause for 500ms before sending more chars }