0

Accessing Adafruit IO from MKR WiFi 1010
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Accessing Adafruit IO from MKR WiFi 1010

by papou41 on Sat Nov 03, 2018 12:25 pm

Hi,

After having upgraded my MKR WiFi 1010 firmware to the last 1.1.0, all examples included in the WiFiNINA library run well.
However, when I try to access to Adafruit IO, I have errors.

What I did to have the MKR 1010 recognized:

1 - In AdafruitIO_Board.cpp, new entry:
Code: Select all | TOGGLE FULL SIZE
#elif defined(ARDUINO_SAMD_MKR1010)               // added
    const char AdafruitIO_Board::_type[] = "mkr1010";      // added

2 - In AdafruitIO_WiFi.h, new entry:
Code: Select all | TOGGLE FULL SIZE
#elif defined(ARDUINO_SAMD_MKR1010)         // added

  #include "wifi/AdafruitIO_MKR1010.h"         // added
  typedef AdafruitIO_MKR1010 AdafruitIO_WiFi;   // added

3 - New files: AdafruitIO_MKR1010.cpp & AdafruitIO_MKR1010.h copied from '1000' files with any '1000' replaced by '1010' in the code.

4 - In Adafruit_MQTT.cpp, new entry:
Code: Select all | TOGGLE FULL SIZE
#if defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1010)
static char *dtostrf (double val, signed char width, unsigned char prec, char *sout) {
  char fmt[20];
  sprintf(fmt, "%%%d.%df", width, prec);
  sprintf(sout, fmt, val);
  return sout;
}
#endif

When I tried to compile any example from the Adafruit IO library, I have this error:

C:\Users\....\libraries\Adafruit_IO_Arduino\src\wifi\AdafruitIO_WINC1500.cpp:42:8: error: 'class WiFiClass' has no member named 'setPins'
WiFi.setPins(WINC_CS, WINC_IRQ, WINC_RST, WINC_EN);
^
exit status 1
Erreur de compilation pour la carte Arduino MKR WiFi 1010


Obviously, there is always a call to the WINC1500 library, why ?

If somebody succeded in using MKR 1010 and Adafruit IO, Please, help me.
Regards

papou41
 
Posts: 2
Joined: Thu Jun 04, 2015 4:38 pm

Re: Accessing Adafruit IO from MKR WiFi 1010

by brubell on Mon Nov 05, 2018 8:57 pm

Forum user ChrisBuck was going through this recently and figured out:
In case someone else runs into this issue, it turned out to be that the MKR1010 currently ships without a root certificate required for the SSL connection to Adafruit, and there's not yet a fw update tool ready to load one. Use the MKR1000 instead.


via viewtopic.php?f=56&t=140834

brubell
 
Posts: 189
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.