read DHT11 (temp sensor) from modbus master

hi everybody!
I want to read temperature sensor DHT11, from “Modbus poll” software that acts as master simulator. I used Arduino UNO, MAX 485, RS485 to USB converter and modbus_rtu_slave sketch (see attachment. downloaded from ).

I don’t know how dht11 sketch (see another attachment) must be into modbus_rtu_slave sketch ?

modbus_rtu_slave.txt (21.4 KB)

dht11.txt (1.21 KB)

Check this link - -

Check this link - -

I used arduino as a slave and laptop as a master. how do i can modify modbus_rtu_slave sketch to read temperature sensor from laptop?

The link shows how - to some extend - can combine multiple tasks. That should help you forward.

I have another question. in the modbus_rtu_slave sketch there is a code that i could not understand:

/* slave registers example /
enum {
total number of registers on slave */

I should assign my temperature sensor data to these registers?

there is not answer?

there is described how to do it...but apparently nobody does it for you