#include //include SoftwareSerial library SoftwareSerial myAttinySerial(0,1);// Define pins 0 and on as serial pins 0 is RX ans 1 is TX #define BUTTON 3 //Define on Attiny board button pin 3 #define LED 2 //define on Attiny board LED int state =0; //set variable to monitor the state of the button void setup() { myAttinySerial.begin(9600); //begin my defined SoftwareSerial pinMode(BUTTON,INPUT); // set BUTTON as an OUTPUT pin pinMode(LED,OUTPUT); // set LED as an INPUT pin } void loop (){ state = digitalRead(BUTTON); //Read the BUTTON and save it's value on status variable if(state == HIGH){ // If BUTTON is pressed myAttinySerial.println("Hi I'm Attiny"); // Send this string to SoftwareSerial digitalWrite(LED,HIGH); //lights the LED delay(1000); //wai for 1 second } digitalWrite(LED,LOW); // Turn LED off delay(1000); //} }