//I am working on a project in which an RF module sends the value of a water level sensor to //another Arduino using RF modules, then an LED is turned on or off based off of the value of the //water level sensor.
//Both the Receiver and Transmitter are connected to a 5v of power.
//Data pin on Receiver is connected to pin 3 while on the transmitter, data pin is connected to pin //11.
//Transmitter code
#include <RH_ASK.h>
#include <SPI.h>
int state = 0;
RH_ASK driver;
void setup()
{
driver.init();
}
void loop()
{
uint8_t data = analogRead(A0);
driver.send((uint8_t *)&data, sizeof(data));
driver.waitPacketSent();
delay(200);
}