📬❄️📦Adafruit Holiday Shipping Deadlines 2019: Please place all UPS 3 Day orders by 11am ET Friday December 13 📬❄️📦
0

WICED Feather Problem with I2C libraries?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

WICED Feather Problem with I2C libraries?

by hackoholic on Sun Apr 03, 2016 12:32 am

I have a basic setup with my WICED feather and your MPL3115A2 breakout. I'm attempting to run an initial test and have combined your testmpl3115a2.ino with your AIOTest.ino in order to read pressure and altitude and publish it up to my AIO feed.

I keep getting a "myLocalSketchPath...\Arduino\hardware\Adafruit_WICED_Arduino\stm32\libraries\Wire/WireBase.h:93:13: note: candidate expects 0 arguments, 1 provided" error while compiling. While testing, I've noticed that the AIOTest.ino itself compiles fine but if I add either and #include <Wire.h> or a #include <Adafruit_MPL3115A2.h> then I get this same error.

Is there some conflict with the new feather libraries and the old wire library or MPL3115A2 library? Does my error message reveal any clues?

hackoholic
 
Posts: 25
Joined: Fri Mar 16, 2012 12:50 pm

Re: WICED Feather Problem with I2C libraries?

by adafruit_support_rick on Mon Apr 04, 2016 11:01 am

I don't get any errors compiling MPL3115A2 examples for the WICED. You may have some sort of error in your code.
Please post your code.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: WICED Feather Problem with I2C libraries?

by hackoholic on Mon Apr 04, 2016 12:30 pm

I fails for me using your entire code example (AIOTest.ino ) the second I simply add the #include statement(s) I listed. One confusing point for me has been the fact that the examples go in this new hardware folder and aren't accessible from the normal examples interface in the Arduino IDE.

In my particular case, I store my sketches in OneDrive so it was confusing in the instructions whether I should put the new hardware folder into "My Documents"\Arduino or in the actual location of my sketch folder. In other words, I have an Arduino folder in both locations. I chose the OneDrive path because that is where my sketch folder is. My guess is this is part of the problem but still am unsure why or how to fix.

Your instructions say to put inside the documents\Arduino folder. My sketch folder is in a Documents folder in Onedrive.
C:\Users\myUserName\OneDrive\Documents\Arduino

I've tried moving back into the normal Windows Documents\Arduino folder but that didn't seem to make any difference either.

hackoholic
 
Posts: 25
Joined: Fri Mar 16, 2012 12:50 pm

Re: WICED Feather Problem with I2C libraries?

by adafruit_support_rick on Mon Apr 04, 2016 4:21 pm

Try adding the includes *after* the ones that are already there:
Code: Select all | TOGGLE FULL SIZE
#include <adafruit_feather.h>
#include <adafruit_mqtt.h>
#include <adafruit_aio.h>

#include <Wire.h>
#include <Adafruit_MPL115A2.h>


I don't know why it makes a difference. Arduino is funny that way.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: WICED Feather Problem with I2C libraries?

by hackoholic on Mon Apr 04, 2016 5:34 pm

That seems to have fixed the #include <Wire.h> call and the AIOTest.ino will compile with that new line. It still bombs if I add the #include <Adafruit_MPL3115A2.h> line below.

hackoholic
 
Posts: 25
Joined: Fri Mar 16, 2012 12:50 pm

Re: WICED Feather Problem with I2C libraries?

by hackoholic on Mon Apr 04, 2016 5:35 pm

I just noticed you are using the other MPL library. I have the 3115A2. Does it work for you using the MPL3115A2 library?

hackoholic
 
Posts: 25
Joined: Fri Mar 16, 2012 12:50 pm

Re: WICED Feather Problem with I2C libraries?

by adafruit_support_rick on Tue Apr 05, 2016 7:47 am

Huh. Well, that's a bug in the WICED Wire library. It should have that overload of EndTransmission. Maybe it just hasn't been implemented yet.

I'll see if anybody knows about this...

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: WICED Feather Problem with I2C libraries?

by ktownsend on Tue Apr 05, 2016 8:12 am

