|
Sending ASCII characters through cRio serial port
I've been having tons of trouble getting the cRio to communicate to my arduino board through serial. My goal is to send three comma separated values in an ASCII string. Then the arduino will wait for a new line (ASCII decimal 10) and it will use the parseint function to find the three values. I know that the program on the arduino is working because i can use a basic stamp 2 to generate an ASCII string of 1,2,3 then a new line/line feed and the arduino will send me a confirmation message and read back the values on another serial port controlled by the software serial library. I am using a max232 ic to change the rs-232 voltage to ttl. I can see on my oscilloscope that the max232 is doing the right thing when it is connected to the crio and that the serial connection idles in the high state. Whenever I try to send data from the crio to the arduino the data sent cannot be read as an ASCII string of comma separated values. I am using the serial vi's in labview. My labview code uses a vi (I forget what it's called-it looks like two cylinders with a plate in between), which converts decimals into ASCII characters. I can probe the data and see that the output of the string concatenate vi has a 1,2,3 like I wanted. I originally thought that labview was properly sending the the numbers but not the new line ASCII code, but the problem shows up on the oscilloscope. The working output from the basic stamp is about ten times shorter than the output from labview. Does anybody know a way to get the crio serial port to output ASCII characters or another easy way to have the arduino and crio communicate?
Last edited by apples000 : 25-08-2012 at 19:23.
Reason: Typo
|