Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more. Accepting essential orders - here's how.
0

HUZZAH ESB8266 won't come online
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

HUZZAH ESB8266 won't come online

by NCRookie on Sat Feb 22, 2020 4:44 pm

Trying to get a new HUZZAH ESP8266 up and running for an IoT application interfacing with Mozilla-IoT and Blynk using a simple sketch copied from YouTube.

Code: Select all | TOGGLE FULL SIZE
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SoftwareSerial.h>
#include <SimpleTimer.h>

int pinValue1;
int pinValue2;
int pinValue3;
int pinValue4;


char auth[] = "znQcg0G00yZCOqrFP4XqoSzxx3_C5b0t";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "*********";  //actual values
char pass[] = "******";    // removed

SimpleTimer timer;

String myString; // complete message from arduino, which consistors of snesors data
char rdata; // received charactors

//for soil moisture
int firstVal ;
// This function sends Arduino's up time every second to Virtual Pin (1).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void myTimerEvent()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V1, millis() / 1000);
 
}



void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);

    timer.setInterval(1000L,sensorvalue1);

}

void loop()
{
   if (Serial.available() == 0 )
   {
  Blynk.run();
  timer.run(); // Initiates BlynkTimer
   }
   
  if (Serial.available() > 0 )
  {
    rdata = Serial.read();
    myString = myString+ rdata;
   // Serial.print(rdata);
    if( rdata == '\n')
    {
   //  Serial.println(myString);
// new code
String l = getValue(myString, ',', 0);
 


firstVal = l.toInt();


  myString = "";
// end new code
    }
  }

}

void sensorvalue1()
{
int sdata = firstVal;
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V2, sdata);

}


String getValue(String data, char separator, int index)
{
    int found = 0;
    int strIndex[] = { 0, -1 };
    int maxIndex = data.length() - 1;

    for (int i = 0; i <= maxIndex && found <= index; i++) {
        if (data.charAt(i) == separator || i == maxIndex) {
            found++;
            strIndex[0] = strIndex[1] + 1;
            strIndex[1] = (i == maxIndex) ? i+1 : i;
        }
    }
    return found > index ? data.substring(strIndex[0], strIndex[1]) : "";
}

// in Blynk app writes values to the Virtual Pin 10
BLYNK_WRITE(V10)
{
   pinValue1 = param.asInt(); // assigning incoming value from pin V10 to a variable

  Serial.print(pinValue1);

}


// in Blynk app writes values to the Virtual Pin 11
BLYNK_WRITE(V11)
{
   pinValue2 = param.asInt(); // assigning incoming value from pin V10 to a variable

  Serial.print(pinValue2);

}

I can make initial contact with Blynk - which responds by sending me an auth code - but after that is incorporated into the sketch and re-downloaded, Blynk just reports that the device is offline. Checking my router confirms that it is not online

I have tried uploading for boards 'Adafruit Feather HUXXAH ESP8266' and 'NodeMCU 1.0 (ESP-12E Module)' (one used in the YouTube) with the same results.

I am unsure what the Programmer specification should be - it is currently AVRISP-MkII although I am not sure how it came to be setnor what it should be
Last edited by adafruit_support_carter on Mon Feb 24, 2020 3:26 pm, edited 1 time in total.
Reason: added [code] tags

NCRookie
 
Posts: 49
Joined: Wed Aug 03, 2016 2:39 pm

Re: HUZZAH ESB8266 won't come online

by kcl1s on Sun Feb 23, 2020 7:54 am

Best course is to see if it is a hardware or code problem. Following this page of the product tutorial should check out the hardware side and show you the right procedures. https://learn.adafruit.com/adafruit-feather-huzzah-esp8266/using-arduino-ide

Fellow hobbyist
Keith

kcl1s
 
Posts: 1511
Joined: Tue Aug 30, 2016 12:06 pm

Re: HUZZAH ESB8266 won't come online

by NCRookie on Mon Feb 24, 2020 1:03 pm

I loaded the Blink program and got nothing until I unplugged the cable and replugged it and it started blinking - the same thing happened with the WiFi test. Is there a need to somehow take it out of bootloader mode?

I take exception to the statement on the above page that says, "The Feather HUZZAH has built in auto-reset that puts it into bootloading mode automagically". It took me multiple hours before I stumbled onto a reference on another Adafruit page that required pressing the GPIO0 and Reset buttons in the correct sequence which finally worked.

Is that the issue? That it is not going into and out of bootloader mode automagically?

NCRookie
 
Posts: 49
Joined: Wed Aug 03, 2016 2:39 pm

Re: HUZZAH ESB8266 won't come online

by adafruit_support_carter on Mon Feb 24, 2020 3:28 pm

Just to make sure, are you using the Breakout?
https://www.adafruit.com/product/2471
or the Feather?
https://www.adafruit.com/product/2821

