https://github.com/robhurring/thunder
Dream cheeky thunder (usb missile launcher) UI in jruby
https://github.com/robhurring/thunder
Last synced: 10 months ago
JSON representation
Dream cheeky thunder (usb missile launcher) UI in jruby
- Host: GitHub
- URL: https://github.com/robhurring/thunder
- Owner: robhurring
- Created: 2012-12-29T15:25:34.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-12-29T16:13:48.000Z (over 13 years ago)
- Last Synced: 2024-04-13T19:19:39.662Z (over 2 years ago)
- Language: Ruby
- Homepage:
- Size: 122 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Thunder USB Missile Launcher (Dream Cheeky)
A pretty small jruby swing app to put a UI on the Dream Cheeky Thunder USB Missile Launcher (Since their drivers are windows only -- and 50MB+!)

## Requirements
* JRuby
* libusb
To run, clone the repo and run `bundle install` to get the dependencies.
## GUI Usage
The UI also responds to the arrow keys for movement as well as the `ENTER` key to fire the missile.
```
jruby app.rb
```
## Other Usage
```ruby
require 'libusb'
require './lib/launcher'
begin
l = Launcher.connect
l.right 0.5 # move right 0.5 seconds
l.up 0.2 # move up 0.2 seconds
l.fire!(2) # fire 2 missiles
rescue Launcher::DeviceNotFoundError
puts "Your launcher could not be found."
puts "Make sure your launcher is connected!"
exit 1
end
```
## Credits
The actual launcher code is in `lib/launcher.rb` and was a rewrite of the numberous other launcher apps out there. So all credit to those
who originally found out the codes to send to the launcher to make it do its thing (Not sure who the original author is.)
Also another big thanks to [profligacy LEL](http://ihate.rubyforge.org/profligacy/lel.html) for making swing much less painful to type :)