This is on the Raspberry PI.
I was able to get the I2C-1 to work properly on the PI using Python.
Then I ran another Python script that uses one of the I2C pins as a GPIO using the GPIOZERO library.
from gpiozero import LED
i2cpin = LED("BOARD3")
i2cpin.on()
time.sleep(1)
i2cpin.off()
i2cpin.close()
However, when I go back to the first program, the I2C stopped working.
I thought the close() would have reverted the pin function back to default I2C function but it did not. I also confirmed using
i2cdetect -y 1
and confirmed I2C is really not working.
Without rebooting and how can I reprogram the pin back to I2C function programmatically using python?