I am trying to read the XML data from a current cost CC128.
I have used the supplied SoftwareSerial example to read the raw data on my Arduino Pro Mini.
This example code is in the public domain.
*/
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
Serial.println("CC128 Test!");
// set the data rate for the SoftwareSerial port
mySerial.begin(57600);
}
void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}
The data returned looks like this.....
<íóç><óòã>ÃÃ128-ö1.24</óòã><äóâ>00990</äóâ><ôéíå>09:25:14</ôéíå><ôíðò>22.5</ôíðò><óeîóïò>0</óåîóïò><éä>00705</éä><ôùðå>1</ôùðå><ãè1><÷áôôó>00214</÷áôôó></ãè1></íóç>
It should look something like this....
CC128-v1.180143400:43:0518.700227610000000746
So I am getting the decimal numbers, its just the characters that are gibberish.
Can anyone help me with this? I'm sure it will be a quick fix.
I have tried all different baud rates to no avail. The CC128 spec is for 57600 baud.
I`m not sure if this is a translation issue with the SoftwareSerial lib I am using however I can not find any other mentions of this sort of issue.
Cheers,
Ben