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: Hi I am using an IO Pi Plus set as inputs on one bus, and currently running a test setup for what will be a larger project involving sensors, which have a detect/sense out terminal at 5v. The plan would be connect these sense outputs to the IO Pi as 5V inputs on each pin for each sensor. I would like to set it up so that IO PI is reading/polling all 16 pins indviually all the time, and print a message in the terminal window when a 5V input is detected on any of the 16 pins from any sensor. The pins need to be set up indiviually as each pin or set of say 4 pins will control differnt sets of LED's to switch them on or off depending if there is a 5V input or not. I have been trying a bit of code out (below) however not having much look, I have attempted to remove bits and add bits of code that I think may help, however nothing has worked. I have tried applying 5v input to pin 16 on Bus 2 from the senso for testing, however nothing is printed on screen, if I change != 0 to != 1 it constantly says motion detected instead. I have also tried applying the - or ground source from the 5V supply to the GND pin, however that does not work and nothing printed on screen when I apply 5V to pin 16. #!/usr/bin/env python from IOPi import IOPi import time busin = IOPi(0x24) busin.set_port_pullups(0, 0xFF) busin.set_port_pullups(1, 0xFF) busin.set_port_direction(0, 0xFF) busin.set_port_direction(1, 0xFF) busin.invert_port(0, 0xFF) busin.invert_port(1, 0xFF) busin.read_port(0) busin.read_port(1) while True: busin.read_pin(16) if (busin.read_pin(16) != 0): print("Motion detected.") Any assistance would be very much appreciated. Many Thanks Rhys 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