Hi there !
I have looked and looked again and again everywhere on internet about my problem.
Here it is : I have an arduino Uno with a RF 433MHz transmitter and an attiny85 with a RF 433MHz reciever.
For now, I am triyng to blink a LED with the attiny but that doesn't work ... When I use an arduino Uno instead of an attiny, that is working ...
Does anyone have any idea to help me pleeeaasse ?
Thank you very much
Here is the different codes
Transmitter
#include <VirtualWire.h>
const char* CMD_BUTTON_A = "BPA";
void setup() {
vw_setup(1000);
}
void loop() {
byte message[VW_MAX_MESSAGE_LEN];
vw_send((byte*) CMD_BUTTON_A, strlen(CMD_BUTTON_A) + 1); // On envoie le message
vw_wait_tx(); // On attend la fin de l'envoi
delay(2000);
}
Reciever
/*Importations des bibliotèques*/
#include <VirtualWire.h>
/* Différents messages de commande */
const char* CMD_BUTTON_A = "BPA";
void setup() {
pinMode(1, OUTPUT);
vw_set_rx_pin(3);
vw_rx_start(); // On peut maintenant recevoir des messages
vw_setup(1000);
}
void loop() {
byte message[VW_MAX_MESSAGE_LEN];
byte taille_message = VW_MAX_MESSAGE_LEN;
vw_wait_rx();
if (vw_get_message(message, &taille_message)) {
if (strcmp((char*) message, CMD_BUTTON_A) == 0) {
digitalWrite(3, HIGH);
delay(5000);
digitalWrite(3, LOW);
delay(1000);
}
}
}