perryn / blinky Goto Github PK
View Code? Open in Web Editor NEWblinky helps you see the light - plug and play set up for build lights
License: MIT License
blinky helps you see the light - plug and play set up for build lights
License: MIT License
I'm working on a PR to add Blinkt! support to blinky, but it turns out the blinkt Gem has dependencies that are Linux-only (and very Linux-only, relying on kernel functionality not present in other OSs).
Assuming non-Linux OSs are important targets for blinky (e.g. mention of Windows in the docs), I wonder how to proceed here.
There's an open issue on bundler about supporting OS-specific groups, but no progress as of yet.
I guess I could always maintain a Blinkt!-specific fork, but that feels a bit hacky.
Thoughts?
the run_every method has been removed (or changing gemspec to only allow 0.0.7)
Very excited to use this!
I have the latest command-line tools and brew is updated. Libusb installs no problem.
When I 'sudo gem install blinky' on 10.8.3 it fails, please help.
Install ends with:
"Configuring libffi for i386
configure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
configure: error: in /Library/Ruby/Gems/1.8/gems/ffi-1.8.1/ext/ffi_c/libffi-i386': configure: error: C compiler cannot create executables" See
config.log' for more details
make[1]: *** No targets specified and no makefile found. Stop.
Hey there. I have a Webmail Notifier that I think might be a knock-off, and I was wondering if you could help me add support for it.
1.9.3-p362 :002 > blinky = Blinky.new
Blinky::NoSupportedDevicesFound: Blinky was unable to find a supported device
The devices I did find were:
[#<LIBUSB::Device 250/1 05ac:8006 ? ? ? (Hi-speed Hub with single TT)>,
#<LIBUSB::Device 253/1 05ac:8006 ? ? ? (Hi-speed Hub with single TT)>,
#<LIBUSB::Device 253/2 0424:2513 ? ? ? (Hi-speed Hub with multiple TTs)>,
#<LIBUSB::Device 250/2 0424:2513 ? ? ? (Hi-speed Hub with multiple TTs)>,
#<LIBUSB::Device 250/3 05ac:850a ? ? ? (Interface Association Descriptor)>,
#<LIBUSB::Device 253/3 05ac:8404 ? ? ? (MassStorage SCSI Bluk-Only)>,
#<LIBUSB::Device 250/5 05ac:024c Apple Inc. Apple Internal Keyboard / Trackpad ? (HID (01,01), HID (00,00), HID (01,02))>,
#<LIBUSB::Device 253/4 1294:1320 MAIL MAIL ? (HID (00,00))>]
from /Users/pete/.rvm/gems/ruby-1.9.3-p362/gems/blinky-0.0.10/lib/blinky/light_factory.rb:14:in `detect_lights'
Had a bit of a poke about:
1.9.3-p362 :007 > mail = USB.devices[7]
=> #<LIBUSB::Device 253/4 1294:1320 MAIL MAIL ? (HID (00,00))>
1.9.3-p362 :008 > mail.id
mail.idProduct mail.idVendor
1.9.3-p362 :008 > mail.idVendor
=> 4756
1.9.3-p362 :009 > mail.idProduct
=> 4896
The idVendor
and idProduct
don't match inside recipes.rb
:
recipe DreamCheeky::WebmailNotifier, {:usb_vendor_id => 0x1d34,
:usb_product_id => 0x0004,
:description => "Dream Cheeky Webmail Notifier"}
I don't have any idea how to do this, but I'm willing to invest time to find out how. If you could give me a couple of tips, it would be much appreciated.
$ sudo ruby1.9.3 test.rb
/var/lib/gems/1.9.1/gems/libusb-0.2.2/lib/libusb/constants.rb:46:in `raise_error': LIBUSB::ERROR_IO in libusb_submit_transfer (LIBUSB::ERROR_IO)
from /var/lib/gems/1.9.1/gems/libusb-0.2.2/lib/libusb/transfer.rb:135:in `submit!'
from /var/lib/gems/1.9.1/gems/libusb-0.2.2/lib/libusb/transfer.rb:162:in `submit_and_wait!'
from /var/lib/gems/1.9.1/gems/libusb-0.2.2/lib/libusb/dev_handle.rb:390:in `control_transfer'
from /var/lib/gems/1.9.1/gems/libusb-0.2.2/lib/libusb/compat.rb:316:in `usb_control_msg'
from /var/lib/gems/1.9.1/gems/blinky-0.0.12/lib/device_recipes/delcom_engineering/visual_indicator_gen_two.rb:35:in `set_colour'
from /var/lib/gems/1.9.1/gems/blinky-0.0.12/lib/device_recipes/delcom_engineering/visual_indicator_gen_two.rb:27:in `off!'
from /var/lib/gems/1.9.1/gems/blinky-0.0.12/lib/device_recipes/delcom_engineering/visual_indicator_gen_two.rb:22:in `warning!'
from test.rb:5:in `<main>'
[ 256.978955] usb 2-1.2: usbfs: process 3627 (ruby1.9.3) did not claim interface 0 before use
$ gem list
*** LOCAL GEMS ***
blinky (0.0.12)
chicanery (0.1.5)
ffi (1.9.3)
libusb (0.2.2)
mini_portile (0.5.3)
nokogiri (1.6.1)
$ dpkg -s libusb-1.0-0-dev
Package: libusb-1.0-0-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 898
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Source: libusb-1.0
Version: 2:1.0.9~rc3-2ubuntu1
Depends: libusb-1.0-0 (= 2:1.0.9~rc3-2ubuntu1), libc6-dev | libc-dev
Description: userspace USB programming library development files
Library for programming USB applications without the knowledge
of Linux kernel internals.
Homepage: http://www.linux-usb.org/
Original-Maintainer: Aurelien Jarno <[email protected]>
Not sure what's the cause
Hey @perryn I am currently working on porting this project to java, I am going to be basing myself a lot on the structure of this one so I just wanted to both give you a heads up and to confirm if you were ok with it.
I am also still not set on the name but one of my choices was jblinky
, which also made me wonder if you had any issue with that as well.
Let me know any comments or concerns, thank you!
It'd be great to see this support Windows.
Currently this gem is dependent on ruby-usb 0.2.1 which isn't windows compatible.
The latest windows compatible ruby-usb gem is 0.1.3 (see: http://rubygems.org/gems/ruby-usb)
Alternatively you could use the libusb gem which is much more active, and also fully Windows compatible: https://github.com/larskanis/libusb
Thanks
Hi Perryn,
I have done everything to make this work, but everytime I initialize Blinky, I always got this error message. Can you help me with this?
arvin@arvin-VirtualBox:~$ irb
r2.2.0 :001 > require 'blinky'
=> true
2.2.0 :002 > l = Blinky.new
LIBUSB::ERROR_ACCESS: LIBUSB::ERROR_ACCESS in libusb_open
from /home/arvin/.rvm/gems/ruby-2.2.0/gems/libusb-0.2.2/lib/libusb/constants.rb:46:in raise_error' from /home/arvin/.rvm/gems/ruby-2.2.0/gems/libusb-0.2.2/lib/libusb/device.rb:58:in
open'
from /home/arvin/.rvm/gems/ruby-2.2.0/gems/libusb-0.2.2/lib/libusb/compat.rb:175:in open' from /home/arvin/.rvm/gems/ruby-2.2.0/gems/blinky-0.0.12/lib/blinky/light_factory.rb:11:in
block in detect_lights'
from /home/arvin/.rvm/gems/ruby-2.2.0/gems/blinky-0.0.12/lib/blinky/light_factory.rb:7:in each' from /home/arvin/.rvm/gems/ruby-2.2.0/gems/blinky-0.0.12/lib/blinky/light_factory.rb:7:in
detect_lights'
from /home/arvin/.rvm/gems/ruby-2.2.0/gems/blinky-0.0.12/lib/blinky.rb:26:in `initialize'
I get this error on Ubuntu 13.11 when installing the Gem....
eddie@ubuntu13-10:~$ sudo gem install blinky
Building native extensions. This could take a while...
ERROR: Error installing blinky:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:4:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/ffi-1.9.3 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/ffi-1.9.3/ext/ffi_c/gem_make.out
Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.