SeismoCloud project: http://www.seismocloud.com
Original NodeMCU version: https://github.com/sapienzaapps/seismocloud-sensor-nodemcu
Note: This ESP32 port contains only minimal modifications necessary for ESP32 compatibility. The core seismic detection functionality remains completely untouched from the original version. Due to this unofficial port status, the DONT_UPDATE flag is set by default and must remain enabled to prevent the device from attempting to download NodeMCU firmware updates.
The pins for the MPU6050 and LEDs were chosen arbitrarily by me for convenient wiring, feel free to change them to suit your needs.
To change pin assignments, edit the following definitions:
- LEDs:
LED_RED,LED_YELLOW,LED_GREENinsrc/common.h(lines 14-16) - I2C (MPU6050):
WIRE_SDA,WIRE_SCLinsrc/MPU6050.h(lines 10-11)
- ESP32 DOIT DevKit v1 (most ESP32-WROOM dev boards should work)
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
LEDs can be in these different states (empty cells means "OFF"):
| Green | Yellow | Red | Status |
|---|---|---|---|
| ON | Device is idle and listening | ||
| ON | The device has lost its connection, and it's trying to reconnect | ||
| 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 ESP32 is waiting for Wi-Fi network configuration (see the chapter "How to build/upload the software")
- Wi-Fi network (WPA-PSK, WPA2-PSK, open)
- PlatformIO Core (CLI) or PlatformIO IDE
- Install PlatformIO Core: https://docs.platformio.org/en/latest/core/installation/index.html
- Or install PlatformIO IDE (VSCode extension): https://platformio.org/install/ide?install=vscode
- ESP32 DOIT DevKit v1 board
- MPU6050 Accelerometer
- (optional) 3 LEDs (red-green-yellow) with 3 resistors
Link these pins from Accelerometer MPU6050 to ESP32 board:
- 3v3: 3.3V
- GND: GND
- SDA: GPIO 22
- SCL: GPIO 23
Remember to put a resistor with LED (after/before is not really important) to limit current flowing, otherwise you may damage the ESP32 board.
By default, LED pins are:
- GPIO 25 : Green
- GPIO 33 : Yellow
- GPIO 32 : Red
- Clone or download the source code
- Navigate to the project directory
- Build the firmware:
pio run
- Upload to ESP32 (make sure the board is connected):
pio run --target upload
- Monitor serial output (optional, for debugging):
pio device monitor --baud 115200
- Connect to
SeismoCloudWi-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 toSeismoCloudnetwork and modify/fix network parameters. - Open SeismoCloud app, connect to the same network of the board and register your device. Enjoy!
Other methods are available (PlatoformIO VSCode Extension, using the src directory as an Arduino IDE sketch) but I don't use them. PRs are welcome.
The sensor failed to connect to the Wi-Fi network. Please follow the instruction in chapter "How to build/upload the software" step 6 (CLI) or step 6 (IDE)
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, you may need to erase the flash memory:
esptool --chip esp32 erase-flashThen re-upload the firmware.
Edit src/common.h and uncomment the line:
// #define DEBUGThen rebuild and upload the firmware. Debug messages will be available on the serial monitor at 115200 baud.
The DONT_UPDATE flag is defined by default in src/common.h:
#define DONT_UPDATEThis prevents the device from checking for updates. Comment this line out for production builds.
See LICENSE file