In this project, we will create an email alert of machine vibration and temperature using the Ubidots-vibration sensor and ESP32.
Vibration is truly a to and fro movement — or oscillation — of machines and components in motorized gadgets. Vibration in the industrial system may be a symptom, or motive, of a hassle, or it can be associated with everyday operation. For instance, oscillating sanders and vibratory tumblers depend upon vibration to feature. Internal combustion engines and tools drive, then again, revel in a sure amount of unavoidable vibration. Vibration can imply a hassle and if left unchecked can cause harm or expedited deterioration. Vibration can be resulting from one or extra factors at any given time, the maximum not unusual being an imbalance, misalignment, put on, and looseness. This damage can be minimized by analyzing Temperature and Vibration Data on Ubidots using esp32 and NCD wireless vibration and temperature sensors.
This library provides a client for doing simple publish/subscribe messaging with a server that supports MQTT.
For more information about MQTT, visit mqtt.org.
Download
The latest version of the library can be downloaded from GitHub
Documentation
The library comes with a number of example sketches. See File > Examples > PubSubClient within the Arduino application. Full API Documentation.
Compatible Hardware
The library uses the Arduino Ethernet Client API for interacting with the underlying network hardware. This means it Just Works with a growing number of boards and shields, including:
The Wire library allows you to communicate with I2C devices, often also called "2 wire" or "TWI" (Two Wire Interface), can download from Wire.h
Basic Usage
Wire.begin()Begin using Wire in master mode, where you will initiate and control data transfers. This is the most common use when interfacing with most I2C peripheral chips. Wire.begin(address)Begin using Wire in slave mode, where you will respond at "address" when other I2C masters chips initiate communication.
Transmitting
Wire.beginTransmission(address)Start a new transmission to a device at "address". Master mode is used. Wire.write(data)Send data. In master mode, beginTransmission must be called first. Wire.endTransmission()In master mode, this ends the transmission and causes all buffered data to be sent.
Receiving
Wire.requestFrom(address, count)Read "count" bytes from a device at "address". Master mode is used. Wire.available()Returns the number of bytes available by calling receive. Wire.read()Receive 1 byte.
Types of Events Ubidots support already integrated events to allow you to send Events, Alerts, and Notifications to those who need to know when they need to know. Ubidots' prebuilt integrations include:
1. Email notifications
2. SMS notifications
3. Webhook events - learn more
4. Telegram notifications
5. Slack notifications - learn more
6. Voice call notifications - learn more
7. Back to normal notification - learn more
8. Geofence notifications - learn more