FT232H GPIO rising

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
yhar
 
Posts: 4
Joined: Thu Apr 22, 2021 1:47 am

FT232H GPIO rising

Post by yhar »

Hi, I'm using Adafruit FT232H Breakout as a GPIO input for Windows10 PC.
Code to detect input is written in python3 and works nicely.
However, input signal tends to stay 'HIGH (True)' these days.
Is it possible to detect RISING of input signal and to set bounce time like ' RPi.GPIO' ?
e.x. GPIO.add_event_detect(24, GPIO.RISING, bouncetime=1000)

Thank you in advance !

User avatar
tannewt
 
Posts: 3298
Joined: Thu Oct 06, 2016 8:48 pm

Re: FT232H GPIO rising

Post by tannewt »

What code are you currently using?

User avatar
yhar
 
Posts: 4
Joined: Thu Apr 22, 2021 1:47 am

Re: FT232H GPIO rising

Post by yhar »

Hi, tannewt !

thank you for your responce.
my code regarding input is as follows;

import board
import digitalio

button = digitalio.DigitalInOut(board.C0)
button.direction = digitalio.Direction.INPUT

if button.value == True:
** do something **

hope you can tell from above.

if there are pages for this issue, pls kindly let me know.
thank you.

User avatar
yhar
 
Posts: 4
Joined: Thu Apr 22, 2021 1:47 am

Re: FT232H GPIO rising

Post by yhar »

Hi there !
still struggling. any info regarding detect rising ?
thanx
yhar

User avatar
tannewt
 
Posts: 3298
Joined: Thu Oct 06, 2016 8:48 pm

Re: FT232H GPIO rising

Post by tannewt »

The simplest thing would be to store the last state of the pin in a variable. Then you can do whatever you want when the last is False but the current state is True.

User avatar
yhar
 
Posts: 4
Joined: Thu Apr 22, 2021 1:47 am

Re: FT232H GPIO rising

Post by yhar »

Hi tannewt,
thank you for your suggestion.
i think i can make it.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”