HOME - - - - - - - - Table of contents, my Arduino "How To" articles
Other material for programmers

Arduservers running on an Adafruit Feather ESP8266 with I2C sensors

This page created in February 2022. The Adafruit Feather ESP8266 (link to Adafruit's product page) has been around for a while at that time. It is just one of many ways to enjoy the ESP8266 chip... but one I would recommend.

-

I've prepared a more general introduction to the ESP 8266 Thing for you, which is a similar device. This page talks about an implementation of my Arduserver idea on a Huzzah ESP8266. (I keep saying "ESP8266" because "Feather" is a family of devices.)

THIS PAGE IS NOT COMPLETE

... but I hope it will still have enough to be worth your time.

I should stress: I have not (yet) published my sourcecode here, contrary to my usual practices. I will try to rectify that... but "life" is a bit "full" just now.

The project described here was my first foray with the Huzzah ESP8266... but prior experience with the Sparkfun Dev Thing code served me well. The program I created was very heavily based on previous programs made for the Dev Thing. The webpage serving was unchanged, as I recall. I merely tinkered with the parts that accessed some sensors... I'm an I2C newbie... and the content of the served page. I drew heavily on the work of others.

Just as my other my other Arduservers do, this one, "ArduHuzzahI2C-One", creates a webpage that is both "human friendly", but it also has, buried in a comment line, a machine-friendly line containing the values gathered from the sensors.

What sensors you have connected is easily changed, but ArduHuzzahI2C-One is written for two HTU31Ds connected on an I2C bus. Be advised: The two sensors must be close to one another. 50cm should be okay, but I haven't tested even that, yet. (My test rig has them about 20 cm apart. I have in mind installing the Arduserver on a wall, with one sensor in the room the Arduserver is in, and the other, courtesy of a hole though the wall, in an adjacent room.)

What they do...

Setting up the ESP8266 to respond to enquiries from browsers is not, in itself terribly complicated. Nor, because of the ESP8266, an expensive exercise. $17 (before tax, p&p at 2/22) for the Adafruit Feather HUZZAH ESP8266, and not as much again for the sensors, etc, you will connect to it. The Sparkfun Dev Thing is similarly priced. Be careful about the sensors you purchase... it must be possible to configure the two of them to "sit" on the I2C bus at different addresses.<--give specifics-->

In order to get your ArduHuzzahI2C-One "visible" outside of your own LAN, you will have to master all of the basic elements of putting anything on the internet. (The same series of pages also addresses the less complicated issues of getting a server visible inside your LAN.)

If you haven't worked much with IP addresses, DDNS, ports, servers: Scan what is below, and say to yourself "That sounds fun"... and then go off to the pages about putting things on the internet. You will thank me, in the long run! Or waste a lot of time learning the ropes the hard way, as I did... gathering "scraps" of knowledge in the wrong order!

The environment

The fact that you are reading this suggests you probably have what you need, if are reading it at home. In a school, there may be "issues" about connecting things to the network. Talk to your tech people.

And you need an ESP8266. $16. Big deal. Or an Arduino with an interface to your LAN. You'll have to tweak the code, to work with the alternative hardware.

The Arduserver is best installed first as something you access from a PC on the same LAN that the Arduserver is on. Using a numeric, local, IP address... something like "192.168.0.23". There's nothing "special" about any of this. Anything you might attach to the LAN would entail similar issues. An IP-cam(era), for instance.

Once you have it working thus, if you want people to be able to interact with your ESP8266 Arduserver from anywhere on the internet, with any web browser they like (e.g. Firefox), you need a few extra "bits"... but again, like the IP-cam install, there's nothing "special" about installing the Arduserver for such use. You need to put an entry in your router's NAT table, and you need a "dynamic DNS". Explained elsewhere... my pages and other people's. Mine are a bit chaotic... I will try to "organize" them. You could start at my Overview of Using and Creating Servers.... but don't let all THAT put you off! Get the Arduserver working on your LAN.. not especially hard... and the rest, if tedious, is not impossible. (Or expensive!)

The ArduHuzzahI2C-One has LOTS of room for expansion, because, as presented here only two digital I/O lines are tied up!

But that's something for the future. As I say... I hope to get this page further along for you one day. For the moment, I hope it encourages you in the thought that you can do A LOT with the ESP8266.

Although this web page is rudimentary, I can assure you that the device exists, and is working fine. I even have a basic "FarWatchWatcher" written, which draws a graph, based on data read from the ArduHuzzahI2C-One.

(The following is more for my benefit than yours for the moment... sorry!)

(IMAGE esp8266-huzzah-i2c-wiringLp1200637)

A few words from the sponsors...

Please get in touch if you discover flaws in this page. Please mention the page's URL. (esp8266/es_p8266-huzzah-i2c.htm).

Ways you are using your ESP8266 Thing would be of interest, too.

If you found this of interest, please mention in fora, give it a Facebook "like", Google "Plus", or whatever. I've almost given up writing these pages, because it seems they are seldom read, and of course not every reader will use them... so... is there any point? If you want more of this stuff, help!?



   Search this site                 powered by FreeFind
 
Site Map    What's New    Search


Click here to visit my main homepage where you can explore other areas, such as education, programming, investing.




Ad from page's editor: Yes.. I do enjoy compiling these things for you. I hope they are helpful. However... this doesn't pay my bills!!! Sheepdog Software (tm) is supposed to help do that, so if you found this stuff useful, (and you run a Windows or MS-DOS PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!
Click here to visit editor's freeware, shareware page.

How to email or write this page's editor, Tom Boyd


Valid HTML 4.01 Transitional Page has been tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org. Mostly passes.

AND passes... Valid CSS!


Why does this page cause a script to run? Because of the Google panels, and the code for the search button. Also, I have my web-traffic monitored for me by eXTReMe tracker. They offer a free tracker. If you want to try one, check out their site. Why do I mention the script? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....