Legal Removal Request This form is for reporting content posted on the AB Electronics UK forums that you believe violates your personal legal rights or applicable local laws for your country. Post: Hello, Here we go, I am not a brilliant coder, nor an electronics expert and I take a long time to absorb new stuff (I'm 65). I am an enthusiastic Radio Amateur. G6SGA I am trying to do the following -- WeatherStation: I have an Anemometer and a windVane both RS485. Idea is to connect as follows Vane/Anemometer >> RPi RS485hat/to RPizeroW -- supported via a Solar Panel>BuckConverters and a 12VLiOn battery -- [b]Sensors:[/b] Jeffergarden Signal Output Polycarbonate Wind Speed Sensor Anemometer Wind Direction Table Wind Speed Hongzer Wind Anemometer, Pulse Signal Output Aluminium Alloyed Wind Speed Sensor Anemometer PiHat -- https://www.abelectronics.co.uk/p/77/rs485-pi Current issue: iPi3 -- talking to the RPi rs485 .... I need python code that will do this. and this is my problem - I have had these devices for over 12 months and I just can't seem to get anything to work. -- I am missing something fundamental. (Brain). RPizeroW - seems to be setup pretty well and I can make any changes and have backups of the SDCard. I can connect to PiZeroW via SSH or VNC and my python IDE is on a Win10-PC with a shred drive set up between PC<>NAS<>RPi Synology NAS box. .... in fact I can connect to the RPiZeroW from anywhere on my home network including an iMAC & a MacBook. I have written (copied somebodies idea) py code that flashes an LED. Hello world with LED. The comms for both the Wind direction sensor and the Anemometer are the same Baud, 9600, 8,N,1 with CRC Modbus RTU Registers: [b]Anemometer :[/b] 0016H [40017](plc) read-only - Wind Speed 0.1m/s 0100H [40101] R/W device address (0-252) 0101H [40102] R/W Baud(2400/4800/9600) [b]Inquiry Frame:[/b] Address [0x01] --- Function [0x03] --- Start address [0x00 0x16] --- Data Length [0x00 0x01] --- CRC_L [0x65] --- CRC_H [0xCE] [b]Answer Frames [/b](for example; reading a wind speed of 2.3m/s) Address [0x01] --- Function [0x03] --- Number of valid bytes [0x02] --- Wind Speed value [0x00 0x17] --- CRC_L [0xF8] --- CRC_H [0x4A] Calculated output speed: 0017H (hexadecimal) = 23 => Wind Speed = 2.3ms # ============================================== Registers: [b]Wind Direction :[/b] 0000H [40001](plc) R only - direction 1deg 0100H [40101] R/W device address (0-252) 0101H [40102] R/W Baud(2400/4800/9600) # ============================================== [b]Request [/b]Frame Address(1 byte) --- Function(1 byte) --- Register Origin(2 bytes) --- Length(2 bytes) --- Check Code_L (1 byte) --- Check Code_H(1 byte) 0x02 --- 0x03 --- 0x00,0x00 --- 0x00,0x01 --- 0xFD --- 0x39 [b]Response[/b] Frame Address(1 byte) --- Function(1 byte) --- Effective byte(1 byte) --- Date1 1(2 bytes) --- Date (2 bytes) --- Date N(2 bytes) --- Wind Direction --- Check Code_L (1 byte) --- Check Code_H(1 byte) 0x02 --- 0x03 --- 0x02 --- 0x00,0x8A --- 0xFD --- 0xA0 e.g. Wind Direction 008AH(Hex) = 138=>Wind Direction = South-southeast So anybody tell me what python libraries to use, and even give me example code that will request data and output the responses. Just something more ideas. If anybody wishes to talk direct to help with this please email stephen.g6sgs+abel [at] gmail.com Thanks so very much Select the country where you are claiming legal rights. Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Argentina Aruba Australia Austria Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia Bosnia And Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory British Virgin Islands Brunei Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Canary Islands Cape Verde Cayman Islands Central African Republic Chad Channel Islands Chile Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Cook Islands Costa Rica Croatia Cuba Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic East Timor Ecuador Egypt El Salvador Equatorial Guinea Estonia Ethiopia Falkland Islands (Malvinas) Faroe Islands Federated States of Micronesia Fiji Finland France French Guiana French Polynesia French Southern Territories Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guyana Haiti Heard Island and McDonald Islands Honduras Hong Kong Hungary Iceland India Indonesia Ireland Israel Italy Jamaica Japan Jordan Kazakhstan Kenya Kiribati Kuwait Kyrgyzstan Laos Latvia Lesotho Liechtenstein Lithuania Luxembourg Macau Macedonia Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia, Federated States Of Moldova, Republic Of Monaco Mongolia Montenegro Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands Netherlands Antilles New Caledonia New Zealand Nicaragua Niue Norfolk Island Northern Mariana Islands Norway Oman Palau Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Poland Portugal Puerto Rico Qatar Reunion Romania Russia Rwanda Samoa San Marino Sao Tome and Principe Saudi Arabia Serbia Seychelles Singapore Slovakia Slovenia Solomon Islands South Africa South Georgia and the South Sandwich Islands South Korea Spain Sri Lanka St. Helena St. Kitts and Nevis St. Lucia St. Pierre and Miquelon St. Vincent and the Grenadines Suriname Svalbard and Jan Mayen Islands Swaziland Sweden Switzerland Syria Taiwan Tajikistan Tanzania Thailand Togo Tokelau Tonga Trinidad and Tobago Tunisia Turkey Turkmenistan Turks and Caicos Islands Tuvalu U.S. Virgin Islands Uganda Ukraine United Arab Emirates United Kingdom United States United States Minor Outlying Islands Uruguay Uzbekistan Vanuatu Vatican City Venezuela Vietnam Wallis and Futuna Islands Western Sahara Yemen Yugoslavia Zambia What legal issue or problem do you wish to report? Please select Privacy / Erasure under GDPR Defamation Intellectual Property Hate Speech Other Please enter the following information so we can process your report. Contact Name: Contact Email: Details of complaint: Submit Complaint