AZ-Envy Sensors to OSC converter for ESP8266/ESP32.
This project implements a sensor interface that reads data from AZ-Envy sensors (MQ2 gas sensor and SHT3x temperature/humidity sensor) and sends the data via OSC (Open Sound Control) protocol over WiFi.
- MQ2 gas sensor support (LPG, CO, smoke detection)
- SHT3x temperature and humidity sensor support
- WiFi connectivity (ESP8266/ESP32)
- OSC protocol communication
- Real-time sensor data transmission
- ESP8266 or ESP32 development board
- MQ2 gas sensor
- SHT3x temperature/humidity sensor
- WiFi network access
- ESP8266WiFi / WiFi (ESP32)
- WiFiUdp
- OSCMessage
- MQ2 library
- SHT3x library
-
Install the required libraries in your Arduino IDE:
- ESP8266WiFi (or WiFi for ESP32)
- WiFiUdp
- OSCMessage
- MQ2 sensor library
- SHT3x sensor library
-
Configure WiFi credentials in
AzEnvy2OSC.ino:
char ssid[] = "YOUR_WIFI_SSID";
char pass[] = "YOUR_WIFI_PASSWORD";- Configure OSC destination:
const IPAddress outIp(192, 168, 43, 1); // Your computer's IP
const unsigned int outPort = 8000; // OSC receive port- Upload the sketch to your ESP8266/ESP32 board.
- Connect the sensors to the appropriate pins (configure
pinvariable for MQ2) - Power on the ESP8266/ESP32
- The device will connect to WiFi and start sending sensor data via OSC
- Receive OSC messages on your computer at the configured IP and port
AZEnvy2OSC/
├── src/
│ ├── AzEnvy2OSC/ # Main sketch
│ ├── ESP8266sendMessage/ # Example OSC sender
│ ├── MQ2_sample/ # MQ2 sensor example
│ └── SHT3_sample/ # SHT3x sensor example
└── lib/ # Additional libraries
The sensor data is sent as OSC messages with the following format:
/sensor/mq2/lpg- LPG gas level/sensor/mq2/co- CO gas level/sensor/mq2/smoke- Smoke level/sensor/sht3x/temperature- Temperature in Celsius/sensor/sht3x/humidity- Humidity percentage
Fernando Ortega Gorrita (@fernandoog)
See LICENSE file for details.