Virtualwire code to send data wireless

hey guys,

I am trying to send RGB value from sensor wireless using Virtualwire! I am getting an error!

#include <VirtualWire.h>  // you must download and install the VirtualWire.h to your hardware/libraries folder
#include <TimerOne.h>
#define S0     6
#define S1     5
#define S2     4
#define S3     3
#define OUT    2

byte msg[3];
int   g_count = 0;    // count the frequecy
int   g_array[3];     // store the RGB value
int   g_flag = 0;     // filter of RGB queue
float g_SF[3];        // save the RGB Scale factor
 
 
// Init TSC230 and setting Frequency.
void TSC_Init()
{
  pinMode(S0, OUTPUT);
  pinMode(S1, OUTPUT);
  pinMode(S2, OUTPUT);
  pinMode(S3, OUTPUT);
  pinMode(OUT, INPUT);
 
  digitalWrite(S0, LOW);  // OUTPUT FREQUENCY SCALING 2%
  digitalWrite(S1, HIGH); 
}
 
// Select the filter color 
void TSC_FilterColor(int Level01, int Level02)
{
  if(Level01 != 0)
    Level01 = HIGH;
 
  if(Level02 != 0)
    Level02 = HIGH;
 
  digitalWrite(S2, Level01); 
  digitalWrite(S3, Level02); 
}
 
void TSC_Count()
{
  g_count ++ ;
}
 
void TSC_Callback()
{
  switch(g_flag)
  {
    case 0: 
         Serial.println("->WB Start");
         TSC_WB(LOW, LOW);              //Filter without Red
         break;
    case 1:
         Serial.print("->Frequency R=");
         Serial.println(g_count);
         g_array[0] = g_count;
         TSC_WB(HIGH, HIGH);            //Filter without Green
         break;
    case 2:
         Serial.print("->Frequency G=");
         Serial.println(g_count);
         g_array[1] = g_count;
         TSC_WB(LOW, HIGH);             //Filter without Blue
         break;
 
    case 3:
         Serial.print("->Frequency B=");
         Serial.println(g_count);
         Serial.println("->WB End");
         g_array[2] = g_count;
         TSC_WB(HIGH, LOW);             //Clear(no filter)   
         break;
   default:
         g_count = 0;
         break;
  }
}
 
void TSC_WB(int Level0, int Level1)      //White Balance
{
  g_count = 0;
  g_flag ++;
  TSC_FilterColor(Level0, Level1);
  Timer1.setPeriod(1000000);             // set 1s period
}
 
void setup()
{
     // Initialise the IO and ISR
   //  vw_set_ptt_inverted(true); // Required for RF Link module -THIS LINE not needed.
    vw_setup(2000);                 // Bits per sec
    // next line not needed if using the default pins of 11, 12
    vw_set_tx_pin(3);                // pin 3 is used as the transmit data out into the TX Link module, change this as per your needs  
   TSC_Init();
  Serial.begin(9600);
  Timer1.initialize();             // defaulte is 1s
  Timer1.attachInterrupt(TSC_Callback);  
  attachInterrupt(0, TSC_Count, RISING);  
 
  delay(4000);
 
  for(int i=0; i<3; i++)
    Serial.println(g_array[i]);
 
  g_SF[0] = 255.0/ g_array[0];     //R Scale factor
  g_SF[1] = 255.0/ g_array[1] ;    //G Scale factor
  g_SF[2] = 255.0/ g_array[2] ;    //B Scale factor
 
  Serial.println(g_SF[0]);
  Serial.println(g_SF[1]);
  Serial.println(g_SF[2]);
}


void loop()
{
   g_flag = 0;
   for(int i=0; i<3; i++)
    Serial.println(int(g_array[i] * g_SF[i]));
   delay(4000);
// add your code to do the color reading

// say you store the readings as r, g, b - set up the msg[] array:
msg[0] = g_array[0];
msg[1] = g_array[1];
msg[2] = g_array[2];
msg[3] = g_SF[0];
msg[4] = g_SF[1];
msg[5] = g_SF[2];

// and then send it out
   vw_send((uint8_t *)msg, strlen(msg));
   vw_wait_tx();                                          // Wait for message to finish
   delay(200);
}

Error says

sketch_dec17a.ino: In function 'void loop()':
sketch_dec17a:137: error: invalid conversion from 'byte*' to 'const char*'
sketch_dec17a:137: error: initializing argument 1 of 'size_t strlen(const char*)'

Anyone can help me?

This needs to be changed to refllect more data going in:
from
byte msg[3];
to
byte msg[6];
and maybe even larger as you are putting in 3 ints (6 bytes) and 3 floats (12 bytes).

Not sure if that will help with the error message tho. Might have to change how data is put into msg[]. Didn't catch the change of types before.
Maybe
byte msg[18];

and then
msg[0] = highByte(g_array[0]);
msg[1] = lowByte(g_array[0]);
msg[2] = highByte(g_array[1]);
msg[3] = lowByte(g_array[1]);
msg[4] = highByte(g_array[2]);
msg[5] = lowByte(g_array[2]);

and sort of similarly for the float data