adafruit_support_carter
 
Posts: 14974
Joined: Tue Nov 29, 2016 2:45 pm

Re: HUZZAH ESB8266 won't come online

by NCRookie on Mon Feb 24, 2020 3:58 pm

2471

NCRookie
 
Posts: 49
Joined: Wed Aug 03, 2016 2:39 pm

Re: HUZZAH ESB8266 won't come online

by kcl1s on Mon Feb 24, 2020 4:27 pm

NCRookie wrote:2471

Sorry! Your post mentioned you were using Feather board profile. I pointed you to the wrong tutorial. The breakout tutorial is here https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/overview

Keith

kcl1s
 
Posts: 1511
Joined: Tue Aug 30, 2016 12:06 pm

Re: HUZZAH ESB8266 won't come online

by NCRookie on Mon Feb 24, 2020 5:48 pm

It's getting worse - Arduino can no longer find the board on the port. CoolTerm can't connect to it either any more

NCRookie
 
Posts: 49
Joined: Wed Aug 03, 2016 2:39 pm

Re: HUZZAH ESB8266 won't come online

by adafruit_support_carter on Tue Feb 25, 2020 11:57 am

The PID 2471 Huzzah Breakout does NOT have built in auto-reset that puts it into bootloading mode automagically. Only the Feather version has that. For the breakout, you will need to do the GPIO0/RESET button press sequence as shown in the guide:
https://learn.adafruit.com/adafruit-huz ... -test-5-23

What are you using for a programming cable?

adafruit_support_carter
 
Posts: 14974
Joined: Tue Nov 29, 2016 2:45 pm

Re: HUZZAH ESB8266 won't come online

by NCRookie on Tue Feb 25, 2020 12:24 pm

The one Adafruit recommends for a Mac - I purchased it with the 8266.

NCRookie
 
Posts: 49
Joined: Wed Aug 03, 2016 2:39 pm

Re: HUZZAH ESB8266 won't come online

by adafruit_support_carter on Tue Feb 25, 2020 9:32 pm

It is the cable that creates the port that will be seen by your computer and the Arduino IDE. When you plug in the USB cable, what does the Mac do?

adafruit_support_carter
 
Posts: 14974
Joined: Tue Nov 29, 2016 2:45 pm

Re: HUZZAH ESB8266 won't come online

by NCRookie on Wed Feb 26, 2020 4:13 pm

I have a Macbook with USB-C port with a hub connected - a LED shows it is powered. When I insert the USB of the FTDI cable into the hub, a couple of LEDs in the cable connector flash, the red and blue LEDs on the 8266 flash and nothing.

A list of serial ports from the command line does not contain /dev/cu.usb.serial-ABOJTAAL - the port where the 8266 was found in the past.

NCRookie
 
Posts: 49
Joined: Wed Aug 03, 2016 2:39 pm

Re: HUZZAH ESB8266 won't come online

by adafruit_support_carter on Thu Feb 27, 2020 12:12 pm

There are a couple of cable options, are you using this one:
https://www.adafruit.com/product/954
or this one:
https://www.adafruit.com/product/70

In either case, did you install drivers?
For PID954, see here:
https://learn.adafruit.com/adafruits-ra ... lation-mac
For PID70, see here:
https://www.ftdichip.com/Drivers/VCP.htm

adafruit_support_carter
 
Posts: 14974
Joined: Tue Nov 29, 2016 2:45 pm

Re: HUZZAH ESB8266 won't come online

by NCRookie on Thu Feb 27, 2020 2:44 pm

70

I could communicate with the board when I first got it, but it was glitchy. Now it doesn't work at all.

NCRookie
 
Posts: 49
Joined: Wed Aug 03, 2016 2:39 pm

Re: HUZZAH ESB8266 won't come online

by adafruit_support_carter on Thu Feb 27, 2020 6:02 pm

Do you mean board or cable? If something is wrong with the cable, either hardware or software (no drivers, Mac OS quirk, etc.), then you won't be able to successfully talk to the board (the HUZZAH). Even if there was something wrong with the HUZZAH, your Mac should still see the cable just fine. But it sounds like it's not doing that?

Keep in mind the cable is more than just copper. There's a USB to serial converter chip buried in the plastic housing.

adafruit_support_carter
 
Posts: 14974
Joined: Tue Nov 29, 2016 2:45 pm

Re: HUZZAH ESB8266 won't come online

by NCRookie on Fri Feb 28, 2020 9:54 am

If the Mac should be seeing the cable even without the 8266, it's not. Since it doesn't seem that the drivers would suddenly disappear, I'm going to bet on a defective cable.

NCRookie
 
Posts: 49
Joined: Wed Aug 03, 2016 2:39 pm

Please be positive and constructive with your questions and comments.