No matching call for WirelessController...

Hey guys,

First of all, I'm quite new to Arduino, so don't shoot me down if this problem is easy to fix :wink: :smiley:

Anyway,

I'm getting the following error:

no matching function for call to 'WirelessController::WirelessController(long unsigned int [3], int [1], int [2], int [2], int [2], int, int, int, int, int, int, int)'

And the script is:

#include "WirelessController.h"

#define PIN_DATA_OUT 4
#define PIN_BUTTON 3

unsigned long mark_duration_294[3] = {331, 943, 4800};
int message_code_start_294[1] = {-1};
int message_code_one_294[2] = {2, -1};
int message_code_zero_294[2] = {1, -2};
int message_code_end_294[2] = {1, -3};

WirelessController homeeasy = WirelessController(mark_duration_294, message_code_start_294,
message_code_one_294, message_code_zero_294, message_code_end_294,
3, 1, 2 ,2 ,30, ENCODING_PULSE_WIDTH, 28 );

byte homeeasy_on_button[4] = { 36, 69, 197, 144 };

void setup()
{
pinMode(PIN_BUTTON,INPUT);
homeeasy.intializeWritting(PIN_DATA_OUT,false);
}

void loop()
{
if (digitalRead(PIN_BUTTON == HIGH));
{
homeeasy.sendCode(homeeasy_on_button);
}
}

Could you tell me what the heck I'm doing wrong. I just can't find it & understand it from other topic talking about similar problems.

Thanks for the help!!

Greets

unsigned long mark_duration_294[3]  = {331, 943, 4800};
int message_code_start_294[1]       = {-1};
int message_code_one_294[2]         = {2, -1};
int message_code_zero_294[2]        = {1, -2};
int message_code_end_294[2]         = {1, -3};
WirelessController homeeasy = WirelessController(mark_duration_294, message_code_start_294,
                               message_code_one_294, message_code_zero_294, message_code_end_294,
                               3, 1, 2 ,2 ,30, ENCODING_PULSE_WIDTH, 28 );

You are passing the names of arrays to the WirelessController library but the error message seems to indicate that is not what it expects.

Do you have a link to the library ?
Did you write this code yourself or is it taken from an example supplied with the library ?

hey, thanks for the reply.

I've used an example (modified a little) and an existing library.

The librabry is called WirelessController.zip @ Downloads - SequenceDecoder + WirelessControllerVisualize and use different wireless signals with your Arduino

The existing example can be found on the same site @ WirelessController - SequenceDecoder + WirelessControllerVisualize and use different wireless signals with your Arduino
under the Chapter : "Sending ande receiving commands"

thanks

The constructor for the WirelessController library, taken from WirelessController.h is as follows

	// Constructor for the class. Receives all of the data describing
	// the protocol we want to send and/or receive
	WirelessController( unsigned long *marks_duration,
						int *message_code_start,
						int *message_code_one,
						int *message_code_zero,
						int *message_code_end,
						byte number_of_marks, 
						byte number_of_marks_start, 
						byte number_of_marks_bit, 
						byte number_of_marks_end,
						byte mark_tolerance,
						byte encoding_type,
						byte input_type,
						int number_of_bits);

As you will see there are 13 parameters.

Contrast that with your code, which I assume is from one of the examples

WirelessController homeeasy = WirelessController(mark_duration_294, message_code_start_294,
                               message_code_one_294, message_code_zero_294, message_code_end_294,
                               3, 1, 2 ,2 ,30, ENCODING_PULSE_WIDTH, 28 );

There are only 12 parameters being passed.

Hey,

The creator has e-mailed me back. Its indeed like that.

He believes it has to do with the recording of the signal. I'm trying again to decode the signal.

Lets hope it does.

But FYI Awesome program he has written.

And thanks for the help UKHeliBob

If the author is happy with how it works then who are we to argue ?

However, the error message that you got said

no matching function for call to 'WirelessController::WirelessController(long unsigned int [3], int [1], int [2], int [2], int [2], int, int, int, int, int, int, int)'

so if you call the constructor again with the same number and type of parameters you will surely get the same error. Is recording the signal again likely to produce a different number or type of parameters ?