Git Product home page Git Product logo

seismocloud-sensor-nodemcu's Introduction

SeismoCloud project: http://www.seismocloud.com

For ๐Ÿ‡ฎ๐Ÿ‡น Italian, see README.ita.md

Build Status

Supported boards

  • NodeMCU 1.0 devkit (with ESP-12E module - ESP8266)

Network requirements

The device will acquire all IPv4 configurations (address, netmask, gateway, DNS) via DHCP.

If you have any firewall in your network, please allow these ports (outgoing, to internet):

  • TCP: 443, 1883

LED status description

LEDs can be in these different states (empty cells means "OFF"):

Green Yellow Red Status
ON Device is idle and listening
ON ON The device has lost its connection, and it's trying to reconnect
ON ON A vibration/shake is detected!
ON ON ON The device is connecting to the SeismoCloud network
ON ON Checking for updates or updating
ON Connecting to Wi-Fi network*
ON Calibration in progress

At the end of the boot sequence all three LEDs will blink rapidly to signal that it's OK.

*: If only the yellow LED is ON for more than 10 seconds then the NodeMCU is waiting for Wi-Fi network configuration (see the chapter "How to build/upload the software")

How to build the device (hardware)

Requirements

  • Wi-Fi network (WPA-PSK, WPA2-PSK, open)
  • Arduino/Genuino IDE with ESP8266 sdk installed. If you haven't ESP8266 sdk:
    • Open Preferences window (from File menu)
    • Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
    • Close with "OK", open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select NodeMCU 1.0 (ESP-12E) board from Tools > Board menu after installation).
  • Arduino/Genuino IDE libraries: WiFiManager, PubSubClient
    • Open Include Libraries from Sketch menu, and choose Manage Libraries
    • Type WiFiManager into search bar, then install it by clicking on Install button below; the same for PubSubClient
    • Close window
  • NodeMCU 1.0 devkit board with ESP-12E module
  • MPU6050 Accelerometer
  • (optional) 3 LEDs (red-green-yellow) with 3 resistors

Tested with Arduino/Genuino IDE 1.8.10, board SDK esp8266 2.6.2, libraries PubSubClient 2.7 and WiFiManager 0.15.0-beta

Wiring the Accelerometer MPU6050

Link these pins from Accelerometer MPU6050 to NodeMCU board:

  • 3v3: 3v3
  • GND: GND
  • SDA: D1
  • SCL: D2

Wiring LEDs

Remember to put a resistor with LED (after/before is not really important) to limit current flowing, otherwise you may damage the NodeMCU board.

By default, LED pins are:

  • Pin D5 : Green
  • Pin D6 : Yellow
  • Pin D7 : Red

How to build/upload the software

For NodeMCU, you need to download WifiManager library (by using Sketch > include library > library manager)

  1. Download the source code (for stable releases, please checkout latest git tag)
  2. Open project in Arduino IDE
  3. Choose the right Port and Board into Tools menu (if you're unsure, use NodeMCU 1.0)
  4. Compile and upload (2nd button below menus) in your board
  5. Connect to SeismoCloud Wi-Fi network and configure Wi-Fi client network parameters. On save, the board reboots and will try to connect to Wi-Fi network. If it fails, you can reconnect to SeismoCloud network and modify/fix network parameters.
  6. Open SeismoCloud app, connect to the same network of the board and register your device. Enjoy!

FAQ

My device has only the yellow LED powered on for more than 10 seconds

The sensor failed to connect to the Wi-Fi network. Please follow the instruction in chapter "How to build/upload the software" step 5

I'm connected to the Wi-Fi network, but no configuration portal appears.

Try to open a browser and navigate to http://192.168.4.1 . If the Wi-Fi portal still not showing, disconnect the board from the power source for few seconds. If it still fails, flash again the board erasing the Wi-Fi configuration using the option from the Tools menu.

License

See LICENSE file

seismocloud-sensor-nodemcu's People

Contributors

enrico204 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

seismocloud-sensor-nodemcu's Issues

No Wifi After Flashing

Followed directions exactly. No issues along the way. However, I never see the 'Seimocloud' Wifi network I'm supposed to. Any ideas?

Reboot issue

Hello, I followed all the indications but unfortunately my esp8266 makes continuous reboots, this is the console output:

ets Jan 8 2013, rst cause: 1, boot mode: (3,6)

load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v00077590

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.