I have connected a button to the GPIO on my raspberry Pi and I have tested it; it works. I have used the following code:
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(16,GPIO.IN)
finally:
GPIO.cleanup()
All I want is for that button to imitate a left mouse click. So that when it is pressed the pi thinks i have left clicked on the mouse.
Any help would be appreciated.