#include "SoftwareSerial.h"
const int LED = 0; // this is physical pin 8 for the LED
const int Rx = 3; // this is physical pin 6
const int Tx = 4; // this is physical pin 7
SoftwareSerial mySerial(Rx, Tx);
void setup()
{
pinMode(LED, OUTPUT); // tell Arduino LED is an output
mySerial.begin(19200);
digitalWrite(LED,LOW);
}
void loop()
{
mySerial.println("SANTHOSH");
delay(100);
digitalWrite(LED,HIGH);
delay(100);
mySerial.println("ajinnadh");
delay(100);
digitalWrite(LED,LOW);
}
It looks like there's a problem on the Arduino UNO side, to start.
You are using the software serial library and define your TX/RX pins to be pins 3/4 on the Uno (I don't understand your comment about physical pins). Yet, you've wired your communications to the built-in USART on pins 0/1. So, you're sending data to pin 4 while the ATTiny is wired to pin 1.
There is no need to use the software serial library. Just use the built in communication functions for the TX0/RX0 pins.
You have a similar issue when defining the LED pin. You have a comment about pin 8, but define it as pin 0 (The Rx pin on the Uno).
Go back and review how to use pins on the Arduino Uno. Here is a reference to the pinmode command.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
ATtiny Run w/o Delay Two Functions from void Loop() | Microcontrollers | 1 | ||
Closet System PIR and ATtiny 85 | General Electronics Chat | 1 | ||
Help with sequential LED delay - ATTINY | Microcontrollers | 7 | ||
ATtiny I/O Current | Datasheets, Manuals & Parts Identification | 20 | ||
MOSFET for boost converter | Microcontrollers | 4 |
by Jake Hertz
by Jake Hertz
by Jake Hertz
by Aaron Carman