0

Trouble compiling adafruitio_06_digital_in with WINC1500
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trouble compiling adafruitio_06_digital_in with WINC1500

by bwalker4302 on Sun Jul 28, 2019 9:16 pm

I am trying to get the sample program working from "adafruitio_06_digital_in" example. I am using a MEGA 2560 arduino, WINC1500 wifi shield. I did sign up for an IO+ account with Adafruit also...

I made the following changes to the config.h file:
    Set my IO_USERNAME
    Set IO_KEY
    Entered my WIFI_SSID and WIFI_PASS
    Uncommeted the line USE_WINC1500
    Changed the Pin number to use digital pin 30 of the MEGA 2560 board

I end up getting a whole bunch of errors when I compile the project. The first error is:
Code: Select all | TOGGLE FULL SIZE
Arduino\libraries\Adafruit_IO_Arduino\src/AdafruitIO_WiFi.h:28:11: error: 'AdafruitIO_WINC1500' does not name a type typedef AdafruitIO_WINC1500 AdafruitIO_WiFi;


Thank you in advance for your help.

bwalker4302
 
Posts: 3
Joined: Thu Mar 22, 2012 3:20 pm

Re: Trouble compiling adafruitio_06_digital_in with WINC1500

by brubell on Mon Jul 29, 2019 10:56 am

Could you paste your config.h file below in
Code: Select all | TOGGLE FULL SIZE
[code]code brackets?[/code]
. Make sure to omit your Adafruit IO&SSID keys/credentials.

Which version of the Adafruit IO Arduino and Adafruit MQTT libraries are you using?

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

Re: Trouble compiling adafruitio_06_digital_in with WINC1500

by bwalker4302 on Tue Jul 30, 2019 10:31 am

Versions of Software Libraries:
    Adafruit IO Arduino - Version 3.2.0
    Adafruit MQTT - Version 1.0.3


Code: Select all | TOGGLE FULL SIZE
/************************ Adafruit IO Config *******************************/

// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME   "myUserName"
#define IO_KEY        "myKey"

/******************************* WIFI **************************************/

// the AdafruitIO_WiFi client will work with the following boards:
//   - HUZZAH ESP8266 Breakout -> https://www.adafruit.com/products/2471
//   - Feather HUZZAH ESP8266 -> https://www.adafruit.com/products/2821
//   - Feather HUZZAH ESP32 -> https://www.adafruit.com/product/3405
//   - Feather M0 WiFi -> https://www.adafruit.com/products/3010
//   - Feather WICED -> https://www.adafruit.com/products/3056
//   - Adafruit PyPortal -> https://www.adafruit.com/product/4116
//   - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
//   - Adafruit AirLift Breakout -> https://www.adafruit.com/product/4201
//   - Adafruit AirLift Shield -> https://www.adafruit.com/product/4285
//   - Adafruit AirLift FeatherWing -> https://www.adafruit.com/product/4264

#define WIFI_SSID   "mySSID"
#define WIFI_PASS   "myPass"


// uncomment the following line if you are using airlift
// #define USE_AIRLIFT

// uncomment the following line if you are using winc1500
 #define USE_WINC1500

// comment out the following lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"

#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
  // Configure the pins used for the ESP32 connection
  #if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
    // Don't change the names of these #define's! they match the variant ones
    #define SPIWIFI SPI
    #define SPIWIFI_SS 10  // Chip select pin
    #define NINA_ACK 9    // a.k.a BUSY or READY pin
    #define NINA_RESETN 6 // Reset pin
    #define NINA_GPIO0 -1 // Not connected
  #endif
  AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, NINA_ACK, NINA_RESETN, NINA_GPIO0, &SPIWIFI);
#else
  AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
#endif
/******************************* FONA **************************************/

// the AdafruitIO_FONA client will work with the following boards:
//   - Feather 32u4 FONA -> https://www.adafruit.com/product/3027

// uncomment the following two lines for 32u4 FONA,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);

/**************************** ETHERNET ************************************/

// the AdafruitIO_Ethernet client will work with the following boards:
//   - Ethernet FeatherWing -> https://www.adafruit.com/products/3201

// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);

bwalker4302
 
Posts: 3
Joined: Thu Mar 22, 2012 3:20 pm

Re: Trouble compiling adafruitio_06_digital_in with WINC1500

by brubell on Tue Jul 30, 2019 12:16 pm

I just checked back in the history of the library... The Arduino Mega 2560 is incompatible with the Adafruit IO Arduino library, it might not fit on the ATMEGA2560.

You could upgrade to a more powerful board with a MEGA form factor, like the Grand Central (https://www.adafruit.com/product/4064)

Or, you could also switch to a lighter MQTT library instead of Adafruit IO Arduino, such as Adafruit MQTT (https://github.com/adafruit/Adafruit_MQTT_Library)

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

Re: Trouble compiling adafruitio_06_digital_in with WINC1500

by bwalker4302 on Tue Jul 30, 2019 3:23 pm

Thanks for the info.

I used the Adafruit MQTT as you suggested and got the DI and DO pins working with my mega 2550 and the WINC1500.

bwalker4302
 
Posts: 3
Joined: Thu Mar 22, 2012 3:20 pm

Please be positive and constructive with your questions and comments.