ATtiny45/85 with Libary SoftwareSerial

Hallo,

using a Adruino Uno with a ATtiny45 on the breadboard connected to program the ATtiny45.
It is not possible with an ATtiny to use the command " Serial.begin(9600);" This code is only for Adruino Uno. So I use the kibary “SoftwareSerial.h”.
The problem is, the sketch is upload to the ATtiny45 without error. The LED on PIN 0 and PIN 1 works very fine like described in the sketch.

Problem: In the serial Window from Adruino Uno over the USB cable display on the PC I see only one Character “⸮”.

The result should be the word “Test” in each run of the “vois loop”. Her is the code of the sketch:

"// Example using SoftwareSerial for ATtiny45

#include <SoftwareSerial.h> // Bibliothek
const int rx=3; // Pin 3 connect with rx (0) on Adruino Uno
const int tx=4; // Pin 4 connect with tx (1) on Adruino Uno

SoftwareSerial mySerial(3,4); // analog PIN 3 to rx (0), PIN 4 to tx (1) to Adruino Uno

void setup()
{
mySerial.begin(9600);

pinMode(0,OUTPUT); // Pin 0 ~

pinMode(1,OUTPUT); // Pin 1 ~
}

void loop()
{
mySerial.println(“Test”);
delay(1000);

// Test LED 0 and 1
digitalWrite(0, HIGH); // LED an Pin 0 ein
delay(1000); // Warte 1000 Millisekunden
digitalWrite(1, HIGH); // LED an Pin 1 an
delay(2000);
digitalWrite(0, LOW); // LED an Pin 0 aus
delay(2000); // Warte 1000 Millisekunden
digitalWrite(1, LOW); // LED an Pin 1 aus
}
"

I use the Adruino IDE 1.8.12. I their a new libary from “SoftwareSerial.h”?
Do you have a solution?

Thank you for help
Mike

The easiest solution is to use TinyCore, which includes a software serial that functions pretty much the same as the regular Serial on a Uno etc.

Hello BJHenry,
I have installed ATTinyCore and I have made some tests. I have looked at this video https://youtu.be/9CX4i6rMXS8.

Thanks for help
Mike