I am exploring serial communication using the arduino, and so far I haven't had too many problems. Till now at least. I'm using an external module for reading a capacitance(the module is an DN060-02v04 from JYETech) and it's supposed to transmit automatically a lot of information about its readings. According to the documentation that came with it, it transmits in 8-n-1 format at 38400bps fixed. Simple enough, I am using SoftwareSerial and have the baud rate set correctly. I am supposed to get a string of bytes representing ascii characters, however the numbers I get back don't really seem to correspond to anything usable. I'm thinking maybe the arduino is trying to read in 7-e-1 format, but I'm not sure because I can't find any information about it. I could also be doing somethign else wrong, but I really can't think of anything. So the actual question: Does the arduino communicate using 8-n-1 or 7-e-1?
More details: I am using an arduino UNO, running on linux, and using arduino version 1.0 to program it.
EDIT: Source code:
#include <SoftwareSerial.h>
// rx tx
SoftwareSerial capSerial(2, 13);
int tmp;
int next;
void setup()
{
capSerial.begin(38400);
Serial.begin(38400);
}
void loop()
{
if (capSerial.available() > 0)
{
tmp = next;
next = capSerial.read();
Serial.print(next);
Serial.print('\n');
}
}