WiDo Board Experiencing Strange Issues with Blynk, Halting and Catching Fire

The WiDo board is a clone of Arduino Leonardo with a CC3000 chip.

Originally I had ZERO luck following the instructions on the WiDo website, so I decided to try and link up to Blynk myself. I used the sketch designer on the Blynk website, API/Auth Key in my email, and uploaded the sketch to the device. At first I thought maybe I was doing something wrong…

So when that didn’t work, I followed an instruction guide that someone made for this exact combination of products. https://interactingobjects.com/discovering-blink-and-making-it-work-on-dfrobot-wido/ This guy has a YouTube video of a successful connection, provides his sketch and all of the necessary files, libraries, and parts to make it work. I followed these instructions to an “Io-T.” See what I did there?

I have 3 LEDs (Red, Yellow, Green) wired up to PINs 13, 12, 11 respectively alongside 3 x 220 ohm resistors and a jumper from the 5V output on the board to the (+) rail on the breadboard.

From there I input my WiFi credentials for my 2.4 GHz network into the config.h file I downloaded:

#define WLAN_SSID      "XxxXxxx"
#define WLAN_PASS      "xxxxxx"
#define WLAN_SECURITY  WLAN_SEC_WPA2 

char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";

Code:

// CC3000 / Wido pins
#define ADAFRUIT_CC3000_IRQ   7
#define ADAFRUIT_CC3000_VBAT  5
#define ADAFRUIT_CC3000_CS    10

#include <SPI.h>
#include <Adafruit_CC3000.h>
#include <BlynkSimpleCC3000.h>

#include "config.h"  // Contains wifi and Blynk info

// OUT
#define pinLedRed 13
#define pinLedYellow 12
#define pinLedGreen 11
void setup()
{

  Serial.begin(9600);  //for debugging - disable once live.

  pinMode(pinLedGreen,OUTPUT);
  pinMode(pinLedYellow,OUTPUT);
  pinMode(pinLedRed,OUTPUT);

  // On Leonardo, wait for the Serial monitor to be opened 
  // so we get debug from the begining (for debugging)
  digitalWrite(pinLedGreen,HIGH);  delay(500);
  //while(!Serial);
  digitalWrite(pinLedYellow,HIGH); delay(500);
 
  Serial.println("Initializing Blynk using Wifi (CC3000 compatible)");
  Blynk.begin(auth, WLAN_SSID, WLAN_PASS, WLAN_SECURITY);
  Serial.println("Initialized !");
  
  digitalWrite(pinLedRed,HIGH);    delay(500);
  digitalWrite(pinLedGreen,LOW);
  digitalWrite(pinLedYellow,LOW);
  digitalWrite(pinLedRed,LOW);

}

long lastHB=0;
long valHB=0;

void loop()
{
  Blynk.run();                //start polling the system and reporting to the Blynk app.
  
  // Sends a heartbeat to Blynk
  // and make one of the led real leds blink
  if(millis()-lastHB > 1000) {
    if(valHB==LOW) valHB=HIGH; else valHB=LOW;
    Blynk.virtualWrite(1, valHB);   
    digitalWrite(pinLedGreen,valHB);
    lastHB=millis();
  }
}

When I press the upload button I can see the RED LED blinking along with the onboard LED since I think PIN 13 is tied to this… I watch it upload… and it starts in to the loop then stops… The entire board just stops working and the power LED sits there static after the loop runs for about 2 seconds.

If I remove all of the WIFI/CC3000 libraries and code the loop will run just fine. But whenever I invoke the Wifi connection using the CC3000 library it halts again. Every now and then, the Blynk app will recognize that the device came online for a few milliseconds or so and report the last time it was offline, but I can never get it to an Online state perpetually.

One exception to this, is using the prebuilt sketch to connect to wifi using Carriots. This is the only sketch I can get to work with the wifi chip on the board. Its a simple sketch that reports real time temperature to the Carriots server. It succesfully establishes a wifi connection to my router, connects to the carriots server, authenticates my account, and runs its loop successfully. Nothing is different from what I can see about how the library is invoked or the commands for the credentials etc.

