Adafruit is open and shipping! Let's build back better, together!
0

Hazza ESP 8266, Made it WOrk but -- Some lessons
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Hazza ESP 8266, Made it WOrk but -- Some lessons

by vadaparty on Mon May 25, 2015 10:06 pm

Hello
First -- Thanks to Ladyada's break out, I was able to work on both (and only 2) of the lesson modules on (Hazza) ESP8266 in the learning modules. We need more (see below).
I am a big fan of this site/products/tools/forum/...

For all the following discussion -- I used Arduino 1.6.4 -- the latest IDE. Downloaded from Adafruit, and then added ESP8266 from the community (see below).

The two lessons I am talking about are:
https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout
https://learn.adafruit.com/esp8266-temperature-slash-humidity-webserver?view=all

Observation 1: Compiler errors, not showing examples, ESPTOOL needed or not, etc.
This was a big topic discussed in various forum posts -- over a couple of weeks...

I struggled with all of the above.
Finally broke down and used ESP8266's community JSON into the board-manager (in the preferences ... in the additional board-manager URLs).
see below.

ESP8266 Community Install.png
ESP8266 Community Install.png (49.54 KiB) Viewed 295 times


With this, there is no need to worry about esptool, and the examples show up fine. See below.

ESP8266 Examples.png
ESP8266 Examples.png (128.38 KiB) Viewed 295 times


And...also

Esp8266 Programmer choices.png
Esp8266 Programmer choices.png (117.27 KiB) Viewed 295 times



Observation 2: Mike Barela's example on DHT with ESP8266 works.

However, two issues

(a) it does not keep the connection open for long (>5 mins). Dont understand why/how to fix it. Any ideas?

(b) it required me to change DHT's intialization code from "11" to "30" in the following:

// Initialize DHT sensor
// NOTE: For working with a faster than ATmega328p 16 MHz Arduino chip, like an ESP8266,
// you need to increase the threshold for cycle counts considered a 1 or 0.
// You can do this by passing a 3rd parameter for this threshold. It's a bit
// of fiddling to find the right value, but in general the faster the CPU the
// higher the value. The default for a 16mhz AVR is a value of 6. For an
// Arduino Due that runs at 84mhz a value of 30 works.
// This is for the ESP8266 processor on ESP-01
DHT dht(DHTPIN, DHTTYPE, 11); // 11 works fine for ESP8266

I needed to change "11" back to "30" either because he was using 01 module of ESP8266 or something else.

Observation 3: Would like adafruit to develop a few critical libraries that make all our Arduino code work seemlessly into "IOT" model. Say, for example, using software serial, a library allows us to write arduino receives inputs from the library and sends outputs to the library (all software serial); the library in turn sends to ESP8266 as response to incoming REST-requests, or initiated by arduino to store in Adafruit's IOT space.

This will help immensely the arduino programmers. Hope I am not dreaming.

Thanks for reading,

Kumar Vadaparty

vadaparty
 
Posts: 70
Joined: Wed Jun 11, 2014 6:39 pm

Re: Hazza ESP 8266, Made it WOrk but -- Some lessons

by adafruit2 on Tue May 26, 2015 12:31 pm

thanks! the ESP community is changing very fast - so we're working hard to keep caught up :D

adafruit2
Site Admin
 
Posts: 19494
Joined: Fri Mar 11, 2005 7:36 pm

Re: Hazza ESP 8266, Made it WOrk but -- Some lessons

by vadaparty on Tue May 26, 2015 12:36 pm

Thanks. BTW any answer on why Hazza is disconnecting, as I mentioned above (especially in the Mike Barela's example)

vadaparty
 
Posts: 70
Joined: Wed Jun 11, 2014 6:39 pm

Please be positive and constructive with your questions and comments.