diff options
author | daniel-Jones <daniel@danieljon.es> | 2017-02-22 16:20:23 +1030 |
---|---|---|
committer | daniel-Jones <daniel@danieljon.es> | 2017-02-22 16:20:23 +1030 |
commit | fbb63dd9f7eb402cc73abd8eeb00592fbd0c02b1 (patch) | |
tree | 1630f8001da988855608b1a234fbd5012738b579 /arduino/rgb | |
parent | d83503f9c5f9a5ef254c10255a355dfeb5ad9eb6 (diff) | |
download | RGB-Controller-fbb63dd9f7eb402cc73abd8eeb00592fbd0c02b1.tar.gz RGB-Controller-fbb63dd9f7eb402cc73abd8eeb00592fbd0c02b1.zip |
This time i did it correctly, all buttons, sliders etc work as intended when disconnected.
Diffstat (limited to 'arduino/rgb')
-rw-r--r-- | arduino/rgb/.rgb.ino.swo | bin | 16384 -> 20480 bytes | |||
-rw-r--r-- | arduino/rgb/rgb.ino | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/arduino/rgb/.rgb.ino.swo b/arduino/rgb/.rgb.ino.swo Binary files differindex c9a379b..2ab1ac4 100644 --- a/arduino/rgb/.rgb.ino.swo +++ b/arduino/rgb/.rgb.ino.swo diff --git a/arduino/rgb/rgb.ino b/arduino/rgb/rgb.ino index 7a0294b..195eff2 100644 --- a/arduino/rgb/rgb.ino +++ b/arduino/rgb/rgb.ino @@ -53,6 +53,10 @@ void setup() void red_thread() { + if (red < rf) + red = rf; + if (red > rt) + red = rf; if (red == rt) r_rev = true; if (red == rf) @@ -65,6 +69,10 @@ void red_thread() void green_thread() { + if (red < rf) + green = gf; + if (green > gt) + green = gf; if (green == gt) g_rev = true; if (green == gf) @@ -78,6 +86,10 @@ void green_thread() void blue_thread() { + if (blue < bf) + red = bf; + if (blue > bt) + blue = bf; if (blue == bt) b_rev = true; if (blue == bf) |