Serial Monitor and mismatched baud rate

In my sketch I specify begin(9600) but on Serial Monitor the output will be correct only at 1200 baud. Other SM settings produces garbled output of various sort depending on baud rate, at 9600 backward question marks.

#include <SoftwareSerial.h>
const int Rx = 3;
const int Tx = 4;
SoftwareSerial SSerial(Rx, Tx);
void setup()
{
  pinMode(Rx, INPUT);
  pinMode(Tx, OUTPUT);
  SSerial.begin(9600);
}
void loop()
{
  SSerial.println("0123456789 ");
  delay(500);
}

Nothing in the sketch sends anything to the Serial monitor

What are you using to view the serial output ?

Note that you don't need to explicitly set the pinMode() of the pins used by SoftSerial

that's happens with aliexpress WiFi modules

UKHeliBob:
Nothing in the sketch sends anything to the Serial monitor

Yes, this does "SSerial.println("0123456789 ");"
How would I otherwise see anything in Serial Monitor

What are you using to view the serial output ?

Serial Monitor

Note that you don't need to explicitly set the pinMode() of the pins used by SoftSerial
[/quote]

Yes, this does "SSerial.println("0123456789 ");"
How would I otherwise see anything in Serial Monitor

What type of Arduino board are you using ?

UKHeliBob:
What type of Arduino board are you using ?

I didn't mention - I have an ATTiny85 on a Sparkfun AVR programmer board and have wired a USB-Serial cable to it. The green and white wires go to pins 3 and 4 (physical 2 and 3) on the Tiny.

I didn't mention - I have an ATTiny85 on a Sparkfun AVR programmer board

If only you had mentioned that earlier ...

What speed is the ATTiny chip running at ?

UKHeliBob:
What speed is the ATTiny chip running at ?

8 MHz (internal)

Are you sure? The chips run at 1 MHz by default. If the chip is running at 1 MHz but you are compiling the code for 8 MHz, that would result in just the behavior you experienced. In order to configure the ATtiny85 to run at 8 MHz, you can do a Tools > Burn Bootloader in the Arduino IDE.

pert:
Are you sure? The chips run at 1 MHz by default. If the chip is running at 1 MHz but you are compiling the code for 8 MHz, that would result in just the behavior you experienced. In order to configure the ATtiny85 to run at 8 MHz, you can do a Tools > Burn Bootloader in the Arduino IDE.

I burned the bootloader and it works! Being a newbie, I have things to learn. Thanks !

You're welcome. I'm glad to hear it's working now. Enjoy!
Per