summaryrefslogtreecommitdiff
path: root/arduino
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2017-02-22 16:20:23 +1030
committerdaniel-Jones <daniel@danieljon.es>2017-02-22 16:20:23 +1030
commitfbb63dd9f7eb402cc73abd8eeb00592fbd0c02b1 (patch)
tree1630f8001da988855608b1a234fbd5012738b579 /arduino
parentd83503f9c5f9a5ef254c10255a355dfeb5ad9eb6 (diff)
downloadRGB-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')
-rw-r--r--arduino/rgb/.rgb.ino.swobin16384 -> 20480 bytes
-rw-r--r--arduino/rgb/rgb.ino12
2 files changed, 12 insertions, 0 deletions
diff --git a/arduino/rgb/.rgb.ino.swo b/arduino/rgb/.rgb.ino.swo
index c9a379b..2ab1ac4 100644
--- a/arduino/rgb/.rgb.ino.swo
+++ b/arduino/rgb/.rgb.ino.swo
Binary files differ
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)