HexLight GUI - RGB LED controller, supporting advanced colour models.
C#
Latest commit 7de4a17 Aug 18, 2015 @jorticus Improved HexLight protocol robustness
SendPacket()/ReadReply() combo is now combined into TransferPacket(),
which will re-try a failed packet up to 3 times.

This makes the protocol more robust in the case a packet is lost
(which seems to happen somewhat regularly)
Permalink
Failed to load latest commit information.
Controllers Improved HexLight protocol robustness Aug 18, 2015
Engines Added AnimEngine with simple hue cycle animation May 23, 2015
HexColour Implemented RowdzEngine, ported from old RGBController GUI. Requires … Jan 24, 2015
IconSrc Initial commit May 26, 2014
Plugin Extra error checking on LoadController and removed null controller May 23, 2015
Properties Added immediate-updates to controller-specific config (eg. UsbAudioEn… Nov 15, 2014
UnitTests Added CircularMath utility functions and associated unit tests Nov 15, 2014
Util Added CircularMath utility functions and associated unit tests Nov 15, 2014
WinAPI Improved UI - extended titlebar "glass", tabs are now at the top, and… May 23, 2015
WpfControls Added AnimEngine with simple hue cycle animation May 23, 2015
packages Improved CIE XYZ colour handling Jun 23, 2014
screenshots Updated README.md May 21, 2015
.gitattributes Initial commit to add default .gitIgnore and .gitAttribute files. Apr 9, 2014
.gitignore Added dynamic configuration loading for controller plugins Oct 7, 2014
App.config Added immediate-updates to controller-specific config (eg. UsbAudioEn… Nov 15, 2014
App.xaml Re-worked GUI structure, added unhandled exception handling Jun 30, 2014
App.xaml.cs Fixed "Ignore Exception" button not re-connecting the device or re-st… Aug 18, 2015
ControlWindow.xaml Disabled PopupDial when in Engine mode May 23, 2015
ControlWindow.xaml.cs GUI tweak - borders around ControlWindow improved May 23, 2015
ControllerCodeMap.dgml Added code map diagram to show the plugin architecture Nov 15, 2014
ControllerCodeMap.png Added code map diagram to show the plugin architecture Nov 15, 2014
ExceptionDialog.xaml Improved exception dialog by adding OK button for warnings May 21, 2015
ExceptionDialog.xaml.cs Minor changes to ExceptionDialog - Warnings don't show [Ignore] anymo… May 23, 2015
HexLight GUI.csproj Disabled PopupDial when in Engine mode May 23, 2015
HexLight GUI.sln Refactored code to split engines into loadable modules May 23, 2015
LICENSE Prep for pushing to github Jun 26, 2014
PopupDial.xaml Disabled PopupDial when in Engine mode May 23, 2015
PopupDial.xaml.cs Moved HID functionality into the HexlightHID controller Nov 15, 2014
README.md Updated README.md May 21, 2015
RenderIcon.cs New experimental colourwheel control, allows different colour models. Nov 15, 2014
Settings.cs Project rename Jun 26, 2014
SettingsWindow.xaml Implemented custom controller settings pages & run-time connection va… Oct 7, 2014
SettingsWindow.xaml.cs Extra error checking on LoadController and removed null controller May 23, 2015
ViewModel.cs Disabled PopupDial when in Engine mode May 23, 2015
arrow_down_alt1_12x12.png Added stack trace details to error dialog Jun 30, 2014
error.png Added better exception handling dialog Jun 30, 2014
hsl.ico Initial commit May 26, 2014
packages.config Improved CIE XYZ colour handling Jun 23, 2014

README.md

HexLight GUI

Language: C# WPF (Windows Presentation Foundation)

An RGB LED controller, supporting advanced colour models. Compatible with Arduino-based RGB controllers (simple 4-byte serial packet format) and my custom HexLight hardware project (see jorticus/hexlight-firmware)

The application sits in your Windows system tray, allowing you to rapidly change the LED colour to suit your mood, whenever you want to:

PopupScrenshot

It also has a control panel for more advanced control:

PopupScrenshot

THIS PROJECT IS A WORK IN PROGRESS

But feel free to use it in your own projects!

It probably won't work out-of-the-box for you. So read the source code to figure out how to interface it to your hardware of choice. I've made the hardware control fairly abstract, so it should be simple to add your own controllers

Also experimenting with advanced colour models such as CIE XYZ, CIE xyY, Blackbody Temperature, etc. Do NOT assume my advanced colour model code works correctly! It doesn't, and I'm working on it.

If you spot any math errors, let me know!

Features

  • Easy to interface to arduinos through serial or a TCP socket (eg. TCP to serial bridge on a server).
  • Support for a custom 4-channel RGB controller based on a PIC32, through serial or USB-HID.
  • Modular controller architecture, making it easy to add your own controllers/protocols
  • Automatic device connect/disconnect
  • CIE1931 luminance correction! Maps raw RGB values to logarithmic human vision, so they appear linear. This is more accurate than gamma correction.
  • CIE XYZ/xyY models for device-independent colour control. Work in progress!
  • Custom C# WPF colour-picker controls (HSV colour picker, arc-slider, XYZ/xyY colour picker)
  • Custom Colour math classes

TODO

  • Implement XYZ/xyY colour picker
  • RGB+White colour driving model, for more accurate whites
  • Send device-independant XYZ values to the controller instead of RGB (RGB doesn't give any guarantees on what colour it will actually produce!)
  • Implement XYZ calibration on the controller
  • Colour presets
  • Blackbody temperature colour (hot/warm/cool)
  • Animation (Fade, cycle, strobe)
  • Sound reactive lights (as in my project here: http://jared.geek.nz/2013/jan/sound-reactive-led-lights)
  • Animations

Future ideas

  • Interface with f.lux
  • Automatically set mood lighting when watching a movie or playing a fullscreen game