Hi Guys,
I am trying to make attiny85 to talk with Arduino via softserial, but I can't get attiny85 to send (tx) data correctly.
The code I have on 85:
// include the SoftwareSerial library so you can use its functions:
#include <SoftwareSerial.h>
#define rxPin 0 //ic pin 5
#define txPin 3 // ic pin 2
// set up a new serial port
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
void setup() {
// define pin modes for tx, rx, led pins:
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
// set the data rate for the SoftwareSerial port
mySerial.begin(4800);
}
void loop() {
mySerial.println("Hi!");
}
The pin 2 (txPin) of attiny85 is directly connect to RX(pin 0) of Arduino. Above code is working for Arduino(send) to Arduino(receive) (I have two Arduinos), but does't work for attiny85(send) to Arduino(receive). Any ideas ?