Permalink
Browse files

add support for Dream Cheeky Webmail Notifier

  • Loading branch information...
1 parent 1e45a8f commit 41d3a35845cf04769e1d6ab62e8345e933b3e02d @perryn committed Jan 11, 2013
Showing with 49 additions and 0 deletions.
  1. +3 −0 README.rdoc
  2. +42 −0 lib/device_recipes/dream_cheeky/webmail_notifier.rb
  3. +4 −0 lib/recipes.rb
  4. BIN lights.jpg
View
@@ -16,6 +16,8 @@ blinky aims to supply plug and play support for all combinations of
* Operating System
* CI Server
+https://raw.github.com/perryn/blinky/master/lights.jpg
+
== How do I use blinky?
Plug in your USB light, and then do something like this
@@ -58,6 +60,7 @@ Not sure which light is which?
=== Lights/ Build Indicators
* {ThingM blink(1)}[http://www.kickstarter.com/projects/thingm/blink1-the-usb-rgb-led]
+* {Dream Cheeky Webmail Notifier}[http://www.dreamcheeky.com/webmail-notifier]
* {Delcom Engineering USB Visual Indicator Generation I}[http://www.delcomproducts.com/products_usblmp.asp]
* {Delcom Engineering USB Visual Indicator Generation II}[http://www.delcomproducts.com/products_usblmp.asp]
@@ -0,0 +1,42 @@
+module Blinky
+ module DreamCheeky
+ module WebmailNotifier
+
+ def success!
+ colour!("\x00\xFF\x00")
+ end
+
+ def failure!
+ colour!("\xFF\x00\x00")
+ end
+
+ def building!
+ colour!("\x00\x00\xFF")
+ end
+
+ def warning!
+ colour!("\xFF\x2A\x00")
+ end
+
+ def off!
+ colour!("\x00\x00\x00")
+ end
+
+ def init
+ send "\x1f\x02\x00\x2e\x00\x00\x2b\x03"
+ send "\x00\x02\x00\x2e\x00\x00\x2b\x04"
+ send "\x00\x00\x00\x2e\x00\x00\x2b\x05"
+ end
+
+ def colour!(colour)
+ send(colour + "\x00\x00\x00\x00\x05")
+ end
+
+ private
+ def send(data)
+ @handle.usb_control_msg(0x21, 0x09, (3 << 8) | 1, 0, data, 0)
+ end
+
+ end
+ end
+end
View
@@ -9,6 +9,10 @@
recipe ThingM::Blink1, {:usb_vendor_id => 0x27b8,
:usb_product_id => 0x01ed,
:description => "ThingM Blink(1)"}
+
+recipe DreamCheeky::WebmailNotifier, {:usb_vendor_id => 0x1d34,
+ :usb_product_id => 0x0004,
+ :description => "Dream Cheeky Webmail Notifier"}
#TODO - use treeop to allow a syntax like this
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 41d3a35

Please sign in to comment.