Giter Site home page Giter Site logo

esp8266-am2321-remote-sensor's Introduction

ESP8266 NodeMCU and AM2321 Remote Sensor

ESP8266 with NodeMCU & AM2321 Temperature & Humidity sensor with web interface. Basically this project allow you to show AM2321 readings in web browser in normal HTML format or XML format. You should treat this as example than fully working "remote sensor". I have still trouble with heap (that goes too low) because of my software i2c lib.

To communicate with AM2321 I had to create (copy my i2c library for AVRs) software I2C library because library builtin into NodeMcu didn't want to talk with AM2321 (I don't know why, and I didn't dug into).

Getting things to work

I assume that you have working ESP8266 with flashed NodeMCU... I'm using ESPloer for loading scripts. After loading script the ESPloere have "feature" (annoying one) that runs the script. So after loading each script you have to hard reset (by hardware - not by software because this does not release all heap). After reset, you compile uploaded script. You only do not compile init.lua and this script should be the last one to be uploaded ๐Ÿ˜„ . I have tested this "installation" of my scripts ๐Ÿ˜„

  1. upload to ESP my-i2c.lua
  2. Hard-reset ESP and compile my-i2c.lua
  3. upload am2321.lua
  4. Hard-reset ESP and compile am2321.lua
  5. upload httpd-sensor.lua
  6. Hard-reset ESP and compile httpd-sensor.lua
  7. Upload configServer1.lua
  8. Hard-reset ESP and compile configServer1.lua
  9. Now you can configure sensor if you want (connect to created SSID by ESP and save configuration)
  10. upload init.lua and hard-reset

Now if you didn't connected your ESP to your WiFi. ESP should start config server by creating new WiFi network with "SvrSens-" prefix and 3 last bytes of MAC address.

Now connect to this network (I have used tablet) and open in web browser address 192.168.4.1 .

If you want to reconfigure ESP with this sensor-server, then the fastest way is to connect serial console and rename init.lua to anything else e.g.: =file.rename("init.lua","init0.lua"), then hard-reset ESP and manually run ```dofile("configServer1.lc")```` . Or walking out of range your AP should should also load from init configServer1 but I didn't tested it.

Screenshots

esp8266-am2321-remote-sensor's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.