Jump to content
43oh

Problem executing VirtualWire library in energia for MSP430


Recommended Posts

Hi, I am designing a remote controlled system using an arduino uno board and a msp430 launchpad with the ASK RF module (HT12E and HT12D ICs).

I am using the msp430 as the transmitter and the  arduino uno for the reciever because of requirements of my application.

 

Being familiar with Arduino, i am trying to use energia to program the msp430 with the VirtualWire library.

#include <VirtualWire.h>

int button = P2_2;
int transmit_pin = P2_1;
int a,counter=0;
char msg[4];
void setup()
{
    vw_set_tx_pin(transmit_pin);
    vw_setup(2000);       // Bits per sec
    pinMode(button,INPUT);
}


void loop()
{
  Serial.begin(9600);

  a=digitalRead(button);
  itoa(a,msg,10);
  Serial.println(a);
  if(a==1)
  counter=counter+1;
  vw_send((uint8_t *)msg, strlen(msg));
  vw_wait_tx();
  Serial.println("success");
  delay(1000);

}

This code, when used on the arduino, compiles, uploads and executes succesfully. The transmitter board LED blinks to indicate successful transmission of data. But when i use it on energia, there is an error-

 

F:\energia-0101E0013\hardware\msp430\libraries\VirtualWire\VirtualWire.cpp:16:26: fatal error: util/crc16.h: No such file or directory

compilation terminated.

 

any suggestions to get through with this error.

Or if the same code can be implemented using another library.

Cheers! 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...