This project shows a simple idea which using a gesture sensor to control your MAC.
The concept is using the data sent by arduino through BLE, and using apple script to do some specific action on your MAC.
So, lets get start!
Step 1: Material
You will need
- Gesture Sensor (https://www.sparkfun.com/products/12787)
- BLE shield
- Battery ( optional )
For Arduino board, i use the board which i made myself, but most of the Arduino and BLE shield will do the job.
Visit here for more information.
Step 2: Code
I put the needed files at github.
Just download and unzip them !
Step 3: Schematic
Just follow the sparkfun hookup guide.
The guide is perfect.
Step 4: Usage
- Set the keyboard shortcut to do the action
- System preference -> keyboard -> shortcut tab
- The following pic will show the setting i made
- Ctrl + UP arrow : mission control
Ctrl + Down arrow : application show
Ctrl + Left/Right arrow : move left/right space
- Open the app in "application" folder you just downloaded and unzipped
- Test those button function to test the action
- If those action are not triggered, there must be some settings missed at step 1.
- Connect your own BLE shield by changing the UUID or ble interface in the source code
- Start swipe your hand!!