Readme.txt 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. DreamCheekyLED is a Console / .NET driver for the Dream Cheeky Webmail Notifier (http://www.dreamcheeky.com/webmail-notifier)
  2. It was created using the https://github.com/mikeobrien/HidLibrary/ and is released under the Apache License V2.0
  3. You can control the LED using either DreamCheekyLED.exe with command line arguments or via C#/VB/Powershell using
  4. the DreamCheekyUSB.DreamCheekyLED object. The code supports multiple devices and has options for blinking and fading.
  5. See below for command line examples or the DreamCheekyLED*.ps1 files for powershell examples.
  6. If you are interested in how this works at a high level the general process is:
  7. 1. Create HidDevice object using HidLibrary.HidDevices.Enumerate (default VendorID=0x1D34 and ProductID=0x0004)
  8. 2. Send the following USB commands to initialize the device:
  9. NOTE: These were found by using USBTrace http://www.sysnucleus.com/ to sniff the Dreamcheeky software and may vary
  10. public static readonly byte[] init01 = new byte[9] { 0, 0x1F, 0x02, 0x00, 0x5F, 0x00, 0x00, 0x1F, 0x03 };
  11. public static readonly byte[] init02 = new byte[9] { 0, 0x00, 0x02, 0x00, 0x5F, 0x00, 0x00, 0x1F, 0x04 };
  12. public static readonly byte[] init03 = new byte[9] { 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x05 };
  13. public static readonly byte[] init04 = new byte[9] { 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 };
  14. 3. Set desired color using following USB commands (or combinations of RGB for full color spectrum)
  15. public static readonly byte[] cmd_Red = new byte[9] { 0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x05 };
  16. public static readonly byte[] cmd_Green = new byte[9] { 0, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x05 };
  17. public static readonly byte[] cmd_Blue = new byte[9] { 0, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x1F, 0x05 };
  18. public static readonly byte[] cmd_Off = new byte[9] { 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x05 };
  19. NOTE: The DreamCheekyLED intensity maxes out at 64, so 0xFF is the same as 0x40. This driver will scale the input
  20. values of each color componet (range 0-255) to the correct output (range 0-64).
  21. 4. The DreamCheekyUSB.LEDBase class has additional methods for Blinking, Fade In/Out/InOut, and converting system
  22. colors to RGB values.
  23. Command Line Usage:
  24. DreamCheekyLED.exe [device=...] [options] [rgb=xxx,xxx,xxx] [color=....]
  25. [fade=...] [blink=...] [delay=xxxx] [off]
  26. Examples:
  27. DreamCheekyLED.exe debug nopause color=red
  28. DreamCheekyLED.exe debug nopause color=green fade=3000
  29. DreamCheekyLED.exe debug nopause color=green fade="3000,in"
  30. DreamCheekyLED.exe debug nopause color=blue blink=2
  31. DreamCheekyLED.exe debug nopause color=blue blink="5,250"
  32. DreamCheekyLED.exe debug nopause rgb="255,255,0" delay=5000 off
  33. DreamCheekyLED.exe debug nopause color=yellow fade="3000,in" delay=5000 off
  34. Device Path:
  35. Optional, Defaults to first USB device with VID=0x1D34 and PID=0x0004
  36. Example (VID,PID,Index): device="0x1D34,0x0004,0"
  37. Example (Path): device="\\?\hid#vid_1d34&pid_0004#6&1067c3dc&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"
  38. Options:
  39. debug = Print trace statements to Console.Out
  40. test = Cycle Red/Green/Blue then fade Red/Green/Blue
  41. testblink = test a few blink cycles
  42. nopause = omit the 'Press enter to exit...' message at the end
  43. Colors: (See http://www.flounder.com/csharp_color_table.htm )
  44. Use rgb=xxx,xxx,xxx or one of the .NET System Colors
  45. Example (yellow): rgb="255,255,0"
  46. Example (System.Drawing.Color.Pink): color=DeepPink
  47. Fade: set to fade in, out, or both
  48. Makes the colors fade in or out instead of instantly on or off.
  49. Example (Fade in and out in 2 seconds): color=Indigo fade=2000
  50. Example (Fade in 1 second): color=Indigo fade="1000,in"
  51. Example (Fade out 3 seconds): color=Indigo fade="3000,out"
  52. Blink: will blink specified color
  53. Example (Blink twice at default 500ms): color=LimeGreen blink=5
  54. Example (Blink 5 times at 200ms each): color=LimeGreen blink="5,250"
  55. Delay: Add a delay in milliseconds. Program will sleep before returning.