IRIV IO Controller IoT Gateway : Blynk
Read RS-485 Modbus temp/humidity on IRIV IO Controller and send to Blynk (V0/V1) over Ethernet using WIZnet W5x00 in CircuitPython. Includes steps and code.

This tutorial shows how to use an IRIV IO Controller to read temperature/humidity from an RS-485 (Modbus RTU) sensor and upload the values to the Blynk cloud (virtual pins V0/V1) over Ethernet using a WIZnet W5x00 driver in CircuitPython. Blynk provides an easy mobile/dashboard UI so you can monitor values in real time. The original Cytron guide demonstrates the full flow with example code and screenshots.
🔧 Project Overview
Project Name: IRIV IO Controller IoT Gateway : Blynk
Author (Tutorial): Hussien Jawhar Sathik (Cytron)
Platform: IRIV IO Controller (CircuitPython)
Networking: WIZnet W5x00 (CircuitPython adafruit_wiznet5k
)
Field Bus: RS-485 (Modbus RTU)
Cloud/App: Blynk IoT (Virtual Pins V0 = Temperature, V1 = Humidity)
What You’ll See: Terminal prints that match the live values on the Blynk dashboard.
The tutorial uses Blynk virtual pins V0/V1, shows how to get a Blynk Auth Token, and explains where to place it in the code.
⚡ How the Project Works
1) Hardware Setup
IRIV IO Controller
RS-485 (Modbus RTU) temperature/humidity sensor (e.g., slave address 1, registers 0/1)
Ethernet connection (DHCP recommended)
On IRIV, initialize the W5x00 via SPI using adafruit_wiznet5k
(DHCP), then create an HTTP session.
2) Protocols & Control
Modbus RTU: Read holding registers from the sensor (commonly reg 0 → humidity, reg 1 → temperature) and apply scaling as required.
Blynk: Use the External HTTP API (.../external/api/update
) to update V0/V1. The code sends GET requests via adafruit_requests
.
3) Development Process
Obtain a Blynk Auth Token (from your Blynk device settings).
In code, set your token and virtual pins (V0/V1).
Upload and run on IRIV → verify terminal readings and the Blynk app values update together.
💡 Key Features & Benefits
Features
IRIV IO Controller + W5x00 Ethernet: Stable wired uplink for reliable cloud updates.
Modbus RTU integration: Periodically polls RS-485 registers for temperature/humidity.
Blynk virtual pins: Push data to V0 (Temp) / V1 (RH) and visualize instantly in the app.
CircuitPython example: Implemented with adafruit_wiznet5k
, adafruit_requests
, and uModbus
in just dozens of lines.
Applications
Building/Facility: Environmental monitoring (temperature/humidity)
Industrial Edge: Bridge on-site RS-485 sensors to a cloud dashboard
Smart Home/Office: Robust, IP-based sensing backhaul
Code Highlights (Essentials)
The original example follows this flow (replace the token with your token):
Initialize W5x00 (DHCP) → build a socket pool/SSL context → create an HTTP session
Read Modbus registers (e.g., slave 1, address 1 → temperature; address 0 → humidity)
Call Blynk API:
.../external/api/update?token=YOUR_TOKEN&V0=<temperature>
.../external/api/update?token=YOUR_TOKEN&V1=<humidity>
Note: Any token shown in screenshots is an example—use your own token from Blynk.
Troubleshooting Tips
No updates on Blynk: Double-check token spelling, virtual pin names (V0/V1), and request URL. Ensure blynk.cloud
is reachable (no firewall/proxy blocks).
Modbus read errors: Verify slave address, register indices (0/1), baud rate, parity, stop bits, and any scaling factors from your sensor datasheet.
DHCP issues: Check cable/switch/router. If needed, test with a static IP on the W5x00 to rule out DHCP conflicts.