Attiny_85_84_Serial_comm/Attiny_85_Master.ino
2024-10-26 00:56:47 +02:00

24 lines
399 B
C++

#include <SoftwareSerial.h>
SoftwareSerial mySerial(NULL,7); // RX, TX
uint8_t redLED = PB1;
void setup() {
mySerial.begin(9600);
pinMode(redLED, OUTPUT);
digitalWrite(redLED, LOW);
}
void loop() {
digitalWrite(redLED, !digitalRead(redLED));
delay(100);
mySerial.print("1");
digitalWrite(PB2, HIGH);
delay(100);
mySerial.print("2");
digitalWrite(PB2, HIGH);
delay(100);
}