pardon me..
Here my Transmitter code
#include <VirtualWire.h>
#include <max6675.h>
#include <SPI.h>
int SO = 8;
int CS = 9;
int CLK = 10;
MAX6675 temp(CLK,CS,SO);
void setup() {
Serial.begin(9600);
vw_set_tx_pin(12);
vw_setup(2000);
}
void loop() {
Serial.println(temp.readCelsius()-10);
delay(1000);
}
void send (char *message) {
vw_send((uint8_t *)message, strlen(message));
vw_wait_tx();
}
and here is my Receiver code
#include <VirtualWire.h>
#include <LiquidCrystal.h>
#include <SPI.h>
LiquidCrystal lcd (2,3,4,5,6,7);
byte message[VW_MAX_MESSAGE_LEN];
byte msgLength = VW_MAX_MESSAGE_LEN;
void setup() {
Serial.begin(9600);
Serial.println("Ready");
lcd.begin(16, 2);
vw_set_rx_pin(11);
vw_setup(2000);
vw_rx_start();
}
void loop() {
lcd.clear();
uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;
if (vw_get_message(buf, &buflen))
{
lcd.setCursor(0,0);
lcd.print("Got:");
for (int i = 0; i < buflen; i++)
{
lcd.write(buf[i]);
}
lcd.setCursor(0,1);
lcd.print("Got:");
for (int i = 0; i < buflen; i++)
{
lcd.write(buf[i]);
}
delay(1000);
}
}
I think my problem is on the transmitter part..