TX RX with Sharp distance sensor

Hi All,

I’m using a Sharp distance sensor 2Y0A02, R433A Transmitter and RWS371 Receiver to transmit data from the Sharp distance and sends it through tx rx and display the value in the serial monitor.
Below is my code but i get errors from this. Can someone pls advice, your help is greatly appreciated!

#include <VirtualWire.h>

int sensorPin = A0;
int sensorValue = 0;

void setup()
pinMode (sensorPin, INPUT);

void loop()
sensorValue = analogRead(A0);


void send( int *message)
vw_send((uint8_t *)message, strlen(message));

What’s the error message?

I guess that you should convert the sensorValue into an string, which can be transmitted by send().

How do you feed the received signal into your PC (Serial Monitor)?

Arduino: 1.6.4 (Windows 7), Board: “Arduino Uno”

tryout_transmitter.ino: In function ‘void loop()’:
tryout_transmitter:19: error: invalid conversion from ‘int’ to ‘int*’ [-fpermissive]
tryout_transmitter:7: error: initializing argument 1 of ‘void send(int*)’ [-fpermissive]
tryout_transmitter.ino: In function ‘void send(int*)’:
tryout_transmitter:26: error: cannot convert ‘int*’ to ‘const char*’ for argument ‘1’ to ‘size_t strlen(const char*)’
invalid conversion from ‘int’ to ‘int*’ [-fpermissive]

This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.

these were the errors

i’m transmitting it with a R433A transmitter to a receiver RWS371