Strange console behaviour - have you seen this sign?


hello,

i try conect rs232 port on projector arduino. test bought usb-rs232 converter. managed make work sketch:
code: [select]

#include <softwareserial.h>

softwareserial myserial(8, 1); // rx, tx

void setup()
{
  serial.begin(9600);
  serial.println('good night');
  myserial.begin(4800);
  myserial.write("hello, world?");
}

void loop()
{
  if (myserial.available())
    serial.write(myserial.read());
   
  if (serial.available())
    myserial.write(serial.read());
}


now next step decided test doing same through console. prepared sketch:
code: [select]

#include <softwareserial.h>
#include <console.h>
softwareserial myserial(8, 1); // rx, tx

void setup()
{
  bridge.begin();
  console.begin();
  while (!console) {
    ;
  }
  serial.begin(9600);
  serial.println('good night');
  myserial.begin(4800);
  myserial.write("hello, world?");
}

void loop()
{
  if (myserial.available())
    serial.write(myserial.read());
    console.write(myserial.read());
   
  if (serial.available())
    myserial.write(serial.read());
    console.write(serial.read());
 
  if (console.available())
    myserial.write(console.read());
    serial.write(console.read());
}


what happens is:
my putty ssh telnet console prints out see in attachement.
the same happens on com10 rs232.
when write on com10 gets published telnet other way - nothing.
what noise "???????????????????????????????"? possible copied suppose kind of noise being translated ascii, right? if yes noise comes from?

don't omit curly brackets. put { , } around ifs


Arduino Forum > Products > Arduino Yún (Moderator: fabioc84) > Strange console behaviour - have you seen this sign?


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support