Thanks for reporting this. The Wire.h file is based on Maple, and it looks like it hasn't kept pace with recent changes to Wire. We'll get this updated in the next WICED release, and I can send a link to the development branch once the update is live (I'll post a link here when the fix is available).

ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: WICED Feather Problem with I2C libraries?

by hackoholic on Tue Apr 05, 2016 1:07 pm

Wow direct from the source! Thanks for looking into it and I look forward to the link once the updates are made.

hackoholic
 
Posts: 25
Joined: Fri Mar 16, 2012 12:50 pm

Re: WICED Feather Problem with I2C libraries?

by ktownsend on Tue Apr 05, 2016 2:52 pm

You can try making the changes here manually if you want, but this /should/ fix the issue: https://github.com/adafruit/Adafruit_WI ... ea46a9ebbf

If you do have a chance to test, please let us know the results!

ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: WICED Feather Problem with I2C libraries?

by hackoholic on Tue Apr 05, 2016 3:47 pm

Ok, I manually made the same changes to the two files that you did and it now successfully compiles with the two stated #include statements! It doesn't matter if they are first or last, it still compiles. My sketch now runs and appears to get on my wifi, connect to Adafruit.io but then it fails to connect to my MPL3115A2 sensor.

This is the output of the serial monitor:

AIO Test Example

Bootloader : 1.0.0
WICED SDK : 3.5.2
FeatherLib : 0.5.0
Arduino API : 0.5.0

Please wait while connecting to: 'Rogers1' ... Connected!

SSID : Rogers1 (-57 dBm)
Encryption : WPA2_AES
MAC Address : 44:39:C4:EB:B7:56
Local IP : 192.168.0.114
Gateway : 192.168.0.1
Subnet Mask : 255.255.255.0

Connecting to io.adafruit.com ... OK
Couldnt find sensor
[ONOFF Feed] : OFF
Couldnt find sensor
Couldnt find sensor
Couldnt find sensor
Couldnt find sensor........


Should I recreate a new support request in an area more appropriate for the MPL3115A2, or can we continue troubleshooting here? I can post my full sketch once I know the proper place to put it.

hackoholic
 
Posts: 25
Joined: Fri Mar 16, 2012 12:50 pm

Re: WICED Feather Problem with I2C libraries?

by hackoholic on Tue Apr 05, 2016 3:47 pm

Ok, I manually made the same changes to the two files that you did and it now successfully compiles with the two stated #include statements! It doesn't matter if they are first or last, it still compiles. My sketch now runs and appears to get on my wifi, connect to Adafruit.io but then it fails to connect to my MPL3115A2 sensor.

This is the output of the serial monitor:

AIO Test Example

Bootloader : 1.0.0
WICED SDK : 3.5.2
FeatherLib : 0.5.0
Arduino API : 0.5.0

Please wait while connecting to: 'Rogers1' ... Connected!

SSID : Rogers1 (-57 dBm)
Encryption : WPA2_AES
MAC Address : 44:39:C4:EB:B7:56
Local IP : 192.168.0.114
Gateway : 192.168.0.1
Subnet Mask : 255.255.255.0

Connecting to io.adafruit.com ... OK
Couldnt find sensor
[ONOFF Feed] : OFF
Couldnt find sensor
Couldnt find sensor
Couldnt find sensor
Couldnt find sensor........


Should I recreate a new support request in an area more appropriate for the MPL3115A2, or can we continue troubleshooting here? I can post my full sketch once I know the proper place to put it.

hackoholic
 
Posts: 25
Joined: Fri Mar 16, 2012 12:50 pm

Re: WICED Feather Problem with I2C libraries?

by hackoholic on Tue Apr 05, 2016 3:56 pm

Ok, just ran the example testmpl3115a2.ino with one simple addition.

Added:
#include <adafruit_feather.h>

as the third include statement.

Same exact results as previous serial output with just a never ending list of "Couldnt find Sensor". I've double checked my wiring so it is possible there is still a I2C problem or a problem with the Wire libraries in the STM32 folder?

hackoholic
 
Posts: 25
Joined: Fri Mar 16, 2012 12:50 pm

Re: WICED Feather Problem with I2C libraries?

by ktownsend on Tue Apr 05, 2016 4:06 pm

I think we need to redo the Maple Wire code with the stop condition handling since it's somewhat behind here, but it's an important change.

Do you mind filing an issue here and reference this thread: https://github.com/adafruit/Adafruit_WICED_Arduino ... that will help keep everyone involved up to date as things change, etc. Thanks for bringing this up, though.

ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: WICED Feather Problem with I2C libraries?

by hackoholic on Thu Apr 07, 2016 7:07 am

Just wanted to say thanks for the excellent work! The latest fixes that were very quickly added to the development branch (linked to above), have fixed the problem and I am now reliably talking to the sensor and able to publish to io.adafruit.com. Very impressed and very appreciative!

hackoholic
 
Posts: 25
Joined: Fri Mar 16, 2012 12:50 pm

Please be positive and constructive with your questions and comments.