import time
import iic_gpio

def my_callback(value):
    try:
        print('开始采集数据')       
    except Exception as e:
        print(f"An error occurred in the callback: {e}")

# Simulate calling the callback function multiple times
    


if __name__ == "__main__":
    iic_gpio.set_callback(my_callback)
    iic_gpio.init_isr_gpio("467", "falling")
    iic_gpio.wait_interrupt("467")
    while True:      
        time.sleep(300)  


