commit b136b05365683616364985d545c5218b960830dc Author: Snorky Date: Sat Oct 26 00:54:07 2024 +0200 First commit diff --git a/Attiny_84_Slave.ino b/Attiny_84_Slave.ino new file mode 100644 index 0000000..0eff419 --- /dev/null +++ b/Attiny_84_Slave.ino @@ -0,0 +1,27 @@ +#include + +SoftwareSerial mySerial(3,NULL); //RX, TX + +uint8_t blueLED = 10; +uint8_t v; +void setup() { + + mySerial.begin(9600); + pinMode(blueLED, OUTPUT); + //pinMode(PB0, INPUT); + digitalWrite(blueLED, LOW); + +} + +void loop() { + + + v = mySerial.read(); + if (v == '1') + digitalWrite(blueLED, HIGH); + if (v == '2') + digitalWrite(blueLED, LOW); + + + +} \ No newline at end of file diff --git a/Attiny_85_Master.ino b/Attiny_85_Master.ino new file mode 100644 index 0000000..2467686 --- /dev/null +++ b/Attiny_85_Master.ino @@ -0,0 +1,36 @@ +//#include +#include + +SoftwareSerial mySerial(NULL,7); // RX, TX + +//#define IR_RECEIVE_PIN PB4 +uint8_t redLED = PB1; +//uint8_t redLED = PB2; +/* uint8_t greenLED = PB0; +uint8_t fanPIN = PB3; */ +void setup() { + + mySerial.begin(9600); + pinMode(redLED, OUTPUT); + //pinMode(PB2, OUTPUT); +/* pinMode(greenLED, OUTPUT); */ +/* pinMode(redLED, OUTPUT); */ +/* pinMode(fanPIN, OUTPUT); */ +/* digitalWrite(fanPIN, LOW); */ + digitalWrite(redLED, LOW); +/* digitalWrite(greenLED, LOW); */ +/* digitalWrite(redLED, LOW); */ + //IrReceiver.begin(IR_RECEIVE_PIN);//, ENABLE_LED_FEEDBACK); +} + +void loop() { + digitalWrite(redLED, !digitalRead(redLED)); + delay(100); + mySerial.print("1"); + digitalWrite(PB2, HIGH); + delay(100); + mySerial.print("2"); + digitalWrite(PB2, HIGH); + delay(100); + +} diff --git a/Serial_comm_Attiny85_84.fzz b/Serial_comm_Attiny85_84.fzz new file mode 100644 index 0000000..bbd75cc Binary files /dev/null and b/Serial_comm_Attiny85_84.fzz differ diff --git a/Serial_comm_Attiny85_84_bb.png b/Serial_comm_Attiny85_84_bb.png new file mode 100644 index 0000000..2ff6ef4 Binary files /dev/null and b/Serial_comm_Attiny85_84_bb.png differ