Is it possible to use the RS485 Wind Direction Transmitter together with the RS485 Wind Speed Transmitter on the same bus? If yes, what I have to change on the raspberry pi code yo...
JaneYu 2021-11-26 17:52:39 26 Views6 Replies Is it possible to use the RS485 Wind Direction Transmitter together with the RS485 Wind Speed Transmitter on the same bus? If yes, what I have to change on the raspberry pi code you providing?
I need to programm this sensor for an ATMega32 does anyone have any suggestions for programming or has already rewritten this code please help.
JaneYu https://github.com/DarthDis...
Use my 'Wind Sensors' Library for arduino IDE.
This product page does not properly state there is now a "V2" of this sensor, that has very different (much better!) properties. The only mention of "V2" is the link to the V2 wiki on this page. The V1-Wiki also does not mention that a V2 exists at all.
At the very least, this shop-page needs to state what to expect if you order this now - I'm presuming it will be a V2, but the description is still for V1. It would also be helpful to describe how to distinguish a V1 from a V2.
I bought one of these from Mouser, and scratched my head for a while because the returned values did not match the (V1) Wiki description at all. Checksums and everything seemed to be correct, just the actual values were far out of range. That of course was because I had gotten a V2, and V2 no longer returns "between 0 and 15", instead it returns between "0 and 3600". There was no mention of "V2" whatsoever on the box or its contents (unless it was hidden in the chinese characters I cannot read).
JaneYu I ran this on the Raspberry Pi 3 B+, but Segment fault came out while running the executable. May I know the solution to this?
JaneYu You may have gotten a "V2" sensor, and tried to use the "V1" example with it. Looking at the source code for the V1 example, it uses the value returned by the sensor as an index into an array without doing a bounds check, and with the much higher values returned by V2, that will almost always lead to a segmentation fault.
Hi,
you may have found the answer already, anyway:
yes, you have to send once the command to change the address of the RS485 device. Per default, they are both set to address = 0x02. You can connect either of the two and send to slave address 0x00 = (broadcast to all devices) the command to change the address (0x00 0x10 0x10 0x00 0x00 0x01 0x02 0x00 0x03 0xFA 0x00 sets slave address =0x03). Afterwards, you can connect both again and command them individually with the set slave address. Its is also described in the wiki.
JaneYu 

