Question: Blynk and the Feather M0 WiFi w/ATWINC1500

@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