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----------
}
}
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.