What variable type i need to declare, so i can use it to give pin numbers for "Wire.begin()" ?
Example code:
const char* wires = "0,2";
Wire.begin(wires);
Currently i get error: call of overloaded 'begin(const char*&)' is ambiguous
What variable type i need to declare, so i can use it to give pin numbers for "Wire.begin()" ?
Example code:
const char* wires = "0,2";
Wire.begin(wires);
Currently i get error: call of overloaded 'begin(const char*&)' is ambiguous
What variable type i need to declare, so i can use it to give pin numbers for "Wire.begin()" ?
The input parameter for that function is a seven bit slave address. 0-127
Are you using an ESP8266? If so, the syntax for the begin function is:
Wire.begin(int sda, int scl);
The begin function does not take a string, but 2 numbers of the int data type.
You could do:
int sda = 0;
int scl = 1;
void setup()
{
Wire.begin(sda, scl);
...
}
groundFungus:
Are you using an ESP8266? If so, the syntax for the begin function is:Wire.begin(int sda, int scl);The begin function does not take a string, but 2 numbers of the int data type.
You could do:
int sda = 0;
int scl = 1;
void setup()
{
Wire.begin(sda, scl);
...
}
This works for me. Thank You