I have my arduino connected to my PC and another serial device. This serial device sends a 3 line piece of info on bootup then if I trip a zone it will send information regarding the radio transmission.
When I first power up the device I see the information from the device in the serial monitor (SELFTEST-PASS) however that is the last information I receive from it until I powercycle the device.
I have connected it directly to my PC comport and verified information is being sent via Serial however the arduino seems to quit after the first bit of info... any idea where to proceed from here?
PS I have tried both SoftwareSerial and NewSoftSerial
Here is an example of the data sent from the serial device as viewed by hyperterminal:
<1234 #3F->0000 1234->FFFF D_ALARM>
<FFFF #3F->1234 FFFF->1234 P_ACK>
<1234 #40->0000 1234->FFFF D_ZREST>
Code that is currently not working:
#include <AltSoftSerial.h>
AltSoftSerial portOne;
void setup() {
Serial.begin(4800);
while (!Serial) {; // wait for serial port to connect. Needed for native USB port only
}
// Start each software serial port
portOne.begin(4800);
}
// the loop function runs over and over again forever
void loop()
{
if (portOne.available())
{
Serial.write(portOne.read());
}
if (Serial.available())
{
portOne.write(Serial.read());
}
}