hi
my goal is to have two attiny85 (one with a reciever and one with a transmitter running at 433Mhz ) transmitting data from one to the other. I am using the Manchester encoding library. I got one attiny85 to transmitt data to an Arduino uno but i never got an attiny85 to receive data eventough their are no errors and i run the exact same code that worked on the arduino uno.
I also use the arduino to program the attiny85 via Arduinoisp.
my transmitter code
#include <Manchester.h>
#define TX_PIN 3 //pin where your transmitter is connected
#define LED_PIN 4 //pin for blinking LED
uint16_t transmit_data = 0;
void setup() {
pinMode(LED_PIN, OUTPUT);
man.workAround1MhzTinyCore(); //add this in order for transmitter to work with 1Mhz Attiny85/84
man.setupTransmit(TX_PIN, MAN_1200);
}
void loop() {
man.transmit(transmit_data);
digitalWrite(LED_PIN, HIGH);
delay(1000);
digitalWrite(LED_PIN,LOW);
delay(1000);
}
my receiver code
#include <Manchester.h>
void setup() {
pinMode(4, OUTPUT);
man.setupReceive(3, MAN_1200);
man.beginReceive();
}
void loop() {
if (man.receiveComplete()) {
uint16_t m = man.getMessage();
man.beginReceive();
if(m == 0 ){
digitalWrite(4, HIGH);
delay(100);
}
}
digitalWrite(4,LOW);
}
can you please help me