Skip to content

Instantly share code, notes, and snippets.

@nerab
Created October 22, 2014 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nerab/1121d7b4b87e820bf6cc to your computer and use it in GitHub Desktop.
Save nerab/1121d7b4b87e820bf6cc to your computer and use it in GitHub Desktop.
hello blink1
~/$ git clone https://github.com/todbot/blink1.git
Cloning into 'blink1'...
remote: Counting objects: 8363, done.
remote: Total 8363 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (8363/8363), 79.39 MiB | 3.57 MiB/s, done.
Resolving deltas: 100% (4286/4286), done.
~/$ cd blink1/commandline/
~/blink1/commandline$ sudo apt-get install libusb-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libusb-dev
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 34.1 kB of archives.
After this operation, 239 kB of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu/ precise/main libusb-dev i386 2:0.1.12-20 [34.1 kB]
Fetched 34.1 kB in 0s (55.2 kB/s)
Selecting previously unselected package libusb-dev.
(Reading database ... 312320 files and directories currently installed.)
Unpacking libusb-dev (from .../libusb-dev_2%3a0.1.12-20_i386.deb) ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Processing triggers for man-db ...
Setting up libusb-dev (2:0.1.12-20) ...
~/blink1/commandline$ sudo apt-get install libusb-1.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libusb-1.0-0' for regex 'libusb-1.0'
Note, selecting 'libusb-1.0-0-dev' for regex 'libusb-1.0'
libusb-1.0-0 is already the newest version.
The following NEW packages will be installed:
  libusb-1.0-0-dev
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 156 kB of archives.
After this operation, 895 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://de.archive.ubuntu.com/ubuntu/ precise/main libusb-1.0-0-dev i386 2:1.0.9~rc3-2ubuntu1 [156 kB]
Fetched 156 kB in 0s (178 kB/s)
Selecting previously unselected package libusb-1.0-0-dev.
(Reading database ... 312377 files and directories currently installed.)
Unpacking libusb-1.0-0-dev (from .../libusb-1.0-0-dev_2%3a1.0.9~rc3-2ubuntu1_i386.deb) ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Setting up libusb-1.0-0-dev (2:1.0.9~rc3-2ubuntu1) ...
~/blink1/commandline$ make
Building for OS=linux BLINK1_VERSION=v1.93-linux-i686
cc -DUSE_HIDAPI -I./hidapi/hidapi  `pkg-config libusb-1.0 --cflags` -fPIC -std=gnu99  -g -DBLINK1_VERSION=\"""v1.93"-linux-"i686""\" -c hidapi/libusb/hid.c -o hidapi/libusb/hid.o
cc -DUSE_HIDAPI -I./hidapi/hidapi  `pkg-config libusb-1.0 --cflags` -fPIC -std=gnu99  -g -DBLINK1_VERSION=\"""v1.93"-linux-"i686""\" -c blink1-lib.c -o blink1-lib.o
cc -DUSE_HIDAPI -I./hidapi/hidapi  `pkg-config libusb-1.0 --cflags` -fPIC -std=gnu99  -g -DBLINK1_VERSION=\"""v1.93"-linux-"i686""\"   -c -o blink1-tool.o blink1-tool.c
cc -DUSE_HIDAPI -I./hidapi/hidapi  `pkg-config libusb-1.0 --cflags` -fPIC -std=gnu99  -g -DBLINK1_VERSION=\"""v1.93"-linux-"i686""\" -c blink1-tool.c -o blink1-tool.o
cc -DUSE_HIDAPI -I./hidapi/hidapi  `pkg-config libusb-1.0 --cflags` -fPIC -std=gnu99  -g -DBLINK1_VERSION=\"""v1.93"-linux-"i686""\"  -g ./hidapi/libusb/hid.o blink1-lib.o  `pkg-config libusb-1.0 --libs` -lrt -lpthread -ldl blink1-tool.o -o blink1-tool
cc -shared -o libblink1.so `pkg-config libusb-1.0 --libs` -lrt -lpthread -ldl -DUSE_HIDAPI -I./hidapi/hidapi  `pkg-config libusb-1.0 --cflags` -fPIC -std=gnu99  -g -DBLINK1_VERSION=\"""v1.93"-linux-"i686""\" ./hidapi/libusb/hid.o blink1-lib.o  `pkg-config libusb-1.0 --libs` -lrt -lpthread -ldl
~/blink1/commandline$ sudo ./blink1-tool --list
blink(1) list:
id:0 - serialnum:XXXXXXXX (mk2)
~/blink1/commandline$ sudo ./blink1-tool --blink 1
blink 1 times rgb:ff,ff,ff:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment