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?