Serial in ATtinyCore 2.0.0

Guys, to use serial communication on ATtiny85 using ATtinyCore 2.0.0 I just need to start Serial.begin()?

Or do I have to make the declaration or include some function in the header?

void setup() {
    Serial.begin(9600);
  
  delay(100);
}

void loop() {

  if (Serial.available() > 0) {
    String receivedString = Serial.readString();  
    
  
    if (receivedString == "Hello") {
      // Envia a mensagem "World!!!" pela comunicação serial
      Serial.println("World!!!");
    }
  }
  
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.