get serial and send back out?

If I do this:

while (Serial.available())
{
char received = Serial.read();
SoftwareSerial.print(char);

The data type of the input isn't usable to send back out. Any simple answer of how to convert char to a send-able format?

db2db:

while (Serial.available())

{
   char received = Serial.read();
   SoftwareSerial.print(char);
}

You just have the names mixed up. You are trying to print the type of the variable rather than the variable. It should be

while (Serial.available())
  {
    char received = Serial.read();
    mySoftwareSerial.print(received);
}

...R
Edit - changed "SoftwareSerial" to "mySoftwareSerial" following @PaulS's sharper eyes in Reply #2

I hope that that snippet is not real code. Besides the error with printing the type, rather than a variable of that type, the instance name can NOT be the same as the class name.

Post some real code, with an example that illustrates the problem. Otherwise, we will conclude that it is simply user error.

You are trying to print the type of the variable rather than the variable

How did I not see that? Thanks!

db2db:
How did I not see that?

Welcome to the club !

It will happen again :slight_smile:

...R