Question: Blynk and the Feather M0 WiFi w/ATWINC1500

Hello Blynk folks,

Adafruit has a new board called : Feather M0 WiFi w/ATWINC1500

Is Blynk supporting this board now?

Thanks.

No, we don’t support it directly yet.
But you can try selecting the most similar Arduino board and there’s good chance it will work.

2nd this request. The feather system is growing quite large and it would be great to support it. They also have the new WICED and LoRa and packet radio boards but because the WINC1500 is so popular and there are breakouts as well it would probably be the logical first choice for support.

Actually now that I think about it the Wifi101 shield also uses the WINC1500 and is working with Blynk so it might not be too difficult to get the feather version going.

@ITAlex @mnelsoneorm Could you check if Wifi101 example works with your Feather?

@mnelsoneorm @vshymanskyy

I just recently purchased one of these. I loaded up the Arduino_WiFi_Shield_101 sketch & filled in the appropriate data.

All I get in the serial monitor is [4409] WiFi shield not present

I was able to use the Adafruit_WINC1500 library with http://arduino.cc/en/Tutorial/WifiWebClientRepeating to do the web test successfully, so the WiFi does work using Adafruit_WINC1500.h

If you need more information or want me to try something, let me know. I tried using their library for WiFi & BlynkSimpleStream.h … Not having a lot of luck there.

#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <SPI.h>
#include <WiFi101.h>
#include <BlynkSimpleWiFiShield101.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "MYAUTHCODE";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "MYNETWORK";
char pass[] = "SUPERSECRET";

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
  // Or specify server using one of those commands:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
  //Blynk.begin(auth, ssid, pass, server_ip, port);
}

void loop()
{
  Blynk.run();
}

@vshymanskyy

[4409] WiFi shield not present

Mybe try with Arduino_WiFi_Shield (regular) ?

@vshymanskyy

No output using Arduino_WiFi_Shield – doesn’t appear to do anything.

I am looking into this as well. From the Adafruit learning page about the Feather M0, “This library is a light fork of the official Arduino Wifi101 library, the only real changes are to allow changes to the default pin usage.”

It seems this might be just a pin number issue.

@vshymanskyy, @jnheinz

I haven’t tested all the widgets yet, but I got Blynk to connect with my Feather M0 WiFi.

I added some lines to Arduino_WiFi_Shield_101.ino as follows…

/**************************************************************
* Blynk is a platform with iOS and Android apps to control
* Arduino, Raspberry Pi and the likes over the Internet.
* You can easily build graphic interfaces for all your
* projects by simply dragging and dropping widgets.
*
*   Downloads, docs, tutorials: http://www.blynk.cc
*   Blynk community:            http://community.blynk.cc
*   Social networks:            http://www.fb.com/blynkapp
*                               http://twitter.com/blynk_app
*
* Blynk library is licensed under MIT license
* This example code is in public domain.
*
**************************************************************
* This example shows how to use Arduino WiFi 101 shield
* to connect your project to Blynk.
*
* NOTE: You may need to install WiFi101 library through the
*       Arduino IDE Library Manager.
*
* Feel free to apply it to any other example. It's simple!
*
**************************************************************/

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <SPI.h>
#include<Adafruit_WINC1500.h> //#include <WiFi101.h>
#include <BlynkSimpleFeatherM0.h> //#include <BlynkSimpleWiFiShield101.h>

// Define the WINC1500 board connections below.
// If you're following the Adafruit WINC1500 board
// guide you don't need to modify these:
#define WINC_CS   8
#define WINC_IRQ  7
#define WINC_RST  4
#define WINC_EN   2     // or, tie EN to VCC

// Setup the WINC1500 connection with the pins above and the default hardware SPI.
Adafruit_WINC1500 WiFi(WINC_CS, WINC_IRQ, WINC_RST);

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "MyToken";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "MyNetwork";
char pass[] = "MyPassword";

void setup()
{
#ifdef WINC_EN
  pinMode(WINC_EN, OUTPUT);
  digitalWrite(WINC_EN, HIGH);
#endif

  Serial.begin(9600);
  while (!Serial)
  {
    ;
  }

  Blynk.begin(auth, ssid, pass);
  // Or specify server using one of those commands:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
  //Blynk.begin(auth, ssid, pass, server_ip, port);
}

void loop()
{
  Blynk.run();
}

I also created a “BlynkSimpleFeatherM0.h” from “BlynkSimpleWiFiShield101.h.” as follows…

/**
 * @file       BlynkSimpleFeatherM0.h
 * @author     Volodymyr Shymanskyy, modified by Don Pancoe
 * @license    This project is released under the MIT License (MIT)
 * @copyright  Copyright (c) 2015 Volodymyr Shymanskyy
 * @date       Jan 2016, modified July 2016
 * @brief
 *
 */

#ifndef BlynkSimpleFeatherM0_h //#ifndef BlynkSimpleWiFiShield101_h
#define BlynkSimpleFeatherM0_h //#define BlynkSimpleWiFiShield101_h

#ifndef BLYNK_INFO_CONNECTION
#define BLYNK_INFO_CONNECTION  "WiFi" //"Adafruit_WINC1500"
#endif

#include <Adafruit_WINC1500.h> //#include <WiFi101.h>
#include <Adapters/BlynkWiFiCommon.h>

static Adafruit_WINC1500Client _blynkWifiClient; //WiFiClient _blynkWifiClient;
static BlynkArduinoClient _blynkTransport(_blynkWifiClient);
BlynkWifiCommon Blynk(_blynkTransport);

#include <BlynkWidgets.h>

#endif
3 Likes

@DonPancoe @vshymanskyy

Rock & roll. Thanks man. I will test out some of the functionality as time allows.

[10225] Connecting to StarshipEnterprise
[16909] Connecting to StarshipEnterprise
[18242] IP: 10.0.0.155
[18254] Blynk v0.3.8 on Arduino Zero
[18259] Connecting to blynk-cloud.com:8442
[18891] Ready (ping: 47ms).

@DonPancoe

I had to comment this out to run it free of Arduino IDE… otherwise it just sits there waiting for the Serial port to be opened (fires up when I click on Serial Port Monitor)? I’m not a big guru. It now works on a USB power supply.

while (!Serial)
{
;
}

That is left over in a lot of Arduino code from the Leonardo that, unlike earlier ATMega 168 and 328 based Arduinos, did not reset the processor when the serial terminal connected. This code caused the processor to wait for a serial connection before running the rest of the program.

If you are not using the Blynk serial output, you can comment out those lines as you did, and you can also comment out the following line if you haven’t already.

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
1 Like

Oh, and I have verified that the button and slider widgets work. Next I will try virtual pins to pass I2C sensor readings to the app.

2 Likes

Confirmed: I2C sensors can report to the app via virtual pins.

2 Likes

Thsnks. We’ll add this as an example

1 Like

@vshymanskyy @DonPancoe - Did this ever get added as an example? I was just updating Blynk and checked the examples… still don’t see it there or Don’s modified library.

No need to modify any of the libraries.

  • Create as Arduino Zero

  • Include BlynkSimpleWiFiShield101.h and WiFi101.h in your Arduino sketch
    (or use Arduino_WiFiShield_101 example sketch)

  • In void setup() add the statement: WiFi.setPins(8, 7, 4, 2);

Everything will then work as it should!

@Berkelium Thank you for your contribution… however please make note of the time date stamps before posting. The topic you replied to is a year old :wink: