Verifying signaling on IO1



  • Hi,

    i'm checking the input signal on IO1 (GPIO 4).

    gpio readall

    shows me a RPI B plus, GPIO 4 is BCM 23

    Then i'm using this to check the value :

    import RPi.GPIO as GPIO
    import time

    GPIO.setmode(GPIO.BCM)

    GPIO.setup(23, GPIO.IN, pull_up_down = GPIO.PUD_UP)

    while True:

    if(GPIO.input(23) == 1):

    print("Input signal detected")
    time.sleep(5)

    GPIO.cleanup()

    But i'm getting an "Input signal detected" even when nothing is connected on IO1
    What am i missing?



  • Hi,

    i'm checking the input signal on IO1 (GPIO 4).

    gpio readall

    shows me a RPI B plus, GPIO 4 is BCM 23

    Then i'm using this to check the value :

    import RPi.GPIO as GPIO
    import time

    GPIO.setmode(GPIO.BCM)

    GPIO.setup(23, GPIO.IN, pull_up_down = GPIO.PUD_UP)

    while True:

    if(GPIO.input(23) == 1):

    print("Input signal detected")
    time.sleep(5)

    GPIO.cleanup()

    But i'm getting an "Input signal detected" even when nothing is connected on IO1
    What am i missing?



  • Hello,

    you should use BCM pin 4 for Digital Input 1… I see it is not clear from the documentation.

    I will fix it asap.

    Hope it helps.

    BR,
    Tomas



  • Okay Thomas, got it now. It's also triggering on a low… So following code makes more sense :

    import RPi.GPIO as GPIO
    import time

    GPIO.setmode(GPIO.BCM)

    GPIO.setup(4, GPIO.IN, pull_up_down = GPIO.PUD_UP)

    while True:

    if(GPIO.input(4) == 1):

    print("No Input signal detected")
    #time.sleep(5)
    else:

    print("Input signal detected")

    GPIO.cleanup()

    Also interesting to know is that the ports trigger at 4.88 Volt (maybe even lower, but can't test this currently).