Not able to read serial port except in arduino

Hi! I'm part of a project making a satellite with arduino, and this forum has solved so many problems already, but I'm just really stuck right now. The thing is that I cannot read information sent from an Arduino via a radiosender (APC220) and then through a USB-port. Right now I'm just using a simple code in arduino to send a number. When I open the serial monitor in Arduino I can read the numbers both in COM1 (Arduino) and in COM8(APC220 reciever). When I move the power cable to another computer I can still read the APC220 signals correctly. However, when I open terraterm or Processing and try to read the numbers, they aren't showing up. If I send them directly from COM1 however, they work. So the same information that is working when NOT beign sent over radio is not working when it is sent.

#include <SoftwareSerial.h>

const int rxPin = 7; //rx pin is tx pin on apc
const int txPin = 6; //tx pin is rx pin on apc
const int setPin = 8; //set pin
const int enPin = 12; // no use
//const int fiveV = 13; // 5V to the APC220
int i=0;
String readString;

SoftwareSerial apc220(rxPin, txPin);

void setupAPC220()
{
pinMode(setPin, OUTPUT);
digitalWrite(setPin, HIGH);
//pinMode(fiveV, OUTPUT);
//digitalWrite(fiveV, HIGH);
pinMode(enPin, OUTPUT);
digitalWrite(enPin, HIGH);
apc220.begin(9600);
}

void setup()
{
Serial.begin(9600);
setupAPC220();
}

void loop()
{
while (apc220.available()) {
char c = apc220.read(); //gets one byte from apc buffer
readString += c; //makes the string readString
delay(2); //slow looping to allow buffer to fill with next character
}
//i++ = (i = i + 1)
i++;
Serial.print(i); apc220.println(i);

readString="";
delay(1000);
}

Do anyone have any idea about what might be wrong?

So, after a week of painfull trial and error and a lot of searching and reading through forum-posts, I found the solution. It's very easy actually. You just have to manually wire the APC220 to the USB-bridge and only use the pins marked RX, TX, VCC and GND. The thing is that the EN (enable) pin turns the whole thing off when a software tries to read the serial port. No idea why it is still working in Arduino Serial Monitor.

So happy :slight_smile: Hope this can help someone if they are having the same problem.

You just have to manually wire the APC220 to the USB-bridge and only use the pins marked RX, TX, VCC and GND.

On which Arduino? Don't you think that's important?

The thing is that the EN (enable) pin turns the whole thing off when a software tries to read the serial port.

It wouldn't if you weren't diddling incorrectly with the enable pin. Since you didn't say how the enable pin was connected, we can only assume that it was connected incorrectly.