Home › Forums › Environmental Sensors › Yosemite library cant be found! › Reply To: Yosemite library cant be found!
2020-01-14 at 7:09 AM
#13607
Yeah i use the arduino ide on my nodemcu. Im testing the sensor with the yosemite displayvalues library.
The thing i meant with own code was that the one working on this project before didnt give me anything like source code or explenation how he did work everything out.
Its searching all the slaveids and cant find the sensor. I use pin D6 for rx and d5 for tx but it just says it cant find the sensor.
The sensor im using is either a y-500b/y-1002 or y-2002. Im not quite sure. Dont really know what to do at this point because i know how modbus works everything is wired correctly and it uses a levelconverter.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
yosemitechModel model = Y502; // The sensor model number // Define the sensor's modbus address byte modbusAddress = 0x01; // The sensor's modbus address, or SlaveID // Yosemitech ships sensors with a default ID of 0x01. // Define pin number variables const int PwrPin = D0; // The pin sending power to the sensor *AND* RS485 adapter const int DEREPin = -1; // The pin controlling Recieve Enable and Driver Enable // on the RS485 adapter, if applicable (else, -1) // Setting HIGH enables the driver (arduino) to send text // Setting LOW enables the receiver (sensor) to send text const int SSRxPin = D6; // Recieve pin for software serial (Rx on RS485 adapter) const int SSTxPin = D5; // Send pin for software serial (Tx on RS485 adapter) |