433 MHz communication between UNO and ATTINY85

Hello guys,
i am stucking for some day's now at this point:
I am Using a Digispark rev 3 as Transmitter and Arduino Uno as receiver with the cheap 433Mhz module.

The code i have is working fine between 2 Arduino's. But if i use the Digispark as transmitter, the Arduino as Receiver doesn't get any information i have sent with the Digispark.

Could the different clock speed(attiny85 at 16.5Mhz, UNO at 16Mhz) be the problem here?

Transmitter ( ATTINY85) CODE:

 #include <Manchester.h>
#define TX_PIN 2  //pin where your transmitter is connected

  uint16_t transmit_data = 89;

  void setup() {

  man.setupTransmit(TX_PIN, MAN_1200);
  pinMode(Sensir_PIN,INPUT_PULLUP);
} 

  void loop() {
    
  man.transmit(transmit_data);
  delay(200);
}

Receiver(Arduino UNO) CODE:

#include <Manchester.h>
#define RX_PIN 9 
uint8_t moo = 1;

void setup()

{
  man.setupReceive(RX_PIN, MAN_1200);
  man.beginReceive();
}

void loop() {
  
  if (man.receiveComplete()) {
    uint16_t m = man.getMessage();
    man.beginReceive(); //start listening for next message right after you retrieve the message
   moo = ++moo % 2;
// I need the "m" variable which is transfered by the ATTINY85----------
  }
}

Make sure the modulation method and communication protocols are identical.

The different clock speeds will definitely be a problem if the code does not account for the actual oscillator frequency.

And indeed, Manchester.h assumes 16.00000 MHz:

//setup timing for transmitter
#define HALF_BIT_INTERVAL 3072 //(=48 * 1024 * 1000000 / 16000000Hz) microseconds for speed factor 0 (300baud)

You can change that.

@Paul_KD7HB Oh men, how can i check that?

ALways have documentation for the devices you buy!

@Paul_KD7HB i bought this Digispark

and this 433mhz item

That was probably a mistake, but it might be made to work if you take into account post #3 in this thread.

Ok, so just change in the attiny85 sketch to:
4810241000000/165000000= 297

So i just dont understnad, if i change that in the Manchester.h, then the arduino will have also the wrong interval?

Hi
What type of receiver and transmitter are used?

It would be a good idea to change the name of the modified library, and use it only where appropriate, don't you think? And do check your math.

Possible Digispark ( i dont use) needs pullups resistor. Try compare voltages on pins where you connect Tx on arduino vs digispark. If you have oscilloscope you can see are there data and are there same width of impuls.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.