However, IRONICALLY after I let this run for awhile, the board eventually got to over 100 degrees F and halted once more in the middle of serial output. (Although I was simultaneously powering it with USB and a 12V/1A power adapter. Dont think this was the problem, maybe just the high frequency of traffic requests of sending data to carriots? Anways…

I never tried to include the Blynk connection info simultaneously inside of this sketch although that would be an interesting test just to see if it would identify itself as online.

So I decided to enable all console warnings and verbose messages…

Error Msg’s:

"C:\Users\Matthew\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Users\Matthew\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\cores\arduino" "-IC:\Users\Matthew\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\variants\leonardo" "-ID:\Users\Matthew\Documents\Arduino\libraries\Adafruit_CC3000" "-IC:\Users\Matthew\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\libraries\SPI\src" "-ID:\Users\Matthew\Documents\Arduino\libraries\Blynk\src" "C:\Users\Matthew\AppData\Local\Temp\arduino_build_182693\sketch\BlynkLedTest.ino.cpp" -o "C:\Users\Matthew\AppData\Local\Temp\arduino_build_182693\sketch\BlynkLedTest.ino.cpp.o"
In file included from D:\Users\Matthew\Documents\Arduino\libraries\Blynk\src/BlynkSimpleCC3000.h:13:0,

                 from D:\Users\Matthew\Documents\Arduino\BlynkLedTest\BlynkLedTest.ino:24:

D:\Users\Matthew\Documents\Arduino\libraries\Blynk\src/Adapters/BlynkCC3000.h: In member function 'bool BlynkTransportCC3000::connect()':

D:\Users\Matthew\Documents\Arduino\libraries\Blynk\src/Adapters/BlynkCC3000.h:52:18: warning: unused variable 'a' [-Wunused-variable]

         uint8_t* a = (uint8_t*)&addr;

                  ^

Compiling libraries...
Compiling library "Adafruit_CC3000"

You have a two fold issue… first, the CC3000 is generally considered an unstable chip. Search around this forum for “CC3000” and read for yourself… some have had results, but generally not without a fight.

Seriously… get something different.

Oh, it WAS the problem!

Aside from the CC3000, who knows the overall quality of the rest of the board?? Pumping 12v through a 5v regulator at whatever top current that boards draws when fully running (MCU and WiFi) will be dissipating about 6-7 watts of heat.

I have seen the same thing (minus the catchy Netflix show name in the title :wink: ) when running my Mega on 12v power for any length of time. Find a lower voltage power adapter, say 7-9v DC range.

PS… You can shorten that looong error list a little bit (aka, delete and burn it)… It contributes almost nothing to the forum but a shortened lifespan on the scroll wheel :stuck_out_tongue_winking_eye:

Well I managed to narrow down the problem to the actual Blynk CC3000 Library, not the adafruit library.

Please see the revised Error Log.

"C:\Users\Matthew\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Users\Matthew\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\cores\arduino" "-IC:\Users\Matthew\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\variants\leonardo" "-ID:\Users\Matthew\Documents\Arduino\libraries\Adafruit_CC3000" "-IC:\Users\Matthew\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\libraries\SPI\src" "-ID:\Users\Matthew\Documents\Arduino\libraries\Blynk\src" "C:\Users\Matthew\AppData\Local\Temp\arduino_build_182693\sketch\BlynkLedTest.ino.cpp" -o "C:\Users\Matthew\AppData\Local\Temp\arduino_build_182693\sketch\BlynkLedTest.ino.cpp.o"
In file included from D:\Users\Matthew\Documents\Arduino\libraries\Blynk\src/BlynkSimpleCC3000.h:13:0,

                 from D:\Users\Matthew\Documents\Arduino\BlynkLedTest\BlynkLedTest.ino:24:

D:\Users\Matthew\Documents\Arduino\libraries\Blynk\src/Adapters/BlynkCC3000.h: In member function 'bool BlynkTransportCC3000::connect()':

D:\Users\Matthew\Documents\Arduino\libraries\Blynk\src/Adapters/BlynkCC3000.h:52:18: warning: unused variable 'a' [-Wunused-variable]

         uint8_t* a = (uint8_t*)&addr;

                  ^

Compiling libraries...
Compiling library "Adafruit_CC3000"

Things do change over time, instead of relying on older Web tutorials and YouTube videos, have you tried any of the the up-to-date sketches in the Sketch Builder (link at the top right of this page) :

https://examples.blynk.cc/?board=Arduino%20Uno&shield=CC3000&example=GettingStarted%2FBlynkBlink

Also make sure you are using the latest App and Library versions.

Yep,

This is actually when I started experiencing issues… The older tutorial was my method of trying to diagnose the problem. Determine if it was

A. Me…
B. The board… or
C. Incompatibility

I was testing the NeoPixel example I had generated. Thats when my board decided to reset itself out of the blue while I was connecting my neopixel strip to the board. It kept disconnecting and reconnecting, changing COM ports, and then it stabilized itself.

But I also discovered this morning, according to the older tutorial, there is a difference in the IRQ Pin for the DFRobot’s WiDo pairing of Leonardo/CC3000 combo from if I had purchased the two boards separately and combined them. This changes the IRQ 3 to 7.

I’m thinking about trying these sketches again using that slight modification as I was just able to re-engineer the “old tutorial” code and get it functioning. Now it is succesfully connecting to my WiFi network but after 30 seconds or so it just stops polling. Which is starting to point towards as you mentioned, instability of the wireless chip.

I had something similar with an Ethernet shield with the equally iffy W5100 chip… Much fiddling around with libraries, settings, pins and such… sometimes it would work, but only to die later… It got to the point where the “value” of the board vs my limited sanity was compared and rejected… I tossed it out and now use USB link (until I can get some real toys like ESP based boards) :stuck_out_tongue_winking_eye: