In this week I developed an RF capability on an iteration of my Probe Board following this example: ATtiny85 RF Transmitter & Receiver - YouTube
The final Goal was to set up wireless communication between Moisture Sensor (Input Device) and MainBoard ESP8266 based.
Some tests playing around with the VirtualWire Library, for very cheap wireless communication. I couldn't get any solid example besides the video, which was undocumented
In the end, we got some results from the code tests, but nothing consistent.
In a second try I succefully tested this example: - Receiving and Sending Data Between Attiny85 (Arduino IDE 1.06) UPDATED Nov 2015: 4 Steps
I tested the board with a very simple code. The main purpose was to send an integral. The main goal is to get both RF433 and Input Devices toghether.
#include
#define TX_PIN 2 //pin where your
transmitter is connected
uint16_t transmit_data = 201;
void setup() {
man.setupTransmit(TX_PIN, MAN_1200);
}
void loop() {
man.transmit(transmit_data);
delay(200);
}
#include
#define RX_PIN 7
void setup() {
Serial.begin(9600);
man.setupReceive(RX_PIN, MAN_1200);
man.beginReceive();
}
void loop() {
if (man.receiveComplete()) {
int16_t m = man.getMessage();
Serial.println(m);
man.beginReceive(); //start listening for next
message right after you retrieve the message
}
}
Also a very nice example featuring the communication between two attiny mcu’s at:
Deep RF Explanation: Insight Into How 433MHz RF Tx-Rx Modules Work & Interface with Arduino
433 MHz RF Links Theory, Circuit and Program: 4 Steps
RF Transmitter and Receiver Circuit Diagram