- Arduino MEGA, ethernet module
I am using ethernet module to upload data to a server using Cayenne-Arduino-Library and arduino_uip. I want to read the myip[]
from CayenneEthernet.h
Original:
// DHCP with domain
void begin(const char* auth,
const char* domain = BLYNK_DEFAULT_DOMAIN,
uint16_t port = BLYNK_DEFAULT_PORT,
const byte mac[] = _blynkEthernetMac)
{
BLYNK_LOG("Here we are");// I added this to find this function.
...
IPAddress myip = Ethernet.localIP();
BLYNK_LOG("My IP: %d.%d.%d.%d", myip[0], myip[1], myip[2], myip[3]);
}
Edited:
// DHCP with domain
int* begin(const char* auth,
const char* domain = BLYNK_DEFAULT_DOMAIN,
uint16_t port = BLYNK_DEFAULT_PORT,
const byte mac[] = _blynkEthernetMac)
{
...
IPAddress myip = Ethernet.localIP();
BLYNK_LOG("My IP: %d.%d.%d.%d", myip[0], myip[1], myip[2], myip[3]);
return myip;
}
Arduino code:
#define CAYENNE_DEBUG // Uncomment to show debug messages
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include <CayenneDefines.h>
#include <UIPEthernet.h>
#include <BlynkSimpleUIPEthernet.h>
#include <CayenneEthernetClient.h>
#define VIRTUAL_PIN V1
#define VIRTUAL_PIN V0
...
void setup(){
...
int *A=Cayenne.begin(token);
...
}
void loop(){
...
}
I am getting this error:
error: void value not ignored as it ought to be
Question:
How can I return the array correctly?