Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Reduce boilerplate in the sketch #9

Closed

Conversation

sandeepmistry
Copy link
Contributor

To start the discussion to resolve #5 and #6. This will also allow us to have unified examples for all platforms.

Later on, we could also use this class to make the Azure SDK API's more Arduino style instead of C.

@stefangordon @obsoleted please review and provide feedback. I've tested on a MKR1000, and made sure the new example compiles on other supported platforms.


AzureIoTHubClass AzureIoTHub;

#if defined(ARDUINO_SAMD_FEATHER_M0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ladyada there is potential to remove use of Adafruit_WINC1500 library in this library and just use WiFi101 if the variant for the "Adafruit Feather M0 WiFi" board defines following WINC1500 pin values like the MKR1000: https://github.com/arduino/ArduinoCore-samd/blob/master/variants/mkr1000/variant.h#L137-L143

@ladyada
Copy link

ladyada commented Apr 7, 2016

ok - i'll try it!
can we also update all the examples to not have a 10 second wait on wifi connect? its often 2 seconds, and it makes the WINC seems slower than it really is :)

adafruit/Adafruit_WINC1500@7748c72#diff-1425a7d9293c2f199af50199fa6cc69fL36

@sandeepmistry
Copy link
Contributor Author

can we also update all the examples to not have a 10 second wait on wifi connect? its often 2 seconds, and it makes the WINC seems slower than it really is :)

@ladyada please create an issue in the WiFi101 library to discuss this. From my testing the delay seems unnecessary for unsuccessful connection. I've been using:

  while (WiFi.begin(ssid, pass) != WL_CONNECTED) {
    // unsuccessful, retry in 4 seconds
    Serial.print("failed ... ");
    delay(4000);
    Serial.print("retrying ... ");
  }

@sandeepmistry
Copy link
Contributor Author

After discussing with @cmaglie we should not have WiFi configuration code inside the library. I'm closing this and will propose something else.

@ladyada
Copy link

ladyada commented Apr 8, 2016

@sandeepmistry ok will make new issue for delay thingy, i definitely noticed delay makes a difference and it drove me a little nuts to wait 💃

as for the WiFi101 thingy, whatever you like. i strongly prefer passing in the pin names as args (and you can default them if you like) but just lemme know and ill update/delete fork/whatever 👍

@sandeepmistry
Copy link
Contributor Author

as for the WiFi101 thingy, whatever you like. i strongly prefer passing in the pin names as args (and you can default them if you like) but just lemme know and ill update/delete fork/whatever

@ladyada let's get a discussion going in the WiFi101 repo for this as well

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce boilerplate in sketch code
2 participants