I have an RFID reader:
Something like same above along with ITEAD TFT shield & GSM Modem. The RFID reader has RS-232 port as well as GND,TX and 5V pins. I am using Arduino Mega 2560 Board. I have connected the TX,GND of RFID reader to RX3 pin 15 / GND (pin) of Arduino. Note I am supplying 12 V to RFID via a adapter.
Note the ITEAD TFT shield consumes TX0, RX0 pins - so I cannot make use of RX0 and TX0 pins. Though I have not written the code for GSM modem.
Now while running the below program I am getting junk output both in my TFT display as well as serila monitor:
#define __AVR__ #include <UTFT.h> extern uint8_t SmallFont[]; extern uint8_t BigFont[]; extern uint8_t SevenSegNumFont[]; UTFT myGLCD(ITDB24,59,58,57,56); String myString = ""; void setup() { Serial3.begin(9600); myGLCD.InitLCD(); myGLCD.clrScr(); } void loop() { myGLCD.setFont(BigFont); if (Serial3.available()) { int inByte = Serial3.read(); myString += String(inByte); } if(myString.length() == 10) myGLCD.print(myString, CENTER, 0); }
TFT Screen output:
1310494848
Serial Monitor Output- non printable junk character.
The value is incorrect I am pretty sure, what wrong am I doing?
I found that ITEAD shield is sending or rather using RX0/TX0 pins very frequently - some data is going thru.
BTW what is the functionality of http://arduino.cc/en/Tutorial/So... ?
Well in all other words "How can I use 3 different Serial I/Os individually at same time without disturbing any other I/O?"