RF controller code error


i have wrote program.the concept if  a0  pin receive 3.3v means,the rf transmitt message "1".if pin a0 receive 5v,it send message "2".rf send message arduino uno arduino pro mini.but while compiling shows message "error while compiling".

can me find error in above program......!!!!!


#include <virtualwire.h>
char *msg;
float vpow = 5.0;
 float r1 = 100000;
 float r2 = 10000;
 const int ledpin = 13;

 void setup()
 {
  pinmode(ledpin,output);
  serial.begin(9600);
  vw_set_ptt_inverted(uint8_t *);
  vw_setup(2000);               
  vw_set_tx_pin(3);     
 }
 void loop() {
   float v = (analogread(0) * vpow) / 1024.0;
   float v2 = v / (r2 / (r1 + r2));
   if msg=(v2 == vpow)
   {
   const char *msg = 1;       
   vw_send((uint8_t *)msg, strlen(msg));
   vw_wait_tx(1);                       
   delay(200);
}
  else
  {
   const char *msg = 2;
   vw_send((uint8_t *)msg, strlen(msg));
   vw_wait_tx(2);
   delay(200);
  }
 }

i have wrote program.the concept if  a0  pin receive 3.3v means,the rf transmitt message "1".if pin a0 receive 5v,it send message "2".rf send message arduino uno arduino pro mini.but while compiling shows message "error while compiling".

can me find error in above program......!!!!!


#include <virtualwire.h>
char *msg;
float vpow = 5.0;
 float r1 = 100000;
 float r2 = 10000;
 const int ledpin = 13;

 void setup()
 {
  pinmode(ledpin,output);
  serial.begin(9600);
  vw_set_ptt_inverted(uint8_t *);
  vw_setup(2000);               
  vw_set_tx_pin(3);     
 }
 void loop() {
   float v = (analogread(0) * vpow) / 1024.0;
   float v2 = v / (r2 / (r1 + r2));
   if msg=(v2 == vpow)
   {
   const char *msg = 1;       
   vw_send((uint8_t *)msg, strlen(msg));
   vw_wait_tx(1);                       
   delay(200);
}
  else
  {
   const char *msg = 2;
   vw_send((uint8_t *)msg, strlen(msg));
   vw_wait_tx(2);
   delay(200);
  }
 }


Arduino Forum > Using Arduino > Programming Questions > RF controller code error


arduino

Comments