Hi
I'm quite new to Arduino and even newer to Gobetwino.
I'm trying to read a RFID card and send the ID number to file via Gobetwino. I'm getting the numbers over, however, I'm also getting other characters that I don't want and can't figure out to lose them before the file is written. My intention is to eventually have the numbers identify and open a twitter feed in a web browser although I don't want advice about that (at least not yet
I'd rather try and figure it out first!).
As far as I can make out the addition characters are a 'start of text code', a 'carriage return' code, a 'line feed' and an 'end of text' code. Is it possible to drop these from the output before it is written to file? Also how can I make the actual card characters go over rather than their decimal equivalent?
I've identified the additional codes and the actual card numbers in (brackets) in the txt file grab. When I identify the card charcter values as int rather than char (with changes to the code to suit that) they go over as they are in (brackets) but the other codes generate errors in the Gobetwino output and the begin and end text codes come out something like '¬'
Set up - Arduino Uno, Sparkfun ID12 RFID starter kit, Win7 x64
This is my Arduino code
//RFID ID12
//this sketch reads the data from a RFID card
//and sends it to the serial port
//it is written to a text file using gobetwino
//it also flashes a LED when the card is swiped
int led = 13; //set up LED
char val = 0; // variable to store the data from the serial port
char str[4]; //array to store variable string
void setup() {
 Serial.begin(9600); //connect to the serial port
 pinMode(led, OUTPUT); //set the digital pin as an outputÂ
}
void loop () {
Â
if(Serial.available() > 0) {
val = Serial.read();Â Â Â //read the data from the serial port
        Â
Serial.print("#S|LOGTEST|[");Â Â Â Â Â Â Â //this is the
Serial.print(itoa((val), str, 10));Â Â Â Â //gobetwino
Serial.println("]#");Â Â Â Â Â Â Â Â Â Â Â //command line
digitalWrite(led, HIGH);Â // turn the LED on
 delay(50);      Â
digitalWrite(led, LOW);Â Â // turn the LED off after the delay
}
}
This is the txt file contents
2 (start of text)
53 (5)
48 (0)
48 (0)
48 (0)
56 (8)
70 (F)
70 (F)
54 (6)
57 (9)
49 (1)
66 (B)
56 (8)
13 (C/R)
10 (L/F)
3 (End of text)
This is the Gobetwino status messages
12/08/2012 21:22:58 Serial port : COM4 opened at 9600 baud
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[2]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[53]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[48]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[48]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[48]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[56]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[70]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[70]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[54]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[57]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[49]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[66]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[56]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[13]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[10]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
12/08/2012 21:23:00 Commandstring recieved : #S|LOGTEST|[3]#
12/08/2012 21:23:00 Command parsed OK
12/08/2012 21:23:00 Executing command : LOGTEST
12/08/2012 21:23:00 Data logged to C:\Users\Deekin\Desktop\gobetwino\LOGTESTLOG.txt
Thanks for any help/tips etc.