I’m trying to use a particle photon (and eventually electron) in my graduate research project as a DIY IoT system for some Campbell Scientific CR300 data loggers of mine that are being used to log soil moisture at a remote research site. I will connect the photon to the data logger via RS-232 connection, specifically pins 2,3 and 5 (Rx, Tx, and Gnd).
I would like to use Modbus protocol to setup my data logger as a slave and the particle photon as the master. Unfortunately I don’t know enough about modbus to create my own library for the photon for this. I can setup my data logger just fine to be a slave with the functions of 01, 02, 03, 04, 05, 15, and 16 (see: Modbus Protocol Standards)
To add to the complication, the data logger sends values in 32 bit, so I was told by Campbell that I would need to use two registers per value to transfer data. I’m not savvy enough to know what this exactly means, but I think it’s important to mention here.
Can anyone point me to a modbus library that can be used on my photon to communicate with my datalogger?
Input is always appreciated!
Here’s a picture of my data logger deployed last season for you just for fun