Code Monkey home page Code Monkey logo

blink_stick's People

Contributors

bjonord avatar danielthor avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

blink_stick's Issues

LIBUSB::ERROR_PIPE: error TRANSFER_STALL

This happened when transmitting to the BlinkStick with a very short interval.

2.0.0p353 :001 > bs = BlinkStick.first; bs.random_pulse 2
 => 2 
2.0.0p353 :002 > bs = BlinkStick.first; bs.random_pulse 2
 => 2 
2.0.0p353 :003 > bs = BlinkStick.first; bs.random_pulse 2
 => 2 
2.0.0p353 :004 > bs = BlinkStick.first; bs.random_pulse 2
LIBUSB::ERROR_PIPE: error TRANSFER_STALL
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/libusb-0.4.0/lib/libusb/dev_handle.rb:471:in `submit_transfer'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/libusb-0.4.0/lib/libusb/dev_handle.rb:447:in `control_transfer'
    from /media/bjoska/Tornado/development/ruby/blink_stick/lib/blink_stick/color_handler.rb:5:in `color='
    from /media/bjoska/Tornado/development/ruby/blink_stick/lib/blink_stick/action_handler/fade_action.rb:52:in `block in perform'
    from /media/bjoska/Tornado/development/ruby/blink_stick/lib/blink_stick/action_handler/fade_action.rb:49:in `upto'
    from /media/bjoska/Tornado/development/ruby/blink_stick/lib/blink_stick/action_handler/fade_action.rb:49:in `perform'
    from /media/bjoska/Tornado/development/ruby/blink_stick/lib/blink_stick/action_handler/fade_action.rb:23:in `fade'
    from /media/bjoska/Tornado/development/ruby/blink_stick/lib/blink_stick/action_handler/fade_action.rb:4:in `call'
    from /media/bjoska/Tornado/development/ruby/blink_stick/lib/blink_stick/action_handler.rb:24:in `fade'
    from /media/bjoska/Tornado/development/ruby/blink_stick/lib/blink_stick/action_handler.rb:39:in `block in pulse'
    from /media/bjoska/Tornado/development/ruby/blink_stick/lib/blink_stick/action_handler.rb:37:in `times'
    from /media/bjoska/Tornado/development/ruby/blink_stick/lib/blink_stick/action_handler.rb:37:in `pulse'
    from /media/bjoska/Tornado/development/ruby/blink_stick/lib/blink_stick/action_handler.rb:28:in `random_pulse'
    from (irb):4
    from /media/bjoska/Tornado/development/ruby/blink_stick/Rakefile:17:in `block in <top (required)>'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/task.rb:236:in `call'
... 5 levels...
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_with_call_chain'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/application.rb:149:in `invoke_task'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/application.rb:106:in `each'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/application.rb:106:in `block in top_level'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/application.rb:115:in `run_with_threads'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/application.rb:100:in `top_level'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/application.rb:78:in `block in run'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/bin/rake:23:in `load'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/bin/rake:23:in `<main>'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/bin/ruby_noexec_wrapper:14:in `eval'
    from /home/bjoska/.rvm/gems/ruby-2.0.0-p353@blink_stick/bin/ruby_noexec_wrapper:14:in `<main>'

Extract out the actions to separate module

Instead of keeping all the actions with the rest of the more general methods, such as manufacturer etc. it should be located in a separate module.

Like say ActionHandler.

Fade method

Add method to allow fade between two colors. There are a lot of things to get done first, but could be fun.

LIBUSB::ERROR_IO: error TRANSFER_ERROR

I get this error on Mac when data is sent too fast to the BlinkStick. Either it is something in libusb or just something OSX can't handle, in which case some kind of break is needed (a general break or something in methods that sent a lot of data, like the unfinished fade method). @bjoska is not getting this on Ubuntu.

?> bs.fade([255, 0, 0], [0, 255, 0], time: 10)
LIBUSB::ERROR_IO: error TRANSFER_ERROR
    from /Users/Daniel/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/libusb-0.4.0/lib/libusb/dev_handle.rb:471:in `submit_transfer'
    from /Users/Daniel/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/libusb-0.4.0/lib/libusb/dev_handle.rb:447:in `control_transfer'
    from /Users/Daniel/Code/sandbox/blink_stick/lib/blink_stick/color_handler.rb:5:in `color='
[...]

Feature: Morse code

Not sure if this should be part of the core blink_stick gem or a side project, just wanted to document it somewhere.

New feature: Make the BlinkStick accept a text and flash it as morse code.

Does it belong in the gem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.