PHP class to communicate with the blink(1) command line tool
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Blink(1) PHP Class

This is a PHP class to communicate with the blink(1) command line tool, available here

Check out a video of the Blink(1) running the example code

Installation for Mac OSX

The following is required in order for PHP to communicate with the command link tool

  1. Open and type sudo visudo then enter you password
  2. Navigate to the # User privilege specification section and hit i to insert
  3. Type nobody ALL=NOPASSWD: /blink1-tool (nobody was the username my PHP was accessing the command line with. To find yours just run the following in your PHP script echo exec('whoami');)
  4. Hit ESC, then type :wq - If it says there is an error, hit e and fix it
  5. Place the blink1-tool in the / directory

Example Usage

Display #FFF (Turn on) for 2000ms


Display #F68 for 2000ms


Blink #F68 for 400ms 5 times


Fade to #F68 for 400ms, fade to #0F1 for 400ms, then fade to #F68 for 400ms - loop 3 times


Same as above, but with #000 for 50ms between for a 'flicker' effect


Blink(1) testing prior to sending

if(Blink::test()) {

Blink(1) testing after sending

$blink = Blink::send('#FFF,2000');
echo ($blink) ? 'Sent' : 'Fail';

Useful Links


Blink is licensed under the MIT license, see for details.