This project takes ultrasonic sensor for example.
GNU/Linux with Python and xdotool
.
- Burn
serialSensor.ino
into Arduino. - Set serial port name and baud rate in
serialDesktopCtl.sh
. - Run command: ./seralDesktopCtl.sh
- Arduino send sensor data to serial port.
- Python read from serial port and control the PC desktop through system command
xdotool
. xdotool
send keyboard stokes to the operating system.
Public Domain. You can do whatever you want with